网路冷眼@BlogJava

熙熙攘攘一闲人 以冷静的眼光观察技术
posts - 88, comments - 193, trackbacks - 0, articles - 28
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

1.4 Introducing BPMN 2.0 from a developers viewpoint(从开发者的角度介绍BPMN 2.0

To become familiar with the important constructs of BPMN, we’ll build up the detail level of modeling similar to the categorization of WfMC and Bruce Silver. First, we start with a high-level model example and then we dive into a more detailed process. Level 3 of the Bruce Silver categorization will be discussed in section 1.5, when we will implement our first process with the Activiti process engine.

为了熟悉BPMN重要的构件,我们将构件和WfMC和Bruce Silver分类相似的详细的建模层次。首先,我们以一个高层建模示例开始,而后我们专研一个更详细的流程。Bruce Silver分类的层次将在节1.5讨论,然后我们将用Activiti流程引擎实现第一个流程。

1.4.1 High-level modeling with BPMN 2.0 (采用BPMN 2.0进行高级建模)

In section 1.1 we looked at a sample book order business process. In figure 1.1 the book order process was modeled without a real model notation. With the simple or level 1 palette in mind, we’ll take another look at the book order process and convert it into a real BPMN 2.0 business process model.

节1.1,我们讨论了一个订书业务流程的示例。在图1.1中,订书流程的建模没有采用实际的模型符号。采用简单的或者级别1调色板,我们将用另外的方式讨论订书流程,并将它转换成BPMN 2.0的业务流程模型。

This means that we have to add a more formal notation to describe the book order process. So in the BPMN 2.0 book order process we’ll use start and end events, parallel gateways, pools and tasks. Figure 1.7 shows the book order process modeled with a simple subset of the BPMN 2.0 palette.

这意味着我们不得不增加正式符号描述订书流程。所以,在BPMN 2.0订书流程,我们将使用开始和结束事件,并行网关,泳池和任务。图1.7展示了采用一个BPMN2.0调色板子集建模的订书流程。

clip_image002[4]  

Figure 1.7 A high level BPMN 2.0 model describing the book order process with a simple subset of the BPMN 2.0 construct palette.

图 1.7 采用BPMN 2.0 构件调色板简单子集描述订书流程的高级BPMN 2.0模型

 

Before discussing the process in more detail let’s first look at the individual BPMN 2.0 constructs in table 1.1.

在详细讨论流程之前,让我们首先看看表1.1中的单个BPMN 2.0构件 

 

Table 1.1 Overview of the BPMN 2.0 constructs used in figure 1.7.

表1.1 在图1.7中使用的BPMN 2.0构件的概貌

BPMN 2.0 icon

BPMN 2.0 name

Description

clip_image013

Start event

开始事件

A start event is the trigger to start a new process instance.

开始事件是启动一个新流程实例的触发器

clip_image011

End event

结束事件

An end event is the last step before the process instance is completed. The end event has a thicker circle border line than the start event.

结束事件是流程实例完成之前的最后一步。结束事件的边线要比开始事件要粗。

clip_image009

Pool

泳池

A pool represents the container for the activities of a process. Best practice is to use the process name for the pool name.

泳池表示流程活动的容器。使用流程名作为泳池名是最佳实践。

clip_image002

Lane

泳道

A lane represents a role within a process model. In most cases this is a organizational unit or a role definition.

泳道代表流程模型里的角色。在大多数情况下,这是一个组织单元或者角色定义。

clip_image007

Task

任务

A task is a piece of work that has to be executed as part of the process definition. A task can be an automated activity or a manual activity.

任务是作为流程定义部分可执行工作的片段。任务既可为自动任务,也可为人工任务。

clip_image003

Parallel gateway

并行网关

A parallel gateway is used to indicate that activities can be executed simultaneously or that all incoming activities must be completed before the process progresses to the next activity.

并行网关用来指示可同时执行的活动,或者在流程行进到下个活动的所有传入活动。

clip_image005

Exclusive gateway

排他网关

An exclusive gateway is used for conditional logic. Based on a condition only one of the outgoing sequence flows will be followed.

排他网关用来处理条件逻辑。基于条件,只有一个传出顺序流得到执行。

clip_image001

Message flow

消息流

A message flow is used to send a signal or message from one pool to another. It may not be used to connect activities within one pool.

消息流用来从一个泳池到另一个泳池发送信号或者消息。它不可以在一个泳池连接活动。

clip_image014

Sequence flow

顺序流

A sequence flow connects activities, gateways and events to each other within one pool. It therefore represents the orchestration of the process definition.

顺序流连接在同一个泳池里的活动,网关和事件。所以它代表了流程定义的编排。

   

Now we know the meaning of the individual BPMN 2.0 constructs let’s walk through the full process model. One of the eye-catching differences between the model we’ve drawn in section 1 and figure 1.7 is the use of pools and lanes. In figure 1.7 there are three pools: Customer, Book store and Publisher. The pools describe the different roles that perform activities in the business process. In the book store pool there are two lanes that characterize the different organizational units within the book store. Because in this example the bookstore is a small company, there’s only a sales and an inventory organizational unit.

既然我们知道单个BPMN 2.0构件的意义,让我们遍历全部的流程模型。在我们于图1.7中所绘的模型使用了泳池和泳道。图1.7有三个泳池:客户,书籍和出版商。泳池是业务流程中执行活动的不同角色。在书店泳池里有两个泳道,对书店里不同的两个组织单元进行特性化。因为本示例中,书店是一个小公司,所以只有销售和库房两个组织单元。

In this business process model we focus on the book store, but we could also include the process activities that are necessary for the publisher to complete the order process. The process is started with a order request by a customer, which is pictured here as a message flow (the dashed line) initiating a start event (a circle).

在业务流程模型中,我们关注书店,但也包括为出版商完成订单流程的流程活动。流程由一个客户启动。在此绘制为一个消息流(虚线)来启动一个开始事件(一个圆圈)。

When the process is started two tasks should be completed, which are the process payment and the check stock tasks. These tasks can be executed in parallel and therefore a parallel gateway is modeled after the start event. After the stock is checked an exclusive gateway is used for the conditional logic of the book being in stock or not. When the book is not in stock it’s ordered from the publisher by an additional task.

当流程启动时,应当完成两个任务。它们是支付任务和存货检查任务。因为这些任务可以并行执行,所以在开始事件之后,建模为平行网关。在存货检查之后,用一个排他网关进行书籍是否有库存的条件逻辑的判断。当书籍没有库存,则通过另外的任务从出版商订货。

When the book is in stock, either because it was already or by an extra order via the publisher, the book is ready for shipment. But before the book will be shipped we must be sure that the payment has been successfully completed. So a parallel gateway is used to join the tasks, meaning that the process will go further before these tasks have been completed.

当书籍有库存,或者是因为书籍已准备就绪,或者是因为通过出版商的额外订货,书籍可以准备发货。但是,在书籍发货之前,我们必须确定支付已成功完成。所以并行网关用来聚合任务。在这些任务完成之前,将会向前推进。

After the parallel gateway two additional tasks are executed that ship the book to the customer and inform the customer about the arrival date before the process is completed by an end event. As you see the high level model doesn’t contain stuff like error handling or the definition of the type of a task. That’s what we will add in the next section.

在两个额外任务的并行网关执行之后,在通过一个结束事件完成流程之前,把书籍发送给客户,并通知客户到货的日期。正如你所见,高级模型并不包括错误处理或者任务类型定义之类的事情。那是我们在下节讨论的内容。


只有注册用户登录后才能发表评论。


网站导航: