2022-12-22 20:27:55 +00:00
|
|
|
<?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="5.6.0">
|
|
|
|
<bpmn:process id="SR-User_Info" name="Shared Resources: User Info" isExecutable="true">
|
|
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
|
|
<bpmn:outgoing>Flow_1q8xtg6</bpmn:outgoing>
|
|
|
|
</bpmn:startEvent>
|
2022-12-22 21:12:32 +00:00
|
|
|
<bpmn:sequenceFlow id="Flow_1q8xtg6" sourceRef="StartEvent_1" targetRef="Activity_1fkr6s9" />
|
2022-12-22 20:27:55 +00:00
|
|
|
<bpmn:businessRuleTask id="Activity_0v13afu" name="Get User Info">
|
|
|
|
<bpmn:extensionElements>
|
2022-12-22 20:33:18 +00:00
|
|
|
<spiffworkflow:calledDecisionId>SR-User_Info</spiffworkflow:calledDecisionId>
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmn:extensionElements>
|
2022-12-22 21:12:32 +00:00
|
|
|
<bpmn:incoming>Flow_05s4pvl</bpmn:incoming>
|
2022-12-22 20:27:55 +00:00
|
|
|
<bpmn:outgoing>Flow_08nmyrt</bpmn:outgoing>
|
|
|
|
</bpmn:businessRuleTask>
|
|
|
|
<bpmn:endEvent id="Event_0fb034d">
|
2022-12-22 20:33:18 +00:00
|
|
|
<bpmn:incoming>Flow_1gd83n0</bpmn:incoming>
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmn:endEvent>
|
|
|
|
<bpmn:sequenceFlow id="Flow_08nmyrt" sourceRef="Activity_0v13afu" targetRef="Gateway_0xlrnzx" />
|
|
|
|
<bpmn:exclusiveGateway id="Gateway_0xlrnzx" name="Current User?" default="Flow_0i96b90">
|
|
|
|
<bpmn:incoming>Flow_08nmyrt</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>Flow_0i96b90</bpmn:outgoing>
|
|
|
|
<bpmn:outgoing>Flow_0d47w7r</bpmn:outgoing>
|
|
|
|
</bpmn:exclusiveGateway>
|
|
|
|
<bpmn:sequenceFlow id="Flow_0i96b90" name="Yes" sourceRef="Gateway_0xlrnzx" targetRef="Activity_1a9fimb" />
|
|
|
|
<bpmn:sequenceFlow id="Flow_020y0gy" sourceRef="Activity_1a9fimb" targetRef="Activity_1uw66e8" />
|
|
|
|
<bpmn:sequenceFlow id="Flow_0d47w7r" name="No" sourceRef="Gateway_0xlrnzx" targetRef="Gateway_0byohhl">
|
|
|
|
<bpmn:conditionExpression>not(isCurrentUser)</bpmn:conditionExpression>
|
|
|
|
</bpmn:sequenceFlow>
|
|
|
|
<bpmn:scriptTask id="Activity_1a9fimb" name="Update Current User Extras" scriptFormat="python">
|
|
|
|
<bpmn:incoming>Flow_0i96b90</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>Flow_020y0gy</bpmn:outgoing>
|
|
|
|
<bpmn:script># Update Current User Extras
|
|
|
|
current_user_extras = {}
|
|
|
|
current_user_extras["bamboo_api_id"] = userBambooId
|
|
|
|
current_user_extras["full_name"] = userFullName
|
|
|
|
current_user_extras["first_name"] = userFirstName
|
|
|
|
current_user_extras["email"] = userEmail
|
|
|
|
current_user_extras["time_zone"] = userTimeZone
|
|
|
|
current_user_extras["date_format"] = userDateFormat
|
|
|
|
current_user_extras["time_format"] = userTimeFormat
|
|
|
|
current_user_extras["status_key"] = userStatusKey
|
|
|
|
|
|
|
|
del(userFullName)
|
|
|
|
del (userFirstName)
|
|
|
|
del(userEmail)
|
|
|
|
del(userTimeZone)
|
|
|
|
del(userStatusKey)
|
|
|
|
del(userBambooId)
|
|
|
|
del(userDateFormat)
|
|
|
|
del(userTimeFormat)</bpmn:script>
|
|
|
|
</bpmn:scriptTask>
|
|
|
|
<bpmn:serviceTask id="Activity_1uw66e8" name="Get User Info From Bamboo">
|
|
|
|
<bpmn:extensionElements>
|
|
|
|
<spiffworkflow:serviceTaskOperator id="bamboohr/GetEmployeeInfo" resultVariable="resp_BambooUserInfo">
|
|
|
|
<spiffworkflow:parameters>
|
|
|
|
<spiffworkflow:parameter id="employee_id" type="str" value="current_user_extras["bamboo_api_id"]" />
|
|
|
|
<spiffworkflow:parameter id="fields" type="str" value="'supervisorEmail,supervisorId,supervisorEid'" />
|
|
|
|
</spiffworkflow:parameters>
|
|
|
|
</spiffworkflow:serviceTaskOperator>
|
|
|
|
</bpmn:extensionElements>
|
|
|
|
<bpmn:incoming>Flow_020y0gy</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>Flow_009u4d4</bpmn:outgoing>
|
|
|
|
</bpmn:serviceTask>
|
|
|
|
<bpmn:sequenceFlow id="Flow_009u4d4" sourceRef="Activity_1uw66e8" targetRef="Activity_1y04pbx" />
|
|
|
|
<bpmn:exclusiveGateway id="Gateway_0byohhl">
|
|
|
|
<bpmn:incoming>Flow_0d47w7r</bpmn:incoming>
|
|
|
|
<bpmn:incoming>Flow_18ri6tq</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>Flow_1gd83n0</bpmn:outgoing>
|
|
|
|
</bpmn:exclusiveGateway>
|
2022-12-22 20:33:18 +00:00
|
|
|
<bpmn:sequenceFlow id="Flow_1gd83n0" sourceRef="Gateway_0byohhl" targetRef="Event_0fb034d" />
|
2022-12-22 20:27:55 +00:00
|
|
|
<bpmn:sequenceFlow id="Flow_18ri6tq" sourceRef="Activity_1y04pbx" targetRef="Gateway_0byohhl" />
|
|
|
|
<bpmn:scriptTask id="Activity_1y04pbx" name="Add Bamboo Info to Extras">
|
|
|
|
<bpmn:incoming>Flow_009u4d4</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>Flow_18ri6tq</bpmn:outgoing>
|
|
|
|
<bpmn:script># Add Bamboo Info to Extras
|
|
|
|
current_user_extras["bamboo_supervisor_api_id"] = resp_BambooUserInfo["supervisorEid"]
|
|
|
|
current_user_extras["bamboo_supervisor_email"] = userBambooId = resp_BambooUserInfo["supervisorEmail"]
|
|
|
|
current_user_extras["bamboo_supervisor_status_id"] = userBambooId = resp_BambooUserInfo["supervisorId"]</bpmn:script>
|
|
|
|
</bpmn:scriptTask>
|
2022-12-22 21:12:32 +00:00
|
|
|
<bpmn:sequenceFlow id="Flow_05s4pvl" sourceRef="Activity_1fkr6s9" targetRef="Activity_0v13afu" />
|
|
|
|
<bpmn:scriptTask id="Activity_1fkr6s9" name="Set Defaults">
|
|
|
|
<bpmn:incoming>Flow_1q8xtg6</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>Flow_05s4pvl</bpmn:outgoing>
|
|
|
|
<bpmn:script># If not previously set, set find_user to current_user
|
|
|
|
try:
|
|
|
|
find_user
|
|
|
|
except NameError:
|
|
|
|
find_user = current_user["username"]</bpmn:script>
|
|
|
|
</bpmn:scriptTask>
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmn:process>
|
|
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="SR-User_Info">
|
|
|
|
<bpmndi:BPMNShape id="Activity_0hlcuhi_di" bpmnElement="Activity_0v13afu">
|
|
|
|
<dc:Bounds x="270" y="187" width="100" height="80" />
|
|
|
|
</bpmndi:BPMNShape>
|
2022-12-22 21:12:32 +00:00
|
|
|
<bpmndi:BPMNShape id="Event_0fb034d_di" bpmnElement="Event_0fb034d">
|
|
|
|
<dc:Bounds x="1262" y="209" width="36" height="36" />
|
|
|
|
</bpmndi:BPMNShape>
|
2022-12-22 20:27:55 +00:00
|
|
|
<bpmndi:BPMNShape id="Gateway_0xlrnzx_di" bpmnElement="Gateway_0xlrnzx" isMarkerVisible="true">
|
|
|
|
<dc:Bounds x="435" y="202" width="50" height="50" />
|
|
|
|
<bpmndi:BPMNLabel>
|
|
|
|
<dc:Bounds x="426" y="259" width="70" height="14" />
|
|
|
|
</bpmndi:BPMNLabel>
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="Activity_0rvcg5l_di" bpmnElement="Activity_1a9fimb">
|
|
|
|
<dc:Bounds x="570" y="187" width="100" height="80" />
|
|
|
|
<bpmndi:BPMNLabel />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="Activity_0nftxgp_di" bpmnElement="Activity_1uw66e8">
|
|
|
|
<dc:Bounds x="760" y="187" width="100" height="80" />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="Gateway_0byohhl_di" bpmnElement="Gateway_0byohhl" isMarkerVisible="true">
|
|
|
|
<dc:Bounds x="1115" y="202" width="50" height="50" />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="Activity_0xiz5vq_di" bpmnElement="Activity_1y04pbx">
|
|
|
|
<dc:Bounds x="940" y="187" width="100" height="80" />
|
|
|
|
</bpmndi:BPMNShape>
|
2022-12-22 21:12:32 +00:00
|
|
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
|
|
<dc:Bounds x="2" y="209" width="36" height="36" />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="Activity_1azbkzp_di" bpmnElement="Activity_1fkr6s9">
|
|
|
|
<dc:Bounds x="100" y="187" width="100" height="80" />
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_1q8xtg6_di" bpmnElement="Flow_1q8xtg6">
|
2022-12-22 21:12:32 +00:00
|
|
|
<di:waypoint x="38" y="227" />
|
|
|
|
<di:waypoint x="100" y="227" />
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_08nmyrt_di" bpmnElement="Flow_08nmyrt">
|
|
|
|
<di:waypoint x="370" y="227" />
|
|
|
|
<di:waypoint x="435" y="227" />
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_0i96b90_di" bpmnElement="Flow_0i96b90">
|
|
|
|
<di:waypoint x="485" y="227" />
|
|
|
|
<di:waypoint x="570" y="227" />
|
|
|
|
<bpmndi:BPMNLabel>
|
|
|
|
<dc:Bounds x="519" y="209" width="18" height="14" />
|
|
|
|
</bpmndi:BPMNLabel>
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_020y0gy_di" bpmnElement="Flow_020y0gy">
|
|
|
|
<di:waypoint x="670" y="227" />
|
|
|
|
<di:waypoint x="760" y="227" />
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_0d47w7r_di" bpmnElement="Flow_0d47w7r">
|
|
|
|
<di:waypoint x="460" y="202" />
|
|
|
|
<di:waypoint x="460" y="110" />
|
|
|
|
<di:waypoint x="1140" y="110" />
|
|
|
|
<di:waypoint x="1140" y="202" />
|
|
|
|
<bpmndi:BPMNLabel>
|
|
|
|
<dc:Bounds x="805" y="83" width="15" height="14" />
|
|
|
|
</bpmndi:BPMNLabel>
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_009u4d4_di" bpmnElement="Flow_009u4d4">
|
|
|
|
<di:waypoint x="860" y="227" />
|
|
|
|
<di:waypoint x="940" y="227" />
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_1gd83n0_di" bpmnElement="Flow_1gd83n0">
|
|
|
|
<di:waypoint x="1165" y="227" />
|
2022-12-22 20:33:18 +00:00
|
|
|
<di:waypoint x="1262" y="227" />
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="Flow_18ri6tq_di" bpmnElement="Flow_18ri6tq">
|
|
|
|
<di:waypoint x="1040" y="227" />
|
|
|
|
<di:waypoint x="1115" y="227" />
|
|
|
|
</bpmndi:BPMNEdge>
|
2022-12-22 21:12:32 +00:00
|
|
|
<bpmndi:BPMNEdge id="Flow_05s4pvl_di" bpmnElement="Flow_05s4pvl">
|
|
|
|
<di:waypoint x="200" y="227" />
|
|
|
|
<di:waypoint x="270" y="227" />
|
|
|
|
</bpmndi:BPMNEdge>
|
2022-12-22 20:27:55 +00:00
|
|
|
</bpmndi:BPMNPlane>
|
|
|
|
</bpmndi:BPMNDiagram>
|
|
|
|
</bpmn:definitions>
|