mirror of
https://github.com/sartography/sample-process-models.git
synced 2025-02-24 13:48:10 +00:00
138 lines
6.7 KiB
XML
138 lines
6.7 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: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:process id="Proccess_qo5vgsf" isExecutable="true">
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
<bpmn:outgoing>Flow_1yre3ir</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:sequenceFlow id="Flow_1yre3ir" sourceRef="StartEvent_1" targetRef="Activity_0op1e6d" />
|
|
<bpmn:userTask id="fill_in_time_sheet" name="Fill in Time Sheet">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:properties>
|
|
<spiffworkflow:property name="formJsonSchemaFilename" value="entry_schema.json" />
|
|
<spiffworkflow:property name="formUiSchemaFilename" value="entry_ui.json" />
|
|
</spiffworkflow:properties>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0qbs6a6</bpmn:incoming>
|
|
<bpmn:incoming>Flow_0itvwvf</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_10ga3mm</bpmn:outgoing>
|
|
</bpmn:userTask>
|
|
<bpmn:scriptTask id="Activity_0op1e6d" name="Record Start Time">
|
|
<bpmn:incoming>Flow_1yre3ir</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0qbs6a6</bpmn:outgoing>
|
|
<bpmn:script>start_time_in_seconds = round(time.time())
|
|
startDateTime = datetime.utcfromtimestamp(start_time_in_seconds).strftime("%Y-%m-%dT%H:%MZ")</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:endEvent id="Event_172y2zl">
|
|
<bpmn:incoming>Flow_056hukt</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_10ga3mm" sourceRef="fill_in_time_sheet" targetRef="calculate_durations" />
|
|
<bpmn:sequenceFlow id="Flow_0qbs6a6" sourceRef="Activity_0op1e6d" targetRef="fill_in_time_sheet" />
|
|
<bpmn:sequenceFlow id="Flow_0g2qcuo" sourceRef="calculate_durations" targetRef="show_time_details" />
|
|
<bpmn:scriptTask id="calculate_durations" name="Calculate Durations">
|
|
<bpmn:incoming>Flow_10ga3mm</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0g2qcuo</bpmn:outgoing>
|
|
<bpmn:script>end_time_object = datetime.fromisoformat(endDateTime)
|
|
end_time_in_seconds = end_time_object.timestamp()
|
|
endDateTime = end_time_object.strftime("%Y-%m-%dT%H:%MZ")
|
|
|
|
# if the time would be negative then just make it zero since the datetime component doesn't store seconds
|
|
duration_in_seconds = 0
|
|
if end_time_in_seconds > start_time_in_seconds:
|
|
duration_in_seconds = end_time_in_seconds - start_time_in_seconds
|
|
|
|
durationDateTime = str(timedelta(seconds=duration_in_seconds))
|
|
|
|
del(end_time_object)</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:sequenceFlow id="Flow_056hukt" sourceRef="show_time_details" targetRef="Event_172y2zl" />
|
|
<bpmn:manualTask id="show_time_details" name="Show Time Details">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:instructionsForEndUser># Your time
|
|
|
|
Client: {{client}}
|
|
|
|
Project: {{project}}
|
|
|
|
Summary: {{summary}}
|
|
|
|
Start: {{startDateTime}}
|
|
|
|
End: {{endDateTime}}
|
|
|
|
Duration: {{durationDateTime}}
|
|
|
|
*NOTE: Only click continue if you are certain no changes will ever be made to this entry. It's fine to keep it open forever.*</spiffworkflow:instructionsForEndUser>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0g2qcuo</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_056hukt</bpmn:outgoing>
|
|
</bpmn:manualTask>
|
|
<bpmn:boundaryEvent id="edit_time" name="Edit Time" attachedToRef="show_time_details">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:signalButtonLabel>Edit Time</spiffworkflow:signalButtonLabel>
|
|
</bpmn:extensionElements>
|
|
<bpmn:outgoing>Flow_0itvwvf</bpmn:outgoing>
|
|
<bpmn:signalEventDefinition id="SignalEventDefinition_1schzxu" signalRef="Signal_3c84pph" />
|
|
</bpmn:boundaryEvent>
|
|
<bpmn:sequenceFlow id="Flow_0itvwvf" sourceRef="edit_time" targetRef="fill_in_time_sheet" />
|
|
</bpmn:process>
|
|
<bpmn:signal id="Signal_3c84pph" name="edit_time_signal" />
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Proccess_qo5vgsf">
|
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
<dc:Bounds x="179" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1rbf1ou_di" bpmnElement="Activity_0op1e6d">
|
|
<dc:Bounds x="250" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_12keswg_di" bpmnElement="fill_in_time_sheet">
|
|
<dc:Bounds x="400" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_136tbk0_di" bpmnElement="calculate_durations">
|
|
<dc:Bounds x="540" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_172y2zl_di" bpmnElement="Event_172y2zl">
|
|
<dc:Bounds x="802" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0u04dg0_di" bpmnElement="show_time_details">
|
|
<dc:Bounds x="680" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_1xnbkrj_di" bpmnElement="edit_time">
|
|
<dc:Bounds x="732" y="199" width="36" height="36" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="728" y="242" width="46" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="Flow_1yre3ir_di" bpmnElement="Flow_1yre3ir">
|
|
<di:waypoint x="215" y="177" />
|
|
<di:waypoint x="250" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_10ga3mm_di" bpmnElement="Flow_10ga3mm">
|
|
<di:waypoint x="500" y="177" />
|
|
<di:waypoint x="540" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0qbs6a6_di" bpmnElement="Flow_0qbs6a6">
|
|
<di:waypoint x="350" y="177" />
|
|
<di:waypoint x="400" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0g2qcuo_di" bpmnElement="Flow_0g2qcuo">
|
|
<di:waypoint x="640" y="177" />
|
|
<di:waypoint x="680" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_056hukt_di" bpmnElement="Flow_056hukt">
|
|
<di:waypoint x="780" y="177" />
|
|
<di:waypoint x="802" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0itvwvf_di" bpmnElement="Flow_0itvwvf">
|
|
<di:waypoint x="750" y="235" />
|
|
<di:waypoint x="750" y="255" />
|
|
<di:waypoint x="625" y="255" />
|
|
<di:waypoint x="550" y="310" />
|
|
<di:waypoint x="460" y="217" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn:definitions>
|