demo-process-models/playground/tencent/spiffducks/ducks.bpmn

145 lines
7.8 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1ntgj7m" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:process id="duck_process" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="interview_client" />
<bpmn:sequenceFlow id="Flow_2" sourceRef="interview_client" targetRef="Activity_1jz3ih0" />
<bpmn:endEvent id="Event_0fj8eo7">
<bpmn:incoming>Flow_4</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_4" sourceRef="Activity_0fmjk85" targetRef="Event_0fj8eo7" />
<bpmn:userTask id="interview_client" name="Interview Client" camunda:formKey="duck_application">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="variety" label="What is your favorite kind of duck?" type="enum">
<camunda:value id="Mallard" name="Mallard" />
<camunda:value id="Wood_Duck" name="Wood Duck" />
<camunda:value id="Widgeon" name="Widgeon" />
<camunda:value id="Dead" name="Dead ducks" />
</camunda:formField>
<camunda:formField id="tolerant" label="I don&#39;t mind finding feathers and eggs in my home." type="boolean" />
</camunda:formData>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="interview-client-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="interview-client-uischema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_2</bpmn:outgoing>
</bpmn:userTask>
<bpmn:scriptTask id="Activity_0fmjk85" name="Deliver&#10;real Duck">
<bpmn:incoming>Flow_06xo1t0</bpmn:incoming>
<bpmn:outgoing>Flow_4</bpmn:outgoing>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="Gateway_0vqsmxy" name="will real duck be&#10; safe?">
<bpmn:incoming>Flow_1olpa6l</bpmn:incoming>
<bpmn:outgoing>Flow_06xo1t0</bpmn:outgoing>
<bpmn:outgoing>Flow_0wkvu0e</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_06xo1t0" name="is_safe == True" sourceRef="Gateway_0vqsmxy" targetRef="Activity_0fmjk85">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">is_safe == True</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0wkvu0e" name="is_safe == False" sourceRef="Gateway_0vqsmxy" targetRef="Activity_0mwove7">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">is_safe == False</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="Event_1pkdfjl">
<bpmn:incoming>Flow_0wmf1w5</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0wmf1w5" sourceRef="Activity_0mwove7" targetRef="Event_1pkdfjl" />
<bpmn:sequenceFlow id="Flow_1olpa6l" sourceRef="Activity_1jz3ih0" targetRef="Gateway_0vqsmxy" />
<bpmn:scriptTask id="Activity_1jz3ih0" name="Determine Duck Worthiness">
<bpmn:incoming>Flow_2</bpmn:incoming>
<bpmn:outgoing>Flow_1olpa6l</bpmn:outgoing>
<bpmn:script>if not tolerant or variety == 'Dead':
is_safe = False
else:
is_safe = True
</bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="Activity_0mwove7" name="Deliver Decoy Duck">
<bpmn:incoming>Flow_0wkvu0e</bpmn:incoming>
<bpmn:outgoing>Flow_0wmf1w5</bpmn:outgoing>
</bpmn:scriptTask>
<bpmn:textAnnotation id="TextAnnotation_1183juq">
<bpmn:text>Receive Request for Duck</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_1ae1me3" sourceRef="StartEvent_1" targetRef="TextAnnotation_1183juq" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="duck_process">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="152" y="192" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0fj8eo7_di" bpmnElement="Event_0fj8eo7">
<dc:Bounds x="832" y="132" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1n58cog_di" bpmnElement="interview_client">
<dc:Bounds x="230" y="170" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_127rgpv_di" bpmnElement="Activity_0fmjk85">
<dc:Bounds x="650" y="110" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0vqsmxy_di" bpmnElement="Gateway_0vqsmxy" isMarkerVisible="true">
<dc:Bounds x="515" y="185" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="575" y="196" width="78" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1pkdfjl_di" bpmnElement="Event_1pkdfjl">
<dc:Bounds x="832" y="262" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0i9k91k_di" bpmnElement="Activity_1jz3ih0">
<dc:Bounds x="370" y="170" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1jv20eg_di" bpmnElement="Activity_0mwove7">
<dc:Bounds x="650" y="240" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="TextAnnotation_1183juq_di" bpmnElement="TextAnnotation_1183juq">
<dc:Bounds x="250" y="80" width="100" height="54" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0k4fjav_di" bpmnElement="Flow_1">
<di:waypoint x="188" y="210" />
<di:waypoint x="230" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_05jq9uf_di" bpmnElement="Flow_2">
<di:waypoint x="330" y="210" />
<di:waypoint x="370" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_10fi2h2_di" bpmnElement="Flow_4">
<di:waypoint x="750" y="150" />
<di:waypoint x="832" y="150" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06xo1t0_di" bpmnElement="Flow_06xo1t0">
<di:waypoint x="540" y="185" />
<di:waypoint x="540" y="150" />
<di:waypoint x="650" y="150" />
<bpmndi:BPMNLabel>
<dc:Bounds x="552" y="133" width="77" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wkvu0e_di" bpmnElement="Flow_0wkvu0e">
<di:waypoint x="540" y="235" />
<di:waypoint x="540" y="280" />
<di:waypoint x="650" y="280" />
<bpmndi:BPMNLabel>
<dc:Bounds x="549" y="283" width="81" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wmf1w5_di" bpmnElement="Flow_0wmf1w5">
<di:waypoint x="750" y="280" />
<di:waypoint x="832" y="280" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1olpa6l_di" bpmnElement="Flow_1olpa6l">
<di:waypoint x="470" y="210" />
<di:waypoint x="515" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Association_1ae1me3_di" bpmnElement="Association_1ae1me3">
<di:waypoint x="184" y="199" />
<di:waypoint x="262" y="134" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>