sample-process-models/misc/shared/enumerations/enumerations.bpmn

267 lines
14 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="Sharred_Enumeration_Table" name="Sharred: Enumeration Table" isExecutable="true">
<bpmn:manualTask id="Activity_18npi29" name="Show Records">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser>Enumerations:
-----------------
| value | label |
|-----|------|
{% for enumeration in enumerations.Items %}
| {{value}} | {{label}} |
{% endfor %}
</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
</bpmn:manualTask>
<bpmn:callActivity id="Call_Shared_Build_Enum_List_from_AWS" name="Call Shared: Build Enum List from AWS" calledElement="Shared_Build_Enum_List_from_AWS">
<bpmn:extensionElements>
<spiffworkflow:preScript>whichSubject = "Enumeration"
addNew = True</spiffworkflow:preScript>
</bpmn:extensionElements>
<bpmn:incoming>Flow_07a2oxo</bpmn:incoming>
<bpmn:incoming>Flow_1nenbjs</bpmn:incoming>
<bpmn:outgoing>Flow_1vvnsbc</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:userTask id="Which_Enumeration" name="Which Enumeration">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="which_enumeration-JSONSchema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0otubfa</bpmn:incoming>
<bpmn:incoming>Flow_1vvnsbc</bpmn:incoming>
<bpmn:outgoing>Flow_0d8570g</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="enumeration_user_task" name="Add Enumeration">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="enumeration-JSONSchema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="enumeration-UISchema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0d8570g</bpmn:incoming>
<bpmn:incoming>Flow_06nsc7t</bpmn:incoming>
<bpmn:outgoing>Flow_0i6hbp9</bpmn:outgoing>
</bpmn:userTask>
<bpmn:scriptTask id="Set_Subject" name="Set Subject" scriptFormat="python">
<bpmn:incoming>Flow_0i6hbp9</bpmn:incoming>
<bpmn:outgoing>Flow_1xbvsd3</bpmn:outgoing>
<bpmn:script>if whichEnum == "add":
addSubject = "Enumeration"
else:
matched = [ d for d in enumerations_list if d.get('value') == whichEnum ]
addSubject = matched[0]['label'] if matched else None</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_0d8570g" sourceRef="Which_Enumeration" targetRef="enumeration_user_task" />
<bpmn:serviceTask id="Activity_1ad6wc2" name="Get Enumeration List">
<bpmn:extensionElements>
<spiffworkflow:serviceTaskOperator id="aws/QueryDynamoTable">
<spiffworkflow:parameters>
<spiffworkflow:parameter id="partition_key" type="str" value="addSubject" />
<spiffworkflow:parameter id="sort_key" type="str" value="addValue" />
<spiffworkflow:parameter id="table_name" type="str" value="&#39;Enumeration&#39;" />
</spiffworkflow:parameters>
</spiffworkflow:serviceTaskOperator>
</bpmn:extensionElements>
</bpmn:serviceTask>
<bpmn:endEvent id="Event_0d2gsze">
<bpmn:incoming>Flow_1w2k8v1</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0i6hbp9" sourceRef="enumeration_user_task" targetRef="Set_Subject" />
<bpmn:userTask id="Check_Add_Another" name="Check Add Another?">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="what_next-JSONSchema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="what_next-UISchema.json" />
</spiffworkflow:properties>
<spiffworkflow:postScript />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0lpik93</bpmn:incoming>
<bpmn:outgoing>Flow_17i0vic</bpmn:outgoing>
</bpmn:userTask>
<bpmn:startEvent id="Event_00b9bxo">
<bpmn:outgoing>Flow_07a2oxo</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_07a2oxo" sourceRef="Event_00b9bxo" targetRef="Call_Shared_Build_Enum_List_from_AWS" />
<bpmn:sequenceFlow id="Flow_17i0vic" sourceRef="Check_Add_Another" targetRef="Gateway_04hnj5e" />
<bpmn:exclusiveGateway id="Gateway_1clgwgu" name="Add another enum for the same subject" default="Flow_1u6l44m">
<bpmn:incoming>Flow_1yld5u8</bpmn:incoming>
<bpmn:outgoing>Flow_06nsc7t</bpmn:outgoing>
<bpmn:outgoing>Flow_1u6l44m</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_04hnj5e" default="Flow_1euuoyf">
<bpmn:incoming>Flow_17i0vic</bpmn:incoming>
<bpmn:outgoing>Flow_1w2k8v1</bpmn:outgoing>
<bpmn:outgoing>Flow_1euuoyf</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1w2k8v1" sourceRef="Gateway_04hnj5e" targetRef="Event_0d2gsze">
<bpmn:conditionExpression>whatNext == "Exit"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1euuoyf" sourceRef="Gateway_04hnj5e" targetRef="Reset_Value_and_Label_Variables" />
<bpmn:sequenceFlow id="Flow_06nsc7t" name="Add another enum for the same subject" sourceRef="Gateway_1clgwgu" targetRef="enumeration_user_task">
<bpmn:conditionExpression>whatNext == "Add another enum for the same subject"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_1wd2vi1" default="Flow_1nenbjs">
<bpmn:incoming>Flow_137swmd</bpmn:incoming>
<bpmn:outgoing>Flow_0otubfa</bpmn:outgoing>
<bpmn:outgoing>Flow_1nenbjs</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1u6l44m" sourceRef="Gateway_1clgwgu" targetRef="Reset_Subject_Variable" />
<bpmn:sequenceFlow id="Flow_0otubfa" name="Add an enum for another subject" sourceRef="Gateway_1wd2vi1" targetRef="Which_Enumeration">
<bpmn:conditionExpression>whatNext == "Add an enum for another subject"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1nenbjs" sourceRef="Gateway_1wd2vi1" targetRef="Call_Shared_Build_Enum_List_from_AWS" />
<bpmn:sequenceFlow id="Flow_1vvnsbc" sourceRef="Call_Shared_Build_Enum_List_from_AWS" targetRef="Which_Enumeration" />
<bpmn:sequenceFlow id="Flow_1yld5u8" sourceRef="Reset_Value_and_Label_Variables" targetRef="Gateway_1clgwgu" />
<bpmn:scriptTask id="Reset_Value_and_Label_Variables" name="Reset Value &#38; Label Variables">
<bpmn:incoming>Flow_1euuoyf</bpmn:incoming>
<bpmn:outgoing>Flow_1yld5u8</bpmn:outgoing>
<bpmn:script>addValue = ""
addLabel = ""</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_137swmd" sourceRef="Reset_Subject_Variable" targetRef="Gateway_1wd2vi1" />
<bpmn:scriptTask id="Reset_Subject_Variable" name="Reset Subject Variable">
<bpmn:incoming>Flow_1u6l44m</bpmn:incoming>
<bpmn:outgoing>Flow_137swmd</bpmn:outgoing>
<bpmn:script>addSubject = ""</bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="Add_Record" name="Add Record">
<bpmn:extensionElements>
<spiffworkflow:serviceTaskOperator id="aws/AddDynamoItem" resultVariable="resp_addEnumeration">
<spiffworkflow:parameters>
<spiffworkflow:parameter id="item_data" type="str" value="{ &#34;Subject&#34;: addSubject, &#34;Value&#34;: addValue, &#34;Label&#34;: addLabel }" />
<spiffworkflow:parameter id="table_name" type="str" value="&#39;Enumeration&#39;" />
</spiffworkflow:parameters>
</spiffworkflow:serviceTaskOperator>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1xbvsd3</bpmn:incoming>
<bpmn:outgoing>Flow_0lpik93</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_1xbvsd3" sourceRef="Set_Subject" targetRef="Add_Record" />
<bpmn:sequenceFlow id="Flow_0lpik93" sourceRef="Add_Record" targetRef="Check_Add_Another" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Sharred_Enumeration_Table">
<bpmndi:BPMNShape id="Activity_1cpupwx_di" bpmnElement="Activity_18npi29">
<dc:Bounds x="1280" y="10" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1i2gua9_di" bpmnElement="Call_Shared_Build_Enum_List_from_AWS">
<dc:Bounds x="-10" y="137" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_05qgorp_di" bpmnElement="Which_Enumeration">
<dc:Bounds x="170" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_10fjqyn_di" bpmnElement="enumeration_user_task">
<dc:Bounds x="440" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1xmj9ir_di" bpmnElement="Set_Subject">
<dc:Bounds x="610" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1oz9lvi_di" bpmnElement="Activity_1ad6wc2">
<dc:Bounds x="1110" y="10" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0d2gsze_di" bpmnElement="Event_0d2gsze">
<dc:Bounds x="1462" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_112vjvq_di" bpmnElement="Check_Add_Another">
<dc:Bounds x="960" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_00b9bxo_di" bpmnElement="Event_00b9bxo">
<dc:Bounds x="-128" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1clgwgu_di" bpmnElement="Gateway_1clgwgu" isMarkerVisible="true">
<dc:Bounds x="465" y="335" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="459" y="392" width="65" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_04hnj5e_di" bpmnElement="Gateway_04hnj5e" isMarkerVisible="true">
<dc:Bounds x="1135" y="152" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1wd2vi1_di" bpmnElement="Gateway_1wd2vi1" isMarkerVisible="true">
<dc:Bounds x="195" y="335" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_15i1l61_di" bpmnElement="Reset_Value_and_Label_Variables">
<dc:Bounds x="790" y="320" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1nc8ues_di" bpmnElement="Reset_Subject_Variable">
<dc:Bounds x="310" y="320" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0wrg2tu_di" bpmnElement="Add_Record">
<dc:Bounds x="790" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0d8570g_di" bpmnElement="Flow_0d8570g">
<di:waypoint x="270" y="177" />
<di:waypoint x="440" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0i6hbp9_di" bpmnElement="Flow_0i6hbp9">
<di:waypoint x="540" y="177" />
<di:waypoint x="610" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_07a2oxo_di" bpmnElement="Flow_07a2oxo">
<di:waypoint x="-92" y="177" />
<di:waypoint x="-10" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_17i0vic_di" bpmnElement="Flow_17i0vic">
<di:waypoint x="1060" y="177" />
<di:waypoint x="1135" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1w2k8v1_di" bpmnElement="Flow_1w2k8v1">
<di:waypoint x="1185" y="177" />
<di:waypoint x="1462" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1euuoyf_di" bpmnElement="Flow_1euuoyf">
<di:waypoint x="1160" y="202" />
<di:waypoint x="1160" y="360" />
<di:waypoint x="890" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06nsc7t_di" bpmnElement="Flow_06nsc7t">
<di:waypoint x="490" y="335" />
<di:waypoint x="490" y="217" />
<bpmndi:BPMNLabel>
<dc:Bounds x="497" y="260" width="65" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1u6l44m_di" bpmnElement="Flow_1u6l44m">
<di:waypoint x="465" y="360" />
<di:waypoint x="410" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0otubfa_di" bpmnElement="Flow_0otubfa">
<di:waypoint x="220" y="335" />
<di:waypoint x="220" y="217" />
<bpmndi:BPMNLabel>
<dc:Bounds x="229" y="266" width="82" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1nenbjs_di" bpmnElement="Flow_1nenbjs">
<di:waypoint x="195" y="360" />
<di:waypoint x="40" y="360" />
<di:waypoint x="40" y="217" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1vvnsbc_di" bpmnElement="Flow_1vvnsbc">
<di:waypoint x="90" y="177" />
<di:waypoint x="170" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1yld5u8_di" bpmnElement="Flow_1yld5u8">
<di:waypoint x="790" y="360" />
<di:waypoint x="515" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_137swmd_di" bpmnElement="Flow_137swmd">
<di:waypoint x="310" y="360" />
<di:waypoint x="245" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1xbvsd3_di" bpmnElement="Flow_1xbvsd3">
<di:waypoint x="710" y="177" />
<di:waypoint x="790" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0lpik93_di" bpmnElement="Flow_0lpik93">
<di:waypoint x="890" y="177" />
<di:waypoint x="960" y="177" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>