mirror of
https://github.com/sartography/sample-process-models.git
synced 2025-02-23 21:28:05 +00:00
183 lines
9.6 KiB
XML
183 lines
9.6 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:serviceTask id="Activity_1cl0n43" name="Add Record">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:serviceTaskOperator id="aws/AddDynamoItem" resultVariable="enumerationsAdd">
|
|
<spiffworkflow:parameters>
|
|
<spiffworkflow:parameter id="item_data" type="str" value="{ "Subject": addSubject, "Value": addValue, "Label": addLabel }" />
|
|
<spiffworkflow:parameter id="table_name" type="str" value="'Enumeration'" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0322grc</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1pvx3ro</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:sequenceFlow id="Flow_1p5fxob" sourceRef="Call_Shared_Build_Enum_List_from_AWS" targetRef="Activity_1ig6ogz" />
|
|
<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 />
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_07a2oxo</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1p5fxob</bpmn:outgoing>
|
|
</bpmn:callActivity>
|
|
<bpmn:sequenceFlow id="Flow_148h40r" sourceRef="Activity_1ig6ogz" targetRef="Activity_0bvdyir" />
|
|
<bpmn:scriptTask id="Activity_1ig6ogz" name="Build Enum List" scriptFormat="python">
|
|
<bpmn:incoming>Flow_1p5fxob</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_148h40r</bpmn:outgoing>
|
|
<bpmn:script># Build Enum List
|
|
enumerations_items_list_cnt = enumerations["Count"]
|
|
enumerations_list = []
|
|
enumerations_list.append({'label': 'Add New', 'value': 'add'})
|
|
for n in range(0, enumerations_items_list_cnt):
|
|
enumerations_list.append({'label': enumerations_items_list[n]["Label"], 'value': enumerations_items_list[n]["Value"]})</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:userTask id="Activity_0bvdyir" name="Which Enumeration">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:properties>
|
|
<spiffworkflow:property name="formJsonSchemaFilename" value="which_enumeration-JSONSchema.json" />
|
|
</spiffworkflow:properties>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_148h40r</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:outgoing>Flow_0i6hbp9</bpmn:outgoing>
|
|
</bpmn:userTask>
|
|
<bpmn:scriptTask id="Activity_1ifnmsg" name="Set Subject" scriptFormat="python">
|
|
<bpmn:incoming>Flow_0i6hbp9</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0322grc</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="Activity_0bvdyir" targetRef="enumeration_user_task" />
|
|
<bpmn:sequenceFlow id="Flow_0322grc" sourceRef="Activity_1ifnmsg" targetRef="Activity_1cl0n43" />
|
|
<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="'Enumeration'" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
</bpmn:serviceTask>
|
|
<bpmn:endEvent id="Event_0d2gsze">
|
|
<bpmn:incoming>Flow_17i0vic</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_0i6hbp9" sourceRef="enumeration_user_task" targetRef="Activity_1ifnmsg" />
|
|
<bpmn:userTask id="Activity_0exwh7c" 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>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1pvx3ro</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_1pvx3ro" sourceRef="Activity_1cl0n43" targetRef="Activity_0exwh7c" />
|
|
<bpmn:sequenceFlow id="Flow_17i0vic" sourceRef="Activity_0exwh7c" targetRef="Event_0d2gsze" />
|
|
</bpmn:process>
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Sharred_Enumeration_Table">
|
|
<bpmndi:BPMNShape id="Activity_0k89mkq_di" bpmnElement="Activity_1cl0n43">
|
|
<dc:Bounds x="700" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1i2gua9_di" bpmnElement="Call_Shared_Build_Enum_List_from_AWS">
|
|
<dc:Bounds x="-170" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1gnw1ju_di" bpmnElement="Activity_1ig6ogz">
|
|
<dc:Bounds x="0" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_05qgorp_di" bpmnElement="Activity_0bvdyir">
|
|
<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="350" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1xmj9ir_di" bpmnElement="Activity_1ifnmsg">
|
|
<dc:Bounds x="520" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0d2gsze_di" bpmnElement="Event_0d2gsze">
|
|
<dc:Bounds x="1372" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_00b9bxo_di" bpmnElement="Event_00b9bxo">
|
|
<dc:Bounds x="-288" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1oz9lvi_di" bpmnElement="Activity_1ad6wc2">
|
|
<dc:Bounds x="1020" y="10" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1cpupwx_di" bpmnElement="Activity_18npi29">
|
|
<dc:Bounds x="1190" y="10" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_112vjvq_di" bpmnElement="Activity_0exwh7c">
|
|
<dc:Bounds x="870" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="Flow_1p5fxob_di" bpmnElement="Flow_1p5fxob">
|
|
<di:waypoint x="-70" y="177" />
|
|
<di:waypoint x="0" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_148h40r_di" bpmnElement="Flow_148h40r">
|
|
<di:waypoint x="100" y="177" />
|
|
<di:waypoint x="170" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0d8570g_di" bpmnElement="Flow_0d8570g">
|
|
<di:waypoint x="270" y="177" />
|
|
<di:waypoint x="350" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0322grc_di" bpmnElement="Flow_0322grc">
|
|
<di:waypoint x="620" y="177" />
|
|
<di:waypoint x="700" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0i6hbp9_di" bpmnElement="Flow_0i6hbp9">
|
|
<di:waypoint x="450" y="177" />
|
|
<di:waypoint x="520" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_07a2oxo_di" bpmnElement="Flow_07a2oxo">
|
|
<di:waypoint x="-252" y="177" />
|
|
<di:waypoint x="-170" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1pvx3ro_di" bpmnElement="Flow_1pvx3ro">
|
|
<di:waypoint x="800" y="177" />
|
|
<di:waypoint x="870" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_17i0vic_di" bpmnElement="Flow_17i0vic">
|
|
<di:waypoint x="970" y="177" />
|
|
<di:waypoint x="1372" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn:definitions>
|