1.5.3 Implementing your first process in Activiti (用Activiti实现第一个流程)
In this chapter we referenced a book order process a couple of times. Now we have our BPM environment ready to be used, let’s try and implement a simplified version of this business process. We could use the Activiti Modeler to first model the process, and the Activiti Designer to implement and deploy the process, but it’s better to start off with a BPMN 2.0 XML document for learning purposes. So no drag and drop development, but get ready for some XML hacking.
本章我们多次提及订书流程。既然BPMN环境准备就绪,那么让我们尝试并实现这个业务流程的简单版本吧。尽管我们可以使用Activiti Modeler对流程进行建模,并用Activiti Designer 实现并部署这个流程,但是为了教学目的,最好采用BPMN 2.0 XML文件。所以,尽管没有拖拽的开发环境,准备对作XML的黑客。
We already introduced a lot of BPMN 2.0 constructs in section 1.4 and we also looked at a BPMN 2.0 XML document there. So let’s create a clean XML document for the book order process with a start and end event as shown in code listing 1.1.
在 1.4节介绍了许多BPMN 2.0构件,我们也查看了BPMN 2.0 XML文档。所以,让我们为订单流程创建一个简洁文档,它有开始和结束事件。代码如表1.1 所示。
Listing 1.1 bookorder.bpmn20.xml document with only a start and end event
< definitions xmlns ="http://www.omg.org/spec/BPMN/20100524/MODEL" #1
targetNamespace ="http://www.bpmnwithactiviti.org" > #2
< process id ="bookorder" name ="bookorder" >
< startEvent id ="startevent1" name ="Start" />
< endEvent id ="endevent1" name ="End" />
< sequenceFlow id ="