mirror of
https://github.com/sartography/sample-process-models.git
synced 2025-02-23 21:28:05 +00:00
206 lines
11 KiB
XML
206 lines
11 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="Proccess_u0brn8z" isExecutable="true">
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
<bpmn:outgoing>Flow_0vkhjsx</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:sequenceFlow id="Flow_0vkhjsx" sourceRef="StartEvent_1" targetRef="Activity_07ukzg7" />
|
|
<bpmn:sequenceFlow id="Flow_18da78l" sourceRef="Activity_07ukzg7" targetRef="Activity_14fy1ti" />
|
|
<bpmn:endEvent id="Event_0k6yta0">
|
|
<bpmn:incoming>Flow_1q9i4l5</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_0cklxrl" sourceRef="Activity_14fy1ti" targetRef="Activity_1kednyd" />
|
|
<bpmn:scriptTask id="Activity_07ukzg7" name="Set Record" scriptFormat="python">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:unitTests>
|
|
<spiffworkflow:unitTest id="ScriptUnitTest_1mb67h7">
|
|
<spiffworkflow:inputJson>{}</spiffworkflow:inputJson>
|
|
<spiffworkflow:expectedOutputJson> {"inoice":{"contributorId":"999","contributorName":"Dan Funk","dueDate":"12/24/2023","invoiceAmount":100,"invoiceCurrency":"USD","invoiceId":"111"}</spiffworkflow:expectedOutputJson>
|
|
</spiffworkflow:unitTest>
|
|
</spiffworkflow:unitTests>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0vkhjsx</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_18da78l</bpmn:outgoing>
|
|
<bpmn:script>invoice = {
|
|
'contributorName': 'Dan Funk',
|
|
'contributorId': 999,
|
|
'invoiceId': 111,
|
|
'invoiceAmount': 100.00,
|
|
'invoiceCurrency': 'USD',
|
|
'dueDate':'12/24/2023'
|
|
}
|
|
</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:serviceTask id="Activity_14fy1ti" name="Save Record">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:serviceTaskOperator id="aws/AddDynamoItem" resultVariable="add-response">
|
|
<spiffworkflow:parameters>
|
|
<spiffworkflow:parameter id="item_data" type="str" value="{ "ContributorName": invoice.contributorName, "ContributorId": invoice.contributorId, "InvoiceId": invoice.invoiceId, "InvoiceAmount": invoice.invoiceAmount, "InvoiceCurrency": invoice.invoiceCurrency, "DueDate": invoice.dueDate }" />
|
|
<spiffworkflow:parameter id="table_name" type="str" value="'Invoice'" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_18da78l</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0cklxrl</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:sequenceFlow id="Flow_0p7k4j0" sourceRef="Activity_1kednyd" targetRef="Activity_0xh3sa7" />
|
|
<bpmn:serviceTask id="Activity_1kednyd" name="Query Record">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:serviceTaskOperator id="aws/QueryDynamoTable" resultVariable="query_result">
|
|
<spiffworkflow:parameters>
|
|
<spiffworkflow:parameter id="partition_key" type="str" value="invoice.contributorId" />
|
|
<spiffworkflow:parameter id="sort_key" type="str" value="invoice.invoiceId" />
|
|
<spiffworkflow:parameter id="table_name" type="str" value="'Invoice'" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0cklxrl</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0p7k4j0</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:sequenceFlow id="Flow_1q9i4l5" sourceRef="Activity_0xh3sa7" targetRef="Event_0k6yta0" />
|
|
<bpmn:subProcess id="Activity_0xh3sa7" name="Do Sub-Process">
|
|
<bpmn:incoming>Flow_0p7k4j0</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1q9i4l5</bpmn:outgoing>
|
|
<bpmn:scriptTask id="Activity_0ss0o73" name="Set Record" scriptFormat="python">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:unitTests>
|
|
<spiffworkflow:unitTest id="ScriptUnitTest_1mb67h7">
|
|
<spiffworkflow:inputJson>{}</spiffworkflow:inputJson>
|
|
<spiffworkflow:expectedOutputJson> {"inoice":{"contributorId":"999","contributorName":"Dan Funk","dueDate":"12/24/2023","invoiceAmount":100,"invoiceCurrency":"USD","invoiceId":"111"}</spiffworkflow:expectedOutputJson>
|
|
</spiffworkflow:unitTest>
|
|
</spiffworkflow:unitTests>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1pptdsc</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1lxw2cc</bpmn:outgoing>
|
|
<bpmn:script>invoice = {
|
|
'contributorName': 'Dan Funk',
|
|
'contributorId': 999,
|
|
'invoiceId': 113,
|
|
'invoiceAmount': 1000.00,
|
|
'invoiceCurrency': 'USD',
|
|
'dueDate':'12/25/2023'
|
|
}
|
|
</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:serviceTask id="Activity_0y8sxvy" name="Save Record">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:serviceTaskOperator id="aws/AddDynamoItem" resultVariable="sub-add-response">
|
|
<spiffworkflow:parameters>
|
|
<spiffworkflow:parameter id="item_data" type="str" value="{ "ContributorName": invoice.contributorName, "ContributorId": invoice.contributorId, "InvoiceId": invoice.invoiceId, "InvoiceAmount": invoice.invoiceAmount, "InvoiceCurrency": invoice.invoiceCurrency, "DueDate": invoice.dueDate }" />
|
|
<spiffworkflow:parameter id="table_name" type="str" value="'Invoice'" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1lxw2cc</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1b5um7s</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:serviceTask id="Activity_0n8ix96" name="Query Record">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:serviceTaskOperator id="aws/QueryDynamoTable" resultVariable="sub-query_result">
|
|
<spiffworkflow:parameters>
|
|
<spiffworkflow:parameter id="partition_key" type="str" value="invoice.contributorId" />
|
|
<spiffworkflow:parameter id="sort_key" type="str" value="invoice.invoiceId" />
|
|
<spiffworkflow:parameter id="table_name" type="str" value="'Invoice'" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1b5um7s</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0vcwfu4</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:sequenceFlow id="Flow_1lxw2cc" sourceRef="Activity_0ss0o73" targetRef="Activity_0y8sxvy" />
|
|
<bpmn:sequenceFlow id="Flow_1b5um7s" sourceRef="Activity_0y8sxvy" targetRef="Activity_0n8ix96" />
|
|
<bpmn:startEvent id="Event_027u0kd">
|
|
<bpmn:outgoing>Flow_1pptdsc</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:sequenceFlow id="Flow_1pptdsc" sourceRef="Event_027u0kd" targetRef="Activity_0ss0o73" />
|
|
<bpmn:endEvent id="Event_02txdah">
|
|
<bpmn:incoming>Flow_0vcwfu4</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_0vcwfu4" sourceRef="Activity_0n8ix96" targetRef="Event_02txdah" />
|
|
</bpmn:subProcess>
|
|
</bpmn:process>
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Proccess_u0brn8z">
|
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
<dc:Bounds x="122" y="182" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0k6yta0_di" bpmnElement="Event_0k6yta0">
|
|
<dc:Bounds x="942" y="182" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0cfg4ai_di" bpmnElement="Activity_07ukzg7">
|
|
<dc:Bounds x="210" y="160" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0nbdq9m_di" bpmnElement="Activity_14fy1ti">
|
|
<dc:Bounds x="370" y="160" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1nrdz4d_di" bpmnElement="Activity_1kednyd">
|
|
<dc:Bounds x="530" y="160" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_00oblrv_di" bpmnElement="Activity_0xh3sa7">
|
|
<dc:Bounds x="710" y="160" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="Flow_0vkhjsx_di" bpmnElement="Flow_0vkhjsx">
|
|
<di:waypoint x="158" y="200" />
|
|
<di:waypoint x="210" y="200" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_18da78l_di" bpmnElement="Flow_18da78l">
|
|
<di:waypoint x="310" y="200" />
|
|
<di:waypoint x="370" y="200" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0cklxrl_di" bpmnElement="Flow_0cklxrl">
|
|
<di:waypoint x="470" y="200" />
|
|
<di:waypoint x="530" y="200" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0p7k4j0_di" bpmnElement="Flow_0p7k4j0">
|
|
<di:waypoint x="630" y="200" />
|
|
<di:waypoint x="710" y="200" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1q9i4l5_di" bpmnElement="Flow_1q9i4l5">
|
|
<di:waypoint x="810" y="200" />
|
|
<di:waypoint x="942" y="200" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_0xx91fw">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1ka2ogk" bpmnElement="Activity_0xh3sa7">
|
|
<bpmndi:BPMNShape id="BPMNShape_1hnpkmt" bpmnElement="Activity_0ss0o73">
|
|
<dc:Bounds x="240" y="150" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="BPMNShape_19usu0r" bpmnElement="Activity_0y8sxvy">
|
|
<dc:Bounds x="400" y="150" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="BPMNShape_0qabtuk" bpmnElement="Activity_0n8ix96">
|
|
<dc:Bounds x="560" y="150" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_027u0kd_di" bpmnElement="Event_027u0kd">
|
|
<dc:Bounds x="122" y="172" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_02txdah_di" bpmnElement="Event_02txdah">
|
|
<dc:Bounds x="722" y="172" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="BPMNEdge_0bcc9c2" bpmnElement="Flow_1lxw2cc">
|
|
<di:waypoint x="340" y="190" />
|
|
<di:waypoint x="400" y="190" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="BPMNEdge_1j4lsjn" bpmnElement="Flow_1b5um7s">
|
|
<di:waypoint x="500" y="190" />
|
|
<di:waypoint x="560" y="190" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1pptdsc_di" bpmnElement="Flow_1pptdsc">
|
|
<di:waypoint x="158" y="190" />
|
|
<di:waypoint x="240" y="190" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0vcwfu4_di" bpmnElement="Flow_0vcwfu4">
|
|
<di:waypoint x="660" y="190" />
|
|
<di:waypoint x="722" y="190" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn:definitions>
|