95 lines
4.0 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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
<bpmn:process id="Process_0gzau80">
<bpmn:startEvent id="Event_1vjz6qh">
<bpmn:outgoing>Flow_0s9r02v</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0s9r02v" sourceRef="Event_1vjz6qh" targetRef="Activity_1ooc6my" />
<bpmn:endEvent id="Event_0u1dp4v">
<bpmn:incoming>Flow_062y295</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1ntvlk6" sourceRef="Activity_1ooc6my" targetRef="Activity_0fautn6" />
<bpmn:scriptTask id="Activity_1ooc6my" name="Simple script task">
<bpmn:extensionElements>
<spiffworkflow:unitTests>
<spiffworkflow:unitTest id="ScriptUnitTest_0p4mk8g">
<spiffworkflow:inputJson>{"action": ["Netto", 11]}</spiffworkflow:inputJson>
<spiffworkflow:expectedOutputJson>{
"type": "beer",
"price": 2,
"druknen": false,
"taste": [
"crips",
"mild",
"bright"
],
"quantity": {
"Netto": 123,
"Akzenta": 999,
"DM": null
}
}</spiffworkflow:expectedOutputJson>
</spiffworkflow:unitTest>
</spiffworkflow:unitTests>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0s9r02v</bpmn:incoming>
<bpmn:outgoing>Flow_1ntvlk6</bpmn:outgoing>
<bpmn:script>#print("hello")
type = "beer"
size = 0.5
price = 2
druknen = False
taste = ["crips", "mild", "bright"]
del(size)
quantity = {"Netto": 123, "Akzenta": 999, "DM": None}
def buy(store, amount):
quantity[store] -= amount
buy(action[0], action[1])</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_062y295" sourceRef="Activity_0fautn6" targetRef="Event_0u1dp4v" />
<bpmn:userTask id="Activity_0fautn6">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="scheme-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="scheme-uischema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1ntvlk6</bpmn:incoming>
<bpmn:outgoing>Flow_062y295</bpmn:outgoing>
</bpmn:userTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0gzau80">
<bpmndi:BPMNShape id="Event_1vjz6qh_di" bpmnElement="Event_1vjz6qh">
<dc:Bounds x="252" y="162" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0r9lspl_di" bpmnElement="Activity_1ooc6my">
<dc:Bounds x="340" y="140" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0u1dp4v_di" bpmnElement="Event_0u1dp4v">
<dc:Bounds x="702" y="162" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_177pgiw_di" bpmnElement="Activity_0fautn6">
<dc:Bounds x="500" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0s9r02v_di" bpmnElement="Flow_0s9r02v">
<di:waypoint x="288" y="180" />
<di:waypoint x="340" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1ntvlk6_di" bpmnElement="Flow_1ntvlk6">
<di:waypoint x="440" y="180" />
<di:waypoint x="500" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_062y295_di" bpmnElement="Flow_062y295">
<di:waypoint x="600" y="180" />
<di:waypoint x="702" y="180" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>