293 lines
16 KiB
Plaintext
Raw Normal View History

<?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:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
<bpmn:collaboration id="Collaboration_FormAndLane">
<bpmn:participant id="Participant_1df0bwy" name="Item" processRef="Test_Process_aaio42599aa" />
</bpmn:collaboration>
<bpmn:process id="Test_Process_aaio42599aa" isExecutable="true">
<bpmn:laneSet id="LaneSet_06wu5sq">
<bpmn:lane id="Lane_Initiator">
<bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_GetData</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_GetReviewers</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_0l5x84t</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_Reviewer" name="Reviewer">
<bpmn:flowNodeRef>Activity_Review</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_GetMoreData</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_1chm5qn</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Event_12mvls1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Event_0er19np</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_1y0gjbb</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_1v7vc1z</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Event_0t6257a</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Event_1ul45i9</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_05avaed</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_1msk5h9</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="Activity_GetData" name="Get Data">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="get-item-info-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="get-item-info-uischema.json" />
</spiffworkflow:properties>
<spiffworkflow:preScript>current_user = get_current_user()['username']</spiffworkflow:preScript>
<spiffworkflow:instructionsForEndUser>New instrcutions</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1loqmjv</bpmn:incoming>
<bpmn:incoming>Flow_0rzj542</bpmn:incoming>
<bpmn:outgoing>Flow_0c8hg1n</bpmn:outgoing>
</bpmn:userTask>
<bpmn:scriptTask id="Activity_GetReviewers" name="Get Reviewers">
<bpmn:incoming>Flow_1msk5h9</bpmn:incoming>
<bpmn:outgoing>Flow_1loqmjv</bpmn:outgoing>
<bpmn:script>lane_owners = {"Reviewer": ["admin@spiffworkflow.org", "nelson@spiffworkflow.org"]}</bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="Gateway_0l5x84t">
<bpmn:incoming>Flow_042vla2</bpmn:incoming>
<bpmn:outgoing>Flow_0rzj542</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:userTask id="Activity_Review" name="Review">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser />
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="review-form-schema.json" />
<spiffworkflow:property name="formUiSchemaFilename" value="review-form-uischema.json" />
</spiffworkflow:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1xtmg0t</bpmn:incoming>
<bpmn:outgoing>Flow_10rvmdc</bpmn:outgoing>
</bpmn:userTask>
<bpmn:manualTask id="Activity_GetMoreData" name="Show Data">
<bpmn:extensionElements>
<spiffworkflow:properties>
<spiffworkflow:property name="formJsonSchemaFilename" value="get_more_data_form.json" />
</spiffworkflow:properties>
<spiffworkflow:preScript>data = {"item_id": itemId, "item_desc": itemName}</spiffworkflow:preScript>
<spiffworkflow:instructionsForEndUser>User entered data : {{data}}</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0c8hg1n</bpmn:incoming>
<bpmn:outgoing>Flow_1xtmg0t</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:exclusiveGateway id="Gateway_1chm5qn" default="Flow_0l3zw86">
<bpmn:incoming>Flow_10rvmdc</bpmn:incoming>
<bpmn:outgoing>Flow_1efovhl</bpmn:outgoing>
<bpmn:outgoing>Flow_19tmelr</bpmn:outgoing>
<bpmn:outgoing>Flow_0l3zw86</bpmn:outgoing>
<bpmn:outgoing>Flow_07dk6k2</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:intermediateThrowEvent id="Event_12mvls1" name="Need More Info">
<bpmn:incoming>Flow_0l3zw86</bpmn:incoming>
<bpmn:outgoing>Flow_12ty548</bpmn:outgoing>
</bpmn:intermediateThrowEvent>
<bpmn:intermediateThrowEvent id="Event_0er19np" name="Reject">
<bpmn:incoming>Flow_19tmelr</bpmn:incoming>
<bpmn:outgoing>Flow_0zg89xt</bpmn:outgoing>
</bpmn:intermediateThrowEvent>
<bpmn:exclusiveGateway id="Gateway_1y0gjbb">
<bpmn:incoming>Flow_05xruvm</bpmn:incoming>
<bpmn:incoming>Flow_0zg89xt</bpmn:incoming>
<bpmn:incoming>Flow_12ty548</bpmn:incoming>
<bpmn:outgoing>Flow_1ohb8ht</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_1v7vc1z">
<bpmn:incoming>Flow_1ohb8ht</bpmn:incoming>
<bpmn:outgoing>Flow_042vla2</bpmn:outgoing>
<bpmn:outgoing>Flow_1sl1a5o</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:intermediateThrowEvent id="Event_0t6257a" name="Approve">
<bpmn:incoming>Flow_1efovhl</bpmn:incoming>
<bpmn:outgoing>Flow_05xruvm</bpmn:outgoing>
</bpmn:intermediateThrowEvent>
<bpmn:endEvent id="Event_1ul45i9" name="Cancelled&#10;">
<bpmn:incoming>Flow_07dk6k2</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1msk5h9" sourceRef="StartEvent_1" targetRef="Activity_GetReviewers" />
<bpmn:sequenceFlow id="Flow_1loqmjv" sourceRef="Activity_GetReviewers" targetRef="Activity_GetData" />
<bpmn:sequenceFlow id="Flow_0rzj542" sourceRef="Gateway_0l5x84t" targetRef="Activity_GetData" />
<bpmn:sequenceFlow id="Flow_0c8hg1n" sourceRef="Activity_GetData" targetRef="Activity_GetMoreData" />
<bpmn:sequenceFlow id="Flow_042vla2" sourceRef="Gateway_1v7vc1z" targetRef="Gateway_0l5x84t">
<bpmn:conditionExpression>approval == "Needmoreinfo"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1xtmg0t" sourceRef="Activity_GetMoreData" targetRef="Activity_Review" />
<bpmn:sequenceFlow id="Flow_10rvmdc" sourceRef="Activity_Review" targetRef="Gateway_1chm5qn" />
<bpmn:sequenceFlow id="Flow_1efovhl" sourceRef="Gateway_1chm5qn" targetRef="Event_0t6257a">
<bpmn:conditionExpression>approval == "Approve"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_19tmelr" sourceRef="Gateway_1chm5qn" targetRef="Event_0er19np">
<bpmn:conditionExpression>approval == "Reject"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0l3zw86" sourceRef="Gateway_1chm5qn" targetRef="Event_12mvls1" />
<bpmn:sequenceFlow id="Flow_07dk6k2" sourceRef="Gateway_1chm5qn" targetRef="Event_1ul45i9" />
<bpmn:sequenceFlow id="Flow_12ty548" sourceRef="Event_12mvls1" targetRef="Gateway_1y0gjbb" />
<bpmn:sequenceFlow id="Flow_0zg89xt" sourceRef="Event_0er19np" targetRef="Gateway_1y0gjbb" />
<bpmn:sequenceFlow id="Flow_05xruvm" sourceRef="Event_0t6257a" targetRef="Gateway_1y0gjbb" />
<bpmn:sequenceFlow id="Flow_1ohb8ht" sourceRef="Gateway_1y0gjbb" targetRef="Gateway_1v7vc1z" />
<bpmn:serviceTask id="Activity_05avaed" name="Get Github user">
<bpmn:extensionElements>
<spiffworkflow:serviceTaskOperator id="http/GetRequestV2" resultVariable="gtiResponse">
<spiffworkflow:parameters>
<spiffworkflow:parameter id="url" type="str" value="&#34;https://api.github.com/user&#34;" />
<spiffworkflow:parameter id="headers" type="any" value="{ &#34;Authorization&#34;: &#34;Bearer SPIFF_SECRET:github_oauth&#34; }" />
<spiffworkflow:parameter id="params" type="any" />
<spiffworkflow:parameter id="basic_auth_username" type="str" />
<spiffworkflow:parameter id="basic_auth_password" type="str" />
<spiffworkflow:parameter id="attempts" type="int" />
</spiffworkflow:parameters>
</spiffworkflow:serviceTaskOperator>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1sl1a5o</bpmn:incoming>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_1sl1a5o" sourceRef="Gateway_1v7vc1z" targetRef="Activity_05avaed" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_FormAndLane">
<bpmndi:BPMNShape id="Participant_1df0bwy_di" bpmnElement="Participant_1df0bwy" isHorizontal="true">
<dc:Bounds x="-440" y="90" width="1861" height="535" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1vcali6_di" bpmnElement="Lane_Initiator" isHorizontal="true">
<dc:Bounds x="-410" y="90" width="1831" height="188" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_10r7fce_di" bpmnElement="Lane_Reviewer" isHorizontal="true">
<dc:Bounds x="-410" y="278" width="1831" height="347" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="-390" y="166" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1r64ucz_di" bpmnElement="Activity_GetData">
<dc:Bounds x="-139" y="144" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_07hx4o8_di" bpmnElement="Activity_GetReviewers">
<dc:Bounds x="-299" y="144" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0l5x84t_di" bpmnElement="Gateway_0l5x84t" isMarkerVisible="true">
<dc:Bounds x="46" y="159" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0bf7hpx_di" bpmnElement="Activity_Review">
<dc:Bounds x="-219" y="345" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_16xsdrr_di" bpmnElement="Activity_GetMoreData">
<dc:Bounds x="-369" y="345" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1chm5qn_di" bpmnElement="Gateway_1chm5qn" isMarkerVisible="true">
<dc:Bounds x="-86" y="360" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_12mvls1_di" bpmnElement="Event_12mvls1">
<dc:Bounds x="13" y="437" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="-6" y="480" width="76" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0er19np_di" bpmnElement="Event_0er19np">
<dc:Bounds x="13" y="367" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="15" y="410" width="33" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1y0gjbb_di" bpmnElement="Gateway_1y0gjbb" isMarkerVisible="true">
<dc:Bounds x="76" y="360" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1v7vc1z_di" bpmnElement="Gateway_1v7vc1z" isMarkerVisible="true">
<dc:Bounds x="156" y="360" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0t6257a_di" bpmnElement="Event_0t6257a">
<dc:Bounds x="13" y="306" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="11" y="349" width="40" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1ul45i9_di" bpmnElement="Event_1ul45i9">
<dc:Bounds x="-117" y="497" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="-123" y="540" width="49" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1ir3y0q_di" bpmnElement="Activity_05avaed">
<dc:Bounds x="250" y="345" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1msk5h9_di" bpmnElement="Flow_1msk5h9">
<di:waypoint x="-354" y="184" />
<di:waypoint x="-299" y="184" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1loqmjv_di" bpmnElement="Flow_1loqmjv">
<di:waypoint x="-199" y="184" />
<di:waypoint x="-139" y="184" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0rzj542_di" bpmnElement="Flow_0rzj542">
<di:waypoint x="46" y="184" />
<di:waypoint x="-39" y="184" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0c8hg1n_di" bpmnElement="Flow_0c8hg1n">
<di:waypoint x="-89" y="224" />
<di:waypoint x="-89" y="285" />
<di:waypoint x="-319" y="285" />
<di:waypoint x="-319" y="345" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_042vla2_di" bpmnElement="Flow_042vla2">
<di:waypoint x="181" y="360" />
<di:waypoint x="181" y="184" />
<di:waypoint x="96" y="184" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1xtmg0t_di" bpmnElement="Flow_1xtmg0t">
<di:waypoint x="-269" y="385" />
<di:waypoint x="-219" y="385" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_10rvmdc_di" bpmnElement="Flow_10rvmdc">
<di:waypoint x="-119" y="385" />
<di:waypoint x="-86" y="385" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1efovhl_di" bpmnElement="Flow_1efovhl">
<di:waypoint x="-61" y="360" />
<di:waypoint x="-61" y="324" />
<di:waypoint x="13" y="324" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_19tmelr_di" bpmnElement="Flow_19tmelr">
<di:waypoint x="-36" y="385" />
<di:waypoint x="13" y="385" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0l3zw86_di" bpmnElement="Flow_0l3zw86">
<di:waypoint x="-61" y="410" />
<di:waypoint x="-61" y="455" />
<di:waypoint x="13" y="455" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_07dk6k2_di" bpmnElement="Flow_07dk6k2">
<di:waypoint x="-61" y="410" />
<di:waypoint x="-61" y="459" />
<di:waypoint x="-99" y="459" />
<di:waypoint x="-99" y="497" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_12ty548_di" bpmnElement="Flow_12ty548">
<di:waypoint x="49" y="455" />
<di:waypoint x="101" y="455" />
<di:waypoint x="101" y="410" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0zg89xt_di" bpmnElement="Flow_0zg89xt">
<di:waypoint x="49" y="385" />
<di:waypoint x="76" y="385" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_05xruvm_di" bpmnElement="Flow_05xruvm">
<di:waypoint x="49" y="324" />
<di:waypoint x="101" y="324" />
<di:waypoint x="101" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1ohb8ht_di" bpmnElement="Flow_1ohb8ht">
<di:waypoint x="126" y="385" />
<di:waypoint x="156" y="385" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1sl1a5o_di" bpmnElement="Flow_1sl1a5o">
<di:waypoint x="206" y="385" />
<di:waypoint x="250" y="385" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>