demo-process-models/playground/myome/pizza/pizza.bpmn

272 lines
13 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
<bpmn:process id="Process_gpy73c8" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_0pze8h7</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0pze8h7" sourceRef="StartEvent_1" targetRef="Activity_1yfwya2" />
<bpmn:endEvent id="Event_0js86mf">
<bpmn:incoming>Flow_0rdozhe</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1vgkwps" sourceRef="Activity_1yfwya2" targetRef="Activity_1rjhndn" />
<bpmn:manualTask id="Activity_1yfwya2" name="Welcome to the pizza diagram">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser># We only do pizza over here.
If you don't like pizza, you're in the wrong place.</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0pze8h7</bpmn:incoming>
<bpmn:incoming>Flow_1wnm18u</bpmn:incoming>
<bpmn:outgoing>Flow_1vgkwps</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:sequenceFlow id="Flow_0uthtui" sourceRef="Activity_1rjhndn" targetRef="Activity_1wodi2t" />
<bpmn:userTask id="Activity_1rjhndn" name="Select pizza">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="select-pizza-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="select-pizza-uischema.json" />
</spiffworkflow:properties>
<spiffworkflow:preScript>pizza_sizes = [
{
"value": "small",
"label": "small"
},
{
"value": "medium",
"label": "medium"
},
{
"value": "large",
"label": "large"
}
]</spiffworkflow:preScript>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1vgkwps</bpmn:incoming>
<bpmn:outgoing>Flow_0uthtui</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_0gzjjcz" sourceRef="Activity_1wodi2t" targetRef="Activity_06z15yy" />
<bpmn:businessRuleTask id="Activity_1wodi2t" name="Calculate cost">
<bpmn:extensionElements>
<spiffworkflow:calledDecisionId>decision_1</spiffworkflow:calledDecisionId>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0uthtui</bpmn:incoming>
<bpmn:outgoing>Flow_0gzjjcz</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:sequenceFlow id="Flow_0o85f56" sourceRef="Activity_06z15yy" targetRef="Activity_0e9tk7w" />
<bpmn:manualTask id="Activity_06z15yy" name="Confirm order">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser># Here's the damage...
Pizza Price: {{base_price}}
Topping Price: {{topping_price}}
---
# Total Price: {{ total_price }}</spiffworkflow:instructionsForEndUser>
<spiffworkflow:preScript>total_price = round(base_price + topping_price * len(toppings), 2)</spiffworkflow:preScript>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0gzjjcz</bpmn:incoming>
<bpmn:outgoing>Flow_0o85f56</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:boundaryEvent id="Event_0wqxp4x" attachedToRef="Activity_06z15yy">
<bpmn:extensionElements>
<spiffworkflow:signalButtonLabel>Change order</spiffworkflow:signalButtonLabel>
</bpmn:extensionElements>
<bpmn:outgoing>Flow_1wnm18u</bpmn:outgoing>
<bpmn:signalEventDefinition id="SignalEventDefinition_1yzap31" />
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id="Flow_1wnm18u" sourceRef="Event_0wqxp4x" targetRef="Activity_1yfwya2" />
<bpmn:sequenceFlow id="Flow_0s5g4vl" sourceRef="Activity_0e9tk7w" targetRef="Activity_16lp36p" />
<bpmn:subProcess id="Activity_0e9tk7w" name="Collect payment">
<bpmn:incoming>Flow_0o85f56</bpmn:incoming>
<bpmn:outgoing>Flow_0s5g4vl</bpmn:outgoing>
<bpmn:startEvent id="Event_1obvhqv">
<bpmn:outgoing>Flow_1pkk1pj</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1pkk1pj" sourceRef="Event_1obvhqv" targetRef="Activity_1iduntg" />
<bpmn:sequenceFlow id="Flow_0piqbs8" sourceRef="Activity_1iduntg" targetRef="Gateway_03dy12q" />
<bpmn:userTask id="Activity_1iduntg" name="Select payment">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="select_payment_type-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="select_payment_type-uischema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1pkk1pj</bpmn:incoming>
<bpmn:outgoing>Flow_0piqbs8</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_03dy12q" default="Flow_1upbdb7">
<bpmn:incoming>Flow_0piqbs8</bpmn:incoming>
<bpmn:outgoing>Flow_1upbdb7</bpmn:outgoing>
<bpmn:outgoing>Flow_0wyopo1</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1upbdb7" sourceRef="Gateway_03dy12q" targetRef="Activity_0pmahqy" />
<bpmn:sequenceFlow id="Flow_0wyopo1" name="credit" sourceRef="Gateway_03dy12q" targetRef="Activity_092bk5q">
<bpmn:conditionExpression>payment_type</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_1o03lt4">
<bpmn:incoming>Flow_1hoxmos</bpmn:incoming>
<bpmn:incoming>Flow_15lbinh</bpmn:incoming>
<bpmn:outgoing>Flow_0ip29y3</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1hoxmos" sourceRef="Activity_092bk5q" targetRef="Gateway_1o03lt4" />
<bpmn:sequenceFlow id="Flow_15lbinh" sourceRef="Activity_0pmahqy" targetRef="Gateway_1o03lt4" />
<bpmn:endEvent id="Event_19dest7">
<bpmn:incoming>Flow_0ip29y3</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0ip29y3" sourceRef="Gateway_1o03lt4" targetRef="Event_19dest7" />
<bpmn:manualTask id="Activity_092bk5q" name="Selected credit">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0wyopo1</bpmn:incoming>
<bpmn:outgoing>Flow_1hoxmos</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:manualTask id="Activity_0pmahqy" name="Selected cash">
<bpmn:incoming>Flow_1upbdb7</bpmn:incoming>
<bpmn:outgoing>Flow_15lbinh</bpmn:outgoing>
</bpmn:manualTask>
</bpmn:subProcess>
<bpmn:sequenceFlow id="Flow_0rdozhe" sourceRef="Activity_16lp36p" targetRef="Event_0js86mf" />
<bpmn:callActivity id="Activity_16lp36p" name="Cook food" calledElement="Process_4a2ku4d">
<bpmn:incoming>Flow_0s5g4vl</bpmn:incoming>
<bpmn:outgoing>Flow_0rdozhe</bpmn:outgoing>
</bpmn:callActivity>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_gpy73c8">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0js86mf_di" bpmnElement="Event_0js86mf">
<dc:Bounds x="1202" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1qdcgfa_di" bpmnElement="Activity_1yfwya2">
<dc:Bounds x="270" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1eppx03_di" bpmnElement="Activity_1rjhndn">
<dc:Bounds x="420" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_16lgns9_di" bpmnElement="Activity_1wodi2t">
<dc:Bounds x="560" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0cvjrqw_di" bpmnElement="Activity_06z15yy">
<dc:Bounds x="710" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0jdhduw_di" bpmnElement="Activity_0e9tk7w">
<dc:Bounds x="870" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1qsofqb_di" bpmnElement="Activity_16lp36p">
<dc:Bounds x="1030" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1ytt6i2_di" bpmnElement="Event_0wqxp4x">
<dc:Bounds x="762" y="199" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0pze8h7_di" bpmnElement="Flow_0pze8h7">
<di:waypoint x="215" y="177" />
<di:waypoint x="270" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1vgkwps_di" bpmnElement="Flow_1vgkwps">
<di:waypoint x="370" y="177" />
<di:waypoint x="420" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0uthtui_di" bpmnElement="Flow_0uthtui">
<di:waypoint x="520" y="177" />
<di:waypoint x="560" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0gzjjcz_di" bpmnElement="Flow_0gzjjcz">
<di:waypoint x="660" y="177" />
<di:waypoint x="710" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0o85f56_di" bpmnElement="Flow_0o85f56">
<di:waypoint x="810" y="177" />
<di:waypoint x="870" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1wnm18u_di" bpmnElement="Flow_1wnm18u">
<di:waypoint x="780" y="235" />
<di:waypoint x="780" y="330" />
<di:waypoint x="320" y="330" />
<di:waypoint x="320" y="217" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0s5g4vl_di" bpmnElement="Flow_0s5g4vl">
<di:waypoint x="970" y="177" />
<di:waypoint x="1030" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0rdozhe_di" bpmnElement="Flow_0rdozhe">
<di:waypoint x="1130" y="177" />
<di:waypoint x="1202" y="177" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<bpmndi:BPMNDiagram id="BPMNDiagram_07lvsr4">
<bpmndi:BPMNPlane id="BPMNPlane_0c5k633" bpmnElement="Activity_0e9tk7w">
<bpmndi:BPMNShape id="Event_1obvhqv_di" bpmnElement="Event_1obvhqv">
<dc:Bounds x="352" y="272" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1q5pf1d_di" bpmnElement="Activity_1iduntg">
<dc:Bounds x="440" y="250" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_03dy12q_di" bpmnElement="Gateway_03dy12q" isMarkerVisible="true">
<dc:Bounds x="615" y="265" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="712" y="280" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1o03lt4_di" bpmnElement="Gateway_1o03lt4" isMarkerVisible="true">
<dc:Bounds x="955" y="265" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_19dest7_di" bpmnElement="Event_19dest7">
<dc:Bounds x="1072" y="272" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_074wdn6_di" bpmnElement="Activity_092bk5q">
<dc:Bounds x="790" y="130" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0ijww2u_di" bpmnElement="Activity_0pmahqy">
<dc:Bounds x="790" y="360" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1pkk1pj_di" bpmnElement="Flow_1pkk1pj">
<di:waypoint x="388" y="290" />
<di:waypoint x="440" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0piqbs8_di" bpmnElement="Flow_0piqbs8">
<di:waypoint x="540" y="290" />
<di:waypoint x="615" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1upbdb7_di" bpmnElement="Flow_1upbdb7">
<di:waypoint x="640" y="315" />
<di:waypoint x="640" y="400" />
<di:waypoint x="790" y="400" />
<bpmndi:BPMNLabel>
<dc:Bounds x="643" y="355" width="24" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wyopo1_di" bpmnElement="Flow_0wyopo1">
<di:waypoint x="640" y="265" />
<di:waypoint x="640" y="170" />
<di:waypoint x="790" y="170" />
<bpmndi:BPMNLabel>
<dc:Bounds x="642" y="215" width="27" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1hoxmos_di" bpmnElement="Flow_1hoxmos">
<di:waypoint x="890" y="170" />
<di:waypoint x="980" y="170" />
<di:waypoint x="980" y="265" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_15lbinh_di" bpmnElement="Flow_15lbinh">
<di:waypoint x="890" y="400" />
<di:waypoint x="980" y="400" />
<di:waypoint x="980" y="315" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ip29y3_di" bpmnElement="Flow_0ip29y3">
<di:waypoint x="1005" y="290" />
<di:waypoint x="1072" y="290" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>