User: dan@sartography.com added process model file playground/dan/pizza-palace/pizza_palace.bpmn

This commit is contained in:
sartography-automated-committer 2023-11-20 19:36:41 +00:00
parent cb91f66366
commit 64ec0b1b49
1 changed files with 305 additions and 0 deletions

View File

@ -0,0 +1,305 @@
<?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_pizza_palace" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_04q7hj8</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_04q7hj8" sourceRef="StartEvent_1" targetRef="Activity_0tl6534" />
<bpmn:manualTask id="Activity_0tl6534" name="Show welcome message">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser># Welcome to Joe's Pizza Palace
For all your pizza pie needs!
Press submit below to start your order!</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_04q7hj8</bpmn:incoming>
<bpmn:outgoing>Flow_10nx10l</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:endEvent id="Event_0vp0rkm">
<bpmn:incoming>Flow_10gazda</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_10nx10l" sourceRef="Activity_0tl6534" targetRef="Activity_0mxov5f" />
<bpmn:sequenceFlow id="Flow_0hnc6m8" sourceRef="Activity_0mxov5f" targetRef="Activity_0dkzkil" />
<bpmn:userTask id="Activity_0mxov5f" name="Select Pizza">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="pizza-order-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="pizza-order-uischema.json" />
</spiffworkflow:properties>
<spiffworkflow:preScript>pizza_sizes = [
{
"value": "small",
"label": "small"
},
{
"value": "medium",
"label": "medium"
},
{
"value": "large",
"label": "large"
},
{
"value": "extra-large",
"label": "extra-large"
}
]</spiffworkflow:preScript>
</bpmn:extensionElements>
<bpmn:incoming>Flow_10nx10l</bpmn:incoming>
<bpmn:incoming>Flow_01ww1sb</bpmn:incoming>
<bpmn:outgoing>Flow_0hnc6m8</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_03ejtw4" sourceRef="Activity_0dkzkil" targetRef="Activity_0oc1yi6" />
<bpmn:businessRuleTask id="Activity_0dkzkil" name="decide on price">
<bpmn:extensionElements>
<spiffworkflow:calledDecisionId>decision_1</spiffworkflow:calledDecisionId>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0hnc6m8</bpmn:incoming>
<bpmn:outgoing>Flow_03ejtw4</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:sequenceFlow id="Flow_0q3tgeu" sourceRef="Activity_0oc1yi6" targetRef="Activity_0sriz81" />
<bpmn:scriptTask id="Activity_0oc1yi6" name="calculate total">
<bpmn:extensionElements>
<spiffworkflow:unitTests>
<spiffworkflow:unitTest id="simple_test">
<spiffworkflow:inputJson>{
"toppings": [
"pepperoni",
"onions"
],
"base_price": 10.99,
"pizza_size": "medium",
"topping_price": 1.25
}</spiffworkflow:inputJson>
<spiffworkflow:expectedOutputJson>{
"toppings": [
"pepperoni",
"onions"
],
"base_price": 10.99,
"pizza_size": "medium",
"topping_price": 1.25,
"total_price": 13.49
}</spiffworkflow:expectedOutputJson>
</spiffworkflow:unitTest>
</spiffworkflow:unitTests>
</bpmn:extensionElements>
<bpmn:incoming>Flow_03ejtw4</bpmn:incoming>
<bpmn:outgoing>Flow_0q3tgeu</bpmn:outgoing>
<bpmn:script>total_price = base_price + topping_price * len(toppings)</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_1ig3g9x" sourceRef="Activity_0sriz81" targetRef="Activity_1fofxq6" />
<bpmn:manualTask id="Activity_0sriz81" name="Confirm my order">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser># Please confirm your order
* Pizza Size: {{pizza_size}}
* Toppings: {{toppings}}
* Total Price: {{total_price}}
</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0q3tgeu</bpmn:incoming>
<bpmn:outgoing>Flow_1ig3g9x</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:boundaryEvent id="Event_1vlvm04" attachedToRef="Activity_0sriz81">
<bpmn:extensionElements>
<spiffworkflow:signalButtonLabel>Change My Order</spiffworkflow:signalButtonLabel>
</bpmn:extensionElements>
<bpmn:outgoing>Flow_01ww1sb</bpmn:outgoing>
<bpmn:signalEventDefinition id="SignalEventDefinition_0ph3nuo" />
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id="Flow_01ww1sb" sourceRef="Event_1vlvm04" targetRef="Activity_0mxov5f" />
<bpmn:sequenceFlow id="Flow_10gazda" sourceRef="Activity_1fofxq6" targetRef="Event_0vp0rkm" />
<bpmn:subProcess id="Activity_1fofxq6" name="Collect Payment">
<bpmn:incoming>Flow_1ig3g9x</bpmn:incoming>
<bpmn:outgoing>Flow_10gazda</bpmn:outgoing>
<bpmn:startEvent id="Event_1f68yjs">
<bpmn:outgoing>Flow_110qsz5</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_110qsz5" sourceRef="Event_1f68yjs" targetRef="Activity_1w4r58z" />
<bpmn:sequenceFlow id="Flow_00ljuet" sourceRef="Activity_1w4r58z" targetRef="Gateway_09zbjb8" />
<bpmn:userTask id="Activity_1w4r58z" name="Select payment type">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="payment_type-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="payment_type-uischema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_110qsz5</bpmn:incoming>
<bpmn:outgoing>Flow_00ljuet</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_09zbjb8" default="Flow_1pf2knh">
<bpmn:incoming>Flow_00ljuet</bpmn:incoming>
<bpmn:outgoing>Flow_1xho001</bpmn:outgoing>
<bpmn:outgoing>Flow_1pf2knh</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1xho001" sourceRef="Gateway_09zbjb8" targetRef="Activity_0dzf98z">
<bpmn:conditionExpression>payment_type=="credit"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1pf2knh" sourceRef="Gateway_09zbjb8" targetRef="Activity_1gc5the" />
<bpmn:exclusiveGateway id="Gateway_1x68e35">
<bpmn:incoming>Flow_1ke7ohm</bpmn:incoming>
<bpmn:incoming>Flow_0pji2ij</bpmn:incoming>
<bpmn:outgoing>Flow_19473lv</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1ke7ohm" sourceRef="Activity_0dzf98z" targetRef="Gateway_1x68e35" />
<bpmn:sequenceFlow id="Flow_0pji2ij" sourceRef="Activity_1gc5the" targetRef="Gateway_1x68e35" />
<bpmn:endEvent id="Event_0z85qql">
<bpmn:incoming>Flow_19473lv</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_19473lv" sourceRef="Gateway_1x68e35" targetRef="Event_0z85qql" />
<bpmn:manualTask id="Activity_0dzf98z" name="Credit">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser># Credit
Please enter your credit card details below ....
(no not really!)</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1xho001</bpmn:incoming>
<bpmn:outgoing>Flow_1ke7ohm</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:manualTask id="Activity_1gc5the" name="Paypal">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser># PayPal
Please enter your paypal login details below ....
(no not really!)</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1pf2knh</bpmn:incoming>
<bpmn:outgoing>Flow_0pji2ij</bpmn:outgoing>
</bpmn:manualTask>
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_kpyinm0">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="-48" y="-88" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0sbya7m_di" bpmnElement="Activity_0tl6534">
<dc:Bounds x="40" y="-110" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0vp0rkm_di" bpmnElement="Event_0vp0rkm">
<dc:Bounds x="1002" y="-88" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1h9u75p_di" bpmnElement="Activity_0mxov5f">
<dc:Bounds x="190" y="-110" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1wi33ah_di" bpmnElement="Activity_0dkzkil">
<dc:Bounds x="350" y="-110" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_014yvyt_di" bpmnElement="Activity_0oc1yi6">
<dc:Bounds x="500" y="-110" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_050yf8n_di" bpmnElement="Activity_0sriz81">
<dc:Bounds x="660" y="-110" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0b0rr6k_di" bpmnElement="Activity_1fofxq6">
<dc:Bounds x="830" y="-110" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ymnqzi_di" bpmnElement="Event_1vlvm04">
<dc:Bounds x="712" y="-48" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_04q7hj8_di" bpmnElement="Flow_04q7hj8">
<di:waypoint x="-12" y="-70" />
<di:waypoint x="40" y="-70" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_10nx10l_di" bpmnElement="Flow_10nx10l">
<di:waypoint x="140" y="-70" />
<di:waypoint x="190" y="-70" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0hnc6m8_di" bpmnElement="Flow_0hnc6m8">
<di:waypoint x="290" y="-70" />
<di:waypoint x="350" y="-70" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_03ejtw4_di" bpmnElement="Flow_03ejtw4">
<di:waypoint x="450" y="-70" />
<di:waypoint x="500" y="-70" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0q3tgeu_di" bpmnElement="Flow_0q3tgeu">
<di:waypoint x="600" y="-70" />
<di:waypoint x="660" y="-70" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1ig3g9x_di" bpmnElement="Flow_1ig3g9x">
<di:waypoint x="760" y="-70" />
<di:waypoint x="830" y="-70" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_01ww1sb_di" bpmnElement="Flow_01ww1sb">
<di:waypoint x="730" y="-12" />
<di:waypoint x="730" y="90" />
<di:waypoint x="240" y="90" />
<di:waypoint x="240" y="-30" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_10gazda_di" bpmnElement="Flow_10gazda">
<di:waypoint x="930" y="-70" />
<di:waypoint x="1002" y="-70" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<bpmndi:BPMNDiagram id="BPMNDiagram_1s18aym">
<bpmndi:BPMNPlane id="BPMNPlane_0hh6g7s" bpmnElement="Activity_1fofxq6">
<bpmndi:BPMNShape id="Event_1f68yjs_di" bpmnElement="Event_1f68yjs">
<dc:Bounds x="112" y="252" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1vym88w_di" bpmnElement="Activity_1w4r58z">
<dc:Bounds x="200" y="230" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_09zbjb8_di" bpmnElement="Gateway_09zbjb8" isMarkerVisible="true">
<dc:Bounds x="355" y="245" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1x68e35_di" bpmnElement="Gateway_1x68e35" isMarkerVisible="true">
<dc:Bounds x="585" y="245" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0z85qql_di" bpmnElement="Event_0z85qql">
<dc:Bounds x="872" y="252" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1v6yqch_di" bpmnElement="Activity_0dzf98z">
<dc:Bounds x="450" y="120" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0ndv32g_di" bpmnElement="Activity_1gc5the">
<dc:Bounds x="450" y="330" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_110qsz5_di" bpmnElement="Flow_110qsz5">
<di:waypoint x="148" y="270" />
<di:waypoint x="200" y="270" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_00ljuet_di" bpmnElement="Flow_00ljuet">
<di:waypoint x="300" y="270" />
<di:waypoint x="355" y="270" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1xho001_di" bpmnElement="Flow_1xho001">
<di:waypoint x="380" y="245" />
<di:waypoint x="380" y="160" />
<di:waypoint x="450" y="160" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1pf2knh_di" bpmnElement="Flow_1pf2knh">
<di:waypoint x="380" y="295" />
<di:waypoint x="380" y="370" />
<di:waypoint x="450" y="370" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1ke7ohm_di" bpmnElement="Flow_1ke7ohm">
<di:waypoint x="550" y="160" />
<di:waypoint x="610" y="160" />
<di:waypoint x="610" y="245" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0pji2ij_di" bpmnElement="Flow_0pji2ij">
<di:waypoint x="550" y="370" />
<di:waypoint x="610" y="370" />
<di:waypoint x="610" y="295" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_19473lv_di" bpmnElement="Flow_19473lv">
<di:waypoint x="635" y="270" />
<di:waypoint x="872" y="270" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>