1.2 Speaking the BPM language (谈谈BPM语言)
We already spoke about business processes and the BPM life-cycle, but there is a lot of other terminology used in the BPM space. Therefore we will look at the most important parts of the BPM language in this chapter to get up to speed for the rest of this book.
尽管我们已经谈到业务流程和BPM生命周期,但是在BPM空间里还有许多其它的术语。所以我们将在本章来看看BPM 语言的最重要的部分,以便加快本书后面的速度。
1.2.1 Getting the big picture (获取大图)
First, let’s look at the big picture of the BPM terminology by looking at a typical BPM architecture. Such an architecture is implemented by a business process management system or suite if you like (BPMS). There are a lot of software vendors who provide BPMS software (such as IBM, Oracle, Tibco, Intalio and of course Alfresco with Activiti), but all their suites contain similar tools. Figure 1.3 provides an overview of a typical BPM architecture.
首先,通过典型的BPM架构,让我们来认识BPM术语的大图。通过一个流程管理系统或者套件来实现这个架构。有许多软件商提供BPMS软件(比如IBM,Oracle,Tibco,Intalio,当然开发Activiti的Alfresco),但是他们的套件包括相似的工具。图1.3提供典型架构的概况。
Figure 1.3 An overview of a typical BPMS architecture, with a process engine in its core and surrounded by process modeling, monitoring and life-cycle management tools.
图1.3 典型的BPMS架构的概貌,流程引擎是核心,周围是流程建模、监视和生命周期管理工具
There are quite a lot of components mentioned in figure 1.3, but the core of a BPMS is without doubt the process engine. In most chapters of this book we’ll therefore discuss this part of a BPMS in detail. The process engine is responsible for handling the process state for example. Because processes can run for days, weeks or even months it’s vital that the process state is persisted in a database. In case of hardware or software failure, the process
state can always be recovered based on the process state retrieved from the database.
图1.3中提及相当多的组件,但是,毫无争议,BPMS的核心是流程引擎。本书的大部分章节,我们将详细讨论BPMS的这部分内容。流程引擎负责处理流程状态。因为流程引擎能够运行数日,数周,甚至数月,所以将流程状态持久化到数据库是至关重要的。万一硬件或者软件出故障,流程状态总能基于数据库检索的流程状态,从而得以恢复。
In the rest of this section we will look at each of the four core components of a BPMS architecture, first the process engine, then the process modeling tools, third the process monitoring tools and eventually the process life-cycle management tools.
本节的其余部分,我们将看看BPMS架构的一个核心部件。首先是流程引擎,然后是流程建模工具,第三是监视工具,最后是流程生命周期管理工具。
1.2.2 Exploring the core process engine (探索核心的流程引擎)
A process engine is the foundation for a business process management suite. The process engine is capable of executing the business process model with quality aspects such as availability, performance and robustness in mind. In the next subsections we discuss the core parts of the process engine, the process state manager and the human task manager. The business rule engine integration will be discussed in chapter 9 and we’ll be talking about
the process history service in chapter 12 and 13.
流程引擎是业务流程管理套件的基础。流程引擎有能力处理可用度、性能和鲁棒性的质量方面。在子节我们讨论流程引擎的核心部分,流程状态管理器和人工任务管理器。业务规则引擎的集成将在第9章讨论。第12章和第13章将讨论流程历史服务。
PROCESS STATE MANAGEMENT(流程状态管理)
One of the common requirements of a business process is that it must be able to run over a longer period such as a day or a week. In that period the business process must be capable of accepting requests and handling events and progress a step further in the business process definition. A simple implementation of a process engine supporting this requirement would keep the running business processes in memory until it eventually reaches its end state. This would however lead to a very high consumption of memory when a lot of business processes are running.
业务流程公共需求之一是它必须能长久运行,数日或者数周。在此周期,业务流程必须有能力接受请求,处理事件和让业务流程定义的步骤进一步前行。支持这个需求的流程引擎的简单实现是在内存保持业务流程运行,直到最后到达结束状态。但是,当许多业务流程运行时,这将导致很高的内存消耗。
Therefore a core capability of a process engine is to have good process state management. A common solution for managing the process state is to have the current state of a process stored in a database at certain points in a process execution. When we talk about the process state you can think of the following parts of a process:
所以,业务流程的核心能力是具有良好的流程状态管理。管理流程状态的公共的解决方案是在流程执行中的某个时间点让当前状态存储在数据库里。当面谈及流程状态时,你能考虑下列流程部分:
- Process variables
- 流程变量
- The current activity in the process execution, often named the process execution token.
- 流程执行的当前活动,通常称为流程令牌。
- Assigned users / groups in a user task
- 用户任务里分配的用户/组
- The start and end time of executed process activities
- 执行流程活动的开始和结束时间。
Because the process state is stored in a database, the process engine can also recover running processes after a server shutdown, due to hardware failure or regular maintenance. So the process state manager is a vital component of the process engine.
因为流程状态存储在数据库,所以流程引擎在服务器关闭之后可以恢复运行流程。服务的关闭是由于硬件故障或者正常维护。所以流程状态管理器是流程引擎的至关重要的组件。
HUMAN TASK MANAGER(人工任务管理)
Another important component of a process engine is a human task manager to support workflow functionality. With workflow functionality, we mean the creation of user or group assigned tasks during process execution. In BPMN 2.0 this can be implemented with the user task construct.
人工任务管理器是另外一个重要的流程引擎的组件。它支持工作流功能。在工作流功能的帮助下,能在流程执行当中建立分配任务的用户和组。在BPMN 2.0,可以用用户,用户组组件来实现。
The human task manager should be capable of assigning tasks to specific users or groups of users. This also means that an API must be available to query the human task manager for tasks available to a specific user. A task can have at least three different states.
人工任务管理器应该具有将任务分配给某些用户或组的能力。这也意味着,为了查询某一用户可用的任务,必须有可用的API来查询任务管理器,任务至少具有三个不同的状态。
1. The task is unassigned, which means that the task is available to every user that is part of the user or group criteria specified in the task configuration.
1.任务分配,这意味着对每个用户可用的任务是在任务配置中指定的用户或组基准的一部分。
2. The task is assigned, which means the task is assigned to one and only one user. This user has claimed the task, so the task will not appear on other user’s task lists. Of course administrators and managers still can perform commands on this tasks in exceptional cases.
2. 任务已分配,这意味着一个任务当且仅当分配给一个用户。因为这个用户已领取任务,所以这个任务不会出现在另外用户的任务列表当中。当然在异常情况下,管理员和经理用户仍然能执行这个任务的指令。
3. The task is completed, which means the task is completed by the user who has claimed the task in the first place.
3.任务完成。由在第一步领取任务的用户完成这个任务
User or group criteria define the users who can claim a user task. Often, there is support
for LDAP queries to fill-in this criteria.
用户或组基准定义领取任务的用户。经常地,采用LDAP查询支持来满足这个基准。
1.2.3 Modeling and design tools (建模和设计工具)
It’s great to have a process engine to run your business processes, but a BPMS also need modeling and design tools to create the business processes. Before BPMN 2.0 it was easier to differentiate between modeling and design tools, because modeling tools used a modeling notation like BPMN 1.x and design tools used a process execution language like WS-BPEL or jPDL for jBPM.
尽管拥有流程引擎来运行你的业务流程,但是BPMS也需要建模和设计工具来建立业务流程。在BPMN 2.0之前,区分建模工具和设计工具是比较容易的,这是因为建模工具使用像BPMN 1.想的建模符号,设计工具使用WS-BPEL或者就BPM的jPDL的流程执行语言。
With BPMN 2.0 we now have a standard that provides a modeling notation as well as a process execution language. This means that it’s not necessary any more to convert and transform a BPMN 1.x business process model to WS-BPEL. But as we will see in section 1.3.3, there’s still a difference between the level of detail used in modeling and design phases. A modeling tool has to support features to do high-level modeling and a design tool must be able to create a process execution model that can be directly deployed to a process engine. There may be tools which support modeling as well as design functionality, but we’ll discuss the functionality separately here.
BPMN 2.0既提供了建模符号的标志,也提供了流程执行语言的标准。这意味着,将BPMN 1.x业务建模语言转为WS-BPEL不再有必要。但是,正如我们将在1.3.3所见,建模和设计阶段所使用的细节层次仍有差别。建模工具不得不支持高层次的建模特性;而设计工具必须能建立能够直接部署到流程引擎的的流程执行模型。尽管也许存在既支持建模,也支持设计功能的工具,但是,我们在此分开讨论这些功能。
MODELING A BPMN BUSINESS PROCESS(对BPMN业务流程建模)
A BPMN modeling tool should support the definition of business processes by business and information analysts. This means that in a modeling tool we don’t want to be restricted too much by the formal BPMN 2.0 specification, but the focus should be to support the user in the definition of the business process model in a user-friendly way.
BPMN建模工具应该支持业务和信息分析师定义的业务流程。尽管这意味着我们不想被正式的BPMN 2.0规范限制太多,但是应该关注以用户友好的方式支持用户业务流程模型的定义。
In addition, it would be nice to see simulation functionality in the modeler to be able to see if the modeled business process executes as expected. There are pretty advanced simulation tools available that can calculate maximum throughput and can identify possible bottlenecks in a business process and this is vital functionality to do successful BPM.
另外,在建模器里最好提供仿真功能,以便能够观察建模的业务流程是否以期望的方式运行。具有可用的非常棒的高级仿真工具能够计算最大的吞吐量和辨识业务可能的瓶颈。这是成功BPM至关重要的功能。
DESIGNING A BPMN BUSINESS PROCESS (对BPMN业务流程进行)
The designer tool takes a BPMN business process defined in the modeler as starting point or you can decide to design a business process from scratch if you want to. A designer tool is often dedicated to support a specific implementation of a process engine. Where a modeler tool can and should be vendor independent, a designer can contain vendor specific details and have support for vendor specific functionality inside a process engine.
设计器工具是从建模器取得定义BPMN业务流程作为起始点。如果你希望从头开始,你能够决定设计一个从头开始的业务流程。设计工具经常是专有的支持,流程引擎特有的实现。建模器工具能够并应该是供应商独立的,而设计器可以包括供应商相关的细节,并可在流程引擎里具有对特定功能的支持。
Important functionality for a designer is to be able to add for example error handling to a process, to couple service tasks to web services via WSDL and Java classes, and to couple user tasks to LDAP related queries. Furthermore, it must be possible to run a process engine from within the designer tool and deploy processes on it for testing purposes. Finally it must support unit testing, so a developer is able to perform some basic unit tests before a process is deployed to a central process engine.
1.2.4 Managing and monitoring the process engine (管理和监视流程引擎)
Management functionality for a process engine means that an administrator must be able to query the process engine for deployed process definitions and look into version information. In addition, running process instances can be queried to look into specific states of processes when end users have questions about it. Also for user tasks it must be possible to claim and complete certain user tasks when there is a need for this.
流程引擎的管理功能意味着管理员必须能够查询已部署的流程定义和检查版本信息。另外,当用户有问题时,能够查询正运行的流程引擎来深入分析流程状态,对于用户任务,当必须时,必须有可能领取和完成某些用户任务。
In general, the state of a process definition, process instance and user task must be available for an administrator. This also includes the process engine databases, which are a core part of the process engine. So the database model and its tables should be easily accessible for administration purposes.
通常,流程定义,流程实例以及用户任务的状态对管理员可用。这也包括流程引擎数据库,它是流程引擎的核心部分。所以为了管理目的,应该访问数据库模型和它的数据库表。
Monitoring functionality is more targeted at specific events that occur in a process instance. For example, when a large order enters an order process, it may be interesting for specific managers to receive a signal. Another more technical example is that a process instance is inactive for more than a week, it may need attention to see if the process is still running normally. It’s obvious that management and monitoring is a very important part in the business success of process engines and BPM in general.
监视器功能更多关注在流程实例发生的特殊事件。例如,当以大宗订单进入一个订单流程。某个经理将受到信号是否有趣。另外一个更技术是一个流实现超过一周不激活。也许引起注意看看流程是否仍然运行。显然,通常业务成功和BPM管理和监视是非常重要的。
1.2.5 Collaborating on business processes (业务流程协作)
Collaboration tools are a central part of a lot of IT projects in general. Collaboration tools include for example source code repositories, code review tools and wiki pages. But in BPM projects it’s even more important due to the complexity and the large amount of different roles and persons in such a project.
通常,协作工具是许多IT项目的中央部分。例如,协作工具包括源代码仓库,代码走查工具和wike页面。由于项目的复杂性,大规模的角色和人,BPM项目甚至更为重要。
BPMN provides a good foundation for collaboration because it supports high level business modeling understood by managers, it also supports detailed business modeling understood by business analysts, architects and designers and with BPMN 2.0 it also support process execution understood by architects, developers and administrators.
BPMN为协作提供了良好基础。这是因为,它为经理提供易理解的高层次业务建模能力;也为业务分析师,架构师提供了易理解、更为详细的业务建模。采用BPMN 2.0架构师,开发人员和管理人员提供易理解的流程执行。
A BPM collaboration tool must provide a view on the different process model repositories of a BPM project. There are modeler, designer and even code repositories which must be bundled in one or more views depending on the end user. It’s also very important that everybody working on a business process is identifiable with his role and work in this collaboration tool. It must be clear which person must be contacted for specific questions.
BPM协作工具必须提供BPM项目不同流程模型仓库的视图。根据用户不同,必须能够绑定建模器、设计器,甚至代码仓库包图。在这个协作工具里,根据角色和工作辨识在业务流程上工作的每个人也非常重要。某个问题联系人必须非常清楚。
We rushed through the major components of the typical BPM architecture we showed in figure 1.3. But we’ll take a closer look at every part in the rest of this book. For example we’ll look at the process engine in chapter 3, discuss the human task manager in chapter 7 and look at the modeler, designer and collaboration tools in chapter 2. For now it’s good to have heard about the vocabulary, as we will be using it a lot in this book.
我们快速浏览了图1.3所示的典型BPM架构的主要部件。但是,我们将在本书的其余部分仔细观察每个部件。例如,在第3章,我们将介绍流程引擎。在第7章,讨论人工任务管理器。在第2章讨论建模器、设计器和协作工具。到目前为止,我们已经拥有了共同的词汇,这很棒,因为我们将在本书使用这些词汇。
With a foundation of BPM knowledge and vocabulary in our minds it’s time to get introduced into BPMN 2.0 and its history.
既然我们已经对BPM只是和词汇了然于心,是该介绍BPMN 2.0及其历史的时间了。