[Flowable]調用式子流程(Call Activity)

  • calledElement="parallelOrderProcess"
<callActivity id="callactivity1" name="訂購" calledElement="parallelOrderProcess" activiti:inheritVariables="false"></callActivity>

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="topUpOrderProcess" name="充值訂購流程" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="exclusivegateway1"></sequenceFlow>
    <serviceTask id="servicetask1" name="SMS" activiti:expression="#{topUpOrderService.sms()}"></serviceTask>
    <sequenceFlow id="flow2-morethan500" name="充值金額大於等於500元" sourceRef="exclusivegateway1" targetRef="timerintermediatecatchevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${money >= 500}]]></conditionExpression>
    </sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow4-lessthan500" name="充值金額小於500元" sourceRef="exclusivegateway1" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${money < 500}]]></conditionExpression>
    </sequenceFlow>
    <callActivity id="callactivity1" name="訂購" calledElement="parallelOrderProcess" activiti:inheritVariables="false"></callActivity>
    <sequenceFlow id="flow2" sourceRef="receivetask1" targetRef="callactivity1"></sequenceFlow>
    <sequenceFlow id="flow3" sourceRef="callactivity1" targetRef="endevent1"></sequenceFlow>
    <receiveTask id="receivetask1" name="H5用戶選擇優酷或愛奇藝"></receiveTask>
    <sequenceFlow id="flow4" sourceRef="servicetask1" targetRef="receivetask1"></sequenceFlow>
    <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="servicetask1" cancelActivity="true">
      <timerEventDefinition></timerEventDefinition>
    </boundaryEvent>
    <intermediateCatchEvent id="timerintermediatecatchevent1" name="一天後發短信">
      <timerEventDefinition>
        <timeDuration>P1D</timeDuration>
      </timerEventDefinition>
    </intermediateCatchEvent>
    <sequenceFlow id="flow5" sourceRef="timerintermediatecatchevent1" targetRef="servicetask1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_topUpOrderProcess">
    <bpmndi:BPMNPlane bpmnElement="topUpOrderProcess" id="BPMNPlane_topUpOrderProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="30.0" y="100.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="110.0" y="98.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1">
        <omgdc:Bounds height="55.0" width="105.0" x="330.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="boundarytimer1" id="BPMNShape_boundarytimer1">
        <omgdc:Bounds height="30.0" width="30.0" x="368.0" y="131.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="610.0" y="290.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="callactivity1" id="BPMNShape_callactivity1">
        <omgdc:Bounds height="55.0" width="105.0" x="490.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="receivetask1" id="BPMNShape_receivetask1">
        <omgdc:Bounds height="55.0" width="151.0" x="397.0" y="188.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent1" id="BPMNShape_timerintermediatecatchevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="235.0" y="100.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="65.0" y="117.0"></omgdi:waypoint>
        <omgdi:waypoint x="110.0" y="118.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2-morethan500" id="BPMNEdge_flow2-morethan500">
        <omgdi:waypoint x="150.0" y="118.0"></omgdi:waypoint>
        <omgdi:waypoint x="235.0" y="117.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="48.0" width="100.0" x="150.0" y="118.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4-lessthan500" id="BPMNEdge_flow4-lessthan500">
        <omgdi:waypoint x="130.0" y="138.0"></omgdi:waypoint>
        <omgdi:waypoint x="129.0" y="307.0"></omgdi:waypoint>
        <omgdi:waypoint x="610.0" y="307.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="96.0" x="141.0" y="283.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="472.0" y="188.0"></omgdi:waypoint>
        <omgdi:waypoint x="542.0" y="145.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="595.0" y="117.0"></omgdi:waypoint>
        <omgdi:waypoint x="627.0" y="117.0"></omgdi:waypoint>
        <omgdi:waypoint x="627.0" y="290.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="382.0" y="145.0"></omgdi:waypoint>
        <omgdi:waypoint x="472.0" y="188.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="270.0" y="117.0"></omgdi:waypoint>
        <omgdi:waypoint x="330.0" y="117.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
相關文章
相關標籤/搜索