mirror of
https://github.com/sartography/sample-process-models.git
synced 2025-02-24 21:58:18 +00:00
101 lines
5.1 KiB
XML
101 lines
5.1 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="Bamboo_GetEmployee" name="Bamboo Get Employee" isExecutable="true">
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
<bpmn:outgoing>Flow_1d8wrjw</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:sequenceFlow id="Flow_1d8wrjw" sourceRef="StartEvent_1" targetRef="Activity_1pqusmi" />
|
|
<bpmn:endEvent id="Event_0g5k1lx">
|
|
<bpmn:incoming>Flow_1kzb02q</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_1kzb02q" sourceRef="Activity_1vepcwc" targetRef="Event_0g5k1lx" />
|
|
<bpmn:serviceTask id="Activity_1vepcwc" name="Get Employee">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:serviceTaskOperator id="http/GetRequest" resultVariable="bamboo_get_employee">
|
|
<spiffworkflow:parameters>
|
|
<spiffworkflow:parameter id="basic_auth_password" type="str" value=""x"" />
|
|
<spiffworkflow:parameter id="basic_auth_username" type="str" value=""secret:BAMBOOHR_API_KEY"" />
|
|
<spiffworkflow:parameter id="headers" type="any" value="{"Accept": "application/json"}" />
|
|
<spiffworkflow:parameter id="params" type="any" value="{"fields": get_employee_fields, "onlyCurrent": get_employee_only_current}" />
|
|
<spiffworkflow:parameter id="url" type="str" value="f"https://api.bamboohr.com/api/gateway.php/statusresearchdemo/v1/employees/{get_employee_id}"" />
|
|
</spiffworkflow:parameters>
|
|
</spiffworkflow:serviceTaskOperator>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0o95jof</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1kzb02q</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:sequenceFlow id="Flow_0o95jof" sourceRef="Activity_1pqusmi" targetRef="Activity_1vepcwc" />
|
|
<bpmn:scriptTask id="Activity_1pqusmi" name="Set API Parameters">
|
|
<bpmn:incoming>Flow_1d8wrjw</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0o95jof</bpmn:outgoing>
|
|
<bpmn:script># Set which fields
|
|
get_employee_fields = ""
|
|
get_employee_fields_cnt = 0
|
|
|
|
if is_bamboo_first_name:
|
|
get_employee_fields = get_employee_fields + "firstName"
|
|
get_employee_fields_cnt = get_employee_fields_cnt + 1
|
|
|
|
if is_bamboo_last_name:
|
|
if get_employee_fields_cnt == 0:
|
|
get_employee_fields = get_employee_fields + "lastName"
|
|
else:
|
|
get_employee_fields = get_employee_fields + ",lastName"
|
|
get_employee_fields_cnt = get_employee_fields_cnt + 1
|
|
|
|
if is_bamboo_preferred_name:
|
|
if get_employee_fields_cnt == 0:
|
|
get_employee_fields = get_employee_fields + "preferredName"
|
|
else:
|
|
get_employee_fields = get_employee_fields + ",preferredName"
|
|
get_employee_fields_cnt = get_employee_fields_cnt + 1
|
|
|
|
if is_bamboo_status_key:
|
|
if get_employee_fields_cnt == 0:
|
|
get_employee_fields = get_employee_fields + "customStatusChatKey"
|
|
else:
|
|
get_employee_fields = get_employee_fields + ",customStatusChatKey"
|
|
get_employee_fields_cnt = get_employee_fields_cnt + 1
|
|
|
|
if is_bamboo_reporting_to:
|
|
if get_employee_fields_cnt == 0:
|
|
get_employee_fields = get_employee_fields + "supervisor"
|
|
else:
|
|
get_employee_fields = get_employee_fields + ",supervisor"
|
|
get_employee_fields_cnt = get_employee_fields_cnt + 1
|
|
|
|
# Set if current state
|
|
get_employee_only_current = True</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
</bpmn:process>
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Bamboo_GetEmployee">
|
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
<dc:Bounds x="-38" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0g5k1lx_di" bpmnElement="Event_0g5k1lx">
|
|
<dc:Bounds x="432" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_177z7fs_di" bpmnElement="Activity_1vepcwc">
|
|
<dc:Bounds x="270" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0qlemaw_di" bpmnElement="Activity_1pqusmi">
|
|
<dc:Bounds x="90" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="Flow_1d8wrjw_di" bpmnElement="Flow_1d8wrjw">
|
|
<di:waypoint x="-2" y="177" />
|
|
<di:waypoint x="90" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1kzb02q_di" bpmnElement="Flow_1kzb02q">
|
|
<di:waypoint x="370" y="177" />
|
|
<di:waypoint x="432" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0o95jof_di" bpmnElement="Flow_0o95jof">
|
|
<di:waypoint x="190" y="177" />
|
|
<di:waypoint x="270" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn:definitions>
|