266 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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
<bpmn:process id="Process_57rvnyv" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_0q4d4r9</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0q4d4r9" sourceRef="StartEvent_1" targetRef="Activity_093hb7o" />
<bpmn:manualTask id="Activity_093hb7o" name="Welcome message">
<bpmn:incoming>Flow_0q4d4r9</bpmn:incoming>
<bpmn:incoming>Flow_1ygkfkp</bpmn:incoming>
<bpmn:outgoing>Flow_0c3flgu</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:sequenceFlow id="Flow_0c3flgu" sourceRef="Activity_093hb7o" targetRef="Activity_1y7mw9l" />
<bpmn:userTask id="Activity_1y7mw9l" 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_0c3flgu</bpmn:incoming>
<bpmn:outgoing>Flow_0yromb6</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_0yromb6" sourceRef="Activity_1y7mw9l" targetRef="Activity_15463hw" />
<bpmn:businessRuleTask id="Activity_15463hw" name="Calculate cost">
<bpmn:extensionElements>
<spiffworkflow:calledDecisionId>decision_1</spiffworkflow:calledDecisionId>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0yromb6</bpmn:incoming>
<bpmn:outgoing>Flow_1y8ok4x</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:manualTask id="Activity_0gznwgh" name="Display total">
<bpmn:documentation># Here is your order total:
Pizza Price: {{base_price}}
Topping Price: {{topping_price}}
---
# Total Price: {{base_price + topping_price * len(toppings) }}</bpmn:documentation>
<bpmn:extensionElements>
<spiffworkflow:preScript>total_price = base_price + (topping_price * len(toppings))</spiffworkflow:preScript>
<spiffworkflow:instructionsForEndUser># Here is your order total:
Pizza Price: {{base_price}}
Topping Price: {{topping_price}}
---
# Total Price: {{total_price}}</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1y8ok4x</bpmn:incoming>
<bpmn:outgoing>Flow_05we09u</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:sequenceFlow id="Flow_1y8ok4x" sourceRef="Activity_15463hw" targetRef="Activity_0gznwgh" />
<bpmn:boundaryEvent id="Event_06rpop5" attachedToRef="Activity_0gznwgh">
<bpmn:extensionElements>
<spiffworkflow:signalButtonLabel>Change Order</spiffworkflow:signalButtonLabel>
</bpmn:extensionElements>
<bpmn:outgoing>Flow_1ygkfkp</bpmn:outgoing>
<bpmn:signalEventDefinition id="SignalEventDefinition_12dq9wh" />
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id="Flow_1ygkfkp" sourceRef="Event_06rpop5" targetRef="Activity_093hb7o" />
<bpmn:sequenceFlow id="Flow_05we09u" sourceRef="Activity_0gznwgh" targetRef="Activity_10498nh" />
<bpmn:endEvent id="Event_1r2l3t6">
<bpmn:incoming>Flow_1gqbe40</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1gqbe40" sourceRef="Activity_10498nh" targetRef="Event_1r2l3t6" />
<bpmn:subProcess id="Activity_10498nh" name="Collect Payment">
<bpmn:incoming>Flow_05we09u</bpmn:incoming>
<bpmn:outgoing>Flow_1gqbe40</bpmn:outgoing>
<bpmn:startEvent id="Event_1uq698y">
<bpmn:outgoing>Flow_1kjlao6</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1kjlao6" sourceRef="Event_1uq698y" targetRef="Activity_134ij16" />
<bpmn:userTask id="Activity_134ij16" name="Select Payment">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="payment-form-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="payment-form-uischema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1kjlao6</bpmn:incoming>
<bpmn:outgoing>Flow_0no22ch</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_0uigwa7" default="Flow_0t4fhys">
<bpmn:incoming>Flow_0no22ch</bpmn:incoming>
<bpmn:outgoing>Flow_0qejpw9</bpmn:outgoing>
<bpmn:outgoing>Flow_0t4fhys</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0no22ch" sourceRef="Activity_134ij16" targetRef="Gateway_0uigwa7" />
<bpmn:sequenceFlow id="Flow_0qejpw9" name="credit" sourceRef="Gateway_0uigwa7" targetRef="Activity_0sddg1u">
<bpmn:conditionExpression>payment_type == "credit"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0t4fhys" name="default" sourceRef="Gateway_0uigwa7" targetRef="Activity_1t0f3lc" />
<bpmn:manualTask id="Activity_0sddg1u" name="CREDIT">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser>You selected credit!</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0qejpw9</bpmn:incoming>
<bpmn:outgoing>Flow_1vx87h5</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:manualTask id="Activity_1t0f3lc" name="CASH">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser>You selected cash!</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0t4fhys</bpmn:incoming>
<bpmn:outgoing>Flow_0ll4g6z</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:exclusiveGateway id="Gateway_0szgxgp">
<bpmn:incoming>Flow_0ll4g6z</bpmn:incoming>
<bpmn:incoming>Flow_1vx87h5</bpmn:incoming>
<bpmn:outgoing>Flow_0dwrozo</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0ll4g6z" sourceRef="Activity_1t0f3lc" targetRef="Gateway_0szgxgp" />
<bpmn:sequenceFlow id="Flow_1vx87h5" sourceRef="Activity_0sddg1u" targetRef="Gateway_0szgxgp" />
<bpmn:endEvent id="Event_1ru8cja">
<bpmn:incoming>Flow_0dwrozo</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0dwrozo" sourceRef="Gateway_0szgxgp" targetRef="Event_1ru8cja" />
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_57rvnyv">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0l5zf92_di" bpmnElement="Activity_093hb7o">
<dc:Bounds x="270" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1mznjcl_di" bpmnElement="Activity_1y7mw9l">
<dc:Bounds x="440" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_05btu3r_di" bpmnElement="Activity_15463hw">
<dc:Bounds x="610" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_03699io_di" bpmnElement="Activity_0gznwgh">
<dc:Bounds x="770" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1r2l3t6_di" bpmnElement="Event_1r2l3t6">
<dc:Bounds x="1152" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1707klt_di" bpmnElement="Activity_10498nh">
<dc:Bounds x="960" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1qeo4h4_di" bpmnElement="Event_06rpop5">
<dc:Bounds x="822" y="199" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0q4d4r9_di" bpmnElement="Flow_0q4d4r9">
<di:waypoint x="215" y="177" />
<di:waypoint x="270" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0c3flgu_di" bpmnElement="Flow_0c3flgu">
<di:waypoint x="370" y="177" />
<di:waypoint x="440" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0yromb6_di" bpmnElement="Flow_0yromb6">
<di:waypoint x="540" y="177" />
<di:waypoint x="610" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1y8ok4x_di" bpmnElement="Flow_1y8ok4x">
<di:waypoint x="710" y="177" />
<di:waypoint x="770" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1ygkfkp_di" bpmnElement="Flow_1ygkfkp">
<di:waypoint x="840" y="235" />
<di:waypoint x="840" y="255" />
<di:waypoint x="610" y="570" />
<di:waypoint x="340" y="320" />
<di:waypoint x="322" y="217" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_05we09u_di" bpmnElement="Flow_05we09u">
<di:waypoint x="870" y="177" />
<di:waypoint x="960" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1gqbe40_di" bpmnElement="Flow_1gqbe40">
<di:waypoint x="1060" y="177" />
<di:waypoint x="1152" y="177" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<bpmndi:BPMNDiagram id="BPMNDiagram_0xchz4u">
<bpmndi:BPMNPlane id="BPMNPlane_1elanya" bpmnElement="Activity_10498nh">
<bpmndi:BPMNShape id="Event_1uq698y_di" bpmnElement="Event_1uq698y">
<dc:Bounds x="142" y="212" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_04u3g0p_di" bpmnElement="Activity_134ij16">
<dc:Bounds x="230" y="190" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0uigwa7_di" bpmnElement="Gateway_0uigwa7" isMarkerVisible="true">
<dc:Bounds x="395" y="205" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1m0p8n4_di" bpmnElement="Activity_0sddg1u">
<dc:Bounds x="490" y="100" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_05ynetj_di" bpmnElement="Activity_1t0f3lc">
<dc:Bounds x="510" y="290" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0szgxgp_di" bpmnElement="Gateway_0szgxgp" isMarkerVisible="true">
<dc:Bounds x="675" y="205" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1ru8cja_di" bpmnElement="Event_1ru8cja">
<dc:Bounds x="792" y="212" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1kjlao6_di" bpmnElement="Flow_1kjlao6">
<di:waypoint x="178" y="230" />
<di:waypoint x="230" y="230" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0no22ch_di" bpmnElement="Flow_0no22ch">
<di:waypoint x="330" y="230" />
<di:waypoint x="395" y="230" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0qejpw9_di" bpmnElement="Flow_0qejpw9">
<di:waypoint x="420" y="205" />
<di:waypoint x="420" y="140" />
<di:waypoint x="490" y="140" />
<bpmndi:BPMNLabel>
<dc:Bounds x="422" y="170" width="27" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0t4fhys_di" bpmnElement="Flow_0t4fhys">
<di:waypoint x="420" y="255" />
<di:waypoint x="420" y="330" />
<di:waypoint x="510" y="330" />
<bpmndi:BPMNLabel>
<dc:Bounds x="418" y="288" width="34" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ll4g6z_di" bpmnElement="Flow_0ll4g6z">
<di:waypoint x="610" y="330" />
<di:waypoint x="700" y="330" />
<di:waypoint x="700" y="255" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1vx87h5_di" bpmnElement="Flow_1vx87h5">
<di:waypoint x="590" y="140" />
<di:waypoint x="700" y="140" />
<di:waypoint x="700" y="205" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0dwrozo_di" bpmnElement="Flow_0dwrozo">
<di:waypoint x="725" y="230" />
<di:waypoint x="792" y="230" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>