Java_Activiti5_菜鸟也来学Activiti5工作流_之初识BPMN2.0的简单结构(五)

王朝学院·作者佚名  2016-08-27
窄屏简体版  字體: 小  |  中  |  大  |  超大  

1<?xmlversion="1.0" encoding="UTF-8"?>2<definitionsxmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"4xmlns:activiti="http://activiti.org/bpmn"xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"5xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"6typeLanguage="http://www.w3.org/2001/XMLSchema"exPRessionLanguage="http://www.w3.org/1999/XPath"7targetNamespace="http://www.activiti.org/test">89<!--10BPMN 2.0根节点是definitions节点。 这个元素中,可以定义多个流程定义11(不过我们建议每个文件只包含一个流程定义, 可以简化开发过程中的维护难度)。12一个空的流程定义看起来像下面这样。13注意,definitions元素 最少也要包含xmlns 和 targetNamespace的声明。14targetNamespace可以是任意值,它用来对流程实例进行分类。15-->1617<!--18process元素有两个属性:19id:这个属性是必须的, 它对应着Activiti ProcessDefinition对象的key属性。20‘id可以用来启动流程定义的流程实例, 通过RuntimeService的startProcessInstanceByKey方法。21实际中一般都使用这种方式启动流程。22name:这个属性是可选的, 对应ProcessDefinition的name属性。 引擎自己不会使用这个属性,23它可以用来在流程图上显示便于查看的名称。24-->2526<processid="myProcess"name="My process"isExecutable="true">2728<!--startEvent 开始事件, 是我们流程的入口-->29<startEventid="startevent1"name="Start"></startEvent>3031<!--userTask 用户任务事件 , 是流程中与操作者相关的任务声明。-->32<userTaskid="usertask1"name="User Task"></userTask>3334<!--endEvent 结束事件, 当流程达到结束事件时,整个流程就会结束-->35<endEventid="endevent1"name="End"></endEvent>3637<!--sequenceFlow 连线, 这些元素都使用连线连接。 这些连线拥有source 和 target属性, 定义了连线的方向。-->38<sequenceFlowid="flow1"sourceRef="startevent1"targetRef="usertask1"></sequenceFlow>39<sequenceFlowid="flow2"sourceRef="usertask1"targetRef="endevent1"></sequenceFlow>40</process>41<bpmndi:BPMNDiagramid="BPMNDiagram_myProcess">4243<!--44以下是定义了一些流程事件的坐标45-->4647<bpmndi:BPMNPlanebpmnElement="myProcess"id="BPMNPlane_myProcess">48<bpmndi:BPMNShapebpmnElement="startevent1"49id="BPMNShape_startevent1">50<omgdc:Boundsheight="35.0"width="35.0"x="60.0"y="130.0"></omgdc:Bounds>51</bpmndi:BPMNShape>52<bpmndi:BPMNShapebpmnElement="usertask1"id="BPMNShape_usertask1">53<omgdc:Boundsheight="55.0"width="105.0"x="190.0"y="119.0"></omgdc:Bounds>54</bpmndi:BPMNShape>55<bpmndi:BPMNShapebpmnElement="endevent1"id="BPMNShape_endevent1">56<omgdc:Boundsheight="35.0"width="35.0"x="390.0"y="130.0"></omgdc:Bounds>57</bpmndi:BPMNShape>58<bpmndi:BPMNEdgebpmnElement="flow1"id="BPMNEdge_flow1">59<omgdi:waypointx="95.0"y="147.0"></omgdi:waypoint>60<omgdi:waypointx="190.0"y="146.0"></omgdi:waypoint>61</bpmndi:BPMNEdge>62<bpmndi:BPMNEdgebpmnElement="flow2"id="BPMNEdge_flow2">63<omgdi:waypointx="295.0"y="146.0"></omgdi:waypoint>64<omgdi:waypointx="390.0"y="147.0"></omgdi:waypoint>65</bpmndi:BPMNEdge>66</bpmndi:BPMNPlane>67</bpmndi:BPMNDiagram>68</definitions>

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航