User: alex deleted process model misc/shared/local-date-and-time
This commit is contained in:
parent
22782cf595
commit
245f617d9d
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"description": "Local Date and Time",
|
||||
"display_name": "Local Date and Time",
|
||||
"display_order": 1,
|
||||
"exception_notification_addresses": [],
|
||||
"fault_or_suspend_on_exception": "fault",
|
||||
"files": [],
|
||||
"metadata_extraction_paths": null,
|
||||
"primary_file_name": "shared_local_date_time.bpmn",
|
||||
"primary_process_id": "Shared_Local_Date_Time"
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
<?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" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
||||
<bpmn:process id="Shared_Local_Date_Time" name="Shared: Local Date and Time" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1al74ve</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1al74ve" sourceRef="StartEvent_1" targetRef="Activity_Get_Local_Date_Time" />
|
||||
<bpmn:scriptTask id="Activity_Get_Local_Date_Time" name="Get Local Date and Time" scriptFormat="python">
|
||||
<bpmn:incoming>Flow_1al74ve</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0xa8fic</bpmn:outgoing>
|
||||
<bpmn:script>try:
|
||||
is_format
|
||||
except NameError:
|
||||
is_format = False
|
||||
|
||||
try:
|
||||
time_zone
|
||||
except NameError:
|
||||
time_zone = "US/Eastern"
|
||||
|
||||
try:
|
||||
date_format
|
||||
except NameError:
|
||||
date_format = "YMD"
|
||||
|
||||
try:
|
||||
time_format
|
||||
except NameError:
|
||||
if is_format:
|
||||
time_format = "24"
|
||||
else:
|
||||
time_format = "12"
|
||||
|
||||
try:
|
||||
is_waku_message_timestamp
|
||||
except NameError:
|
||||
is_waku_message_timestamp = False
|
||||
|
||||
utc_date_time_obj = datetime.utcnow()
|
||||
local_date_time_obj = get_localtime(utc_date_time_obj, time_zone)
|
||||
|
||||
if date_format == "YMD":
|
||||
local_date_str = local_date_time_obj.strftime('%Y-%m-%d')
|
||||
elif date_format == "MDY":
|
||||
local_date_str = local_date_time_obj.strftime('%m-%d-%Y')
|
||||
else:
|
||||
local_date_str = local_date_time_obj.strftime('%d-%m-%Y')
|
||||
|
||||
# Set local time
|
||||
if time_format == "24":
|
||||
local_time_str = local_date_time_obj.strftime('%H:%M')
|
||||
else:
|
||||
local_time_str = local_date_time_obj.strftime('%I:%M %p')
|
||||
|
||||
|
||||
del(utc_date_time_obj)
|
||||
del(local_date_time_obj)</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:endEvent id="Event_1d6y8yr">
|
||||
<bpmn:incoming>Flow_04ow0m7</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0xa8fic" sourceRef="Activity_Get_Local_Date_Time" targetRef="Gateway_0y8l8z1" />
|
||||
<bpmn:sequenceFlow id="Flow_1bdfog7" sourceRef="Activity_04a0qu9" targetRef="Gateway_1jqak5f" />
|
||||
<bpmn:scriptTask id="Activity_04a0qu9" name="Set Waku Message Timestamp">
|
||||
<bpmn:incoming>Flow_0jjgmim</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1bdfog7</bpmn:outgoing>
|
||||
<bpmn:script>waku_message_timestamp = "\n- - - - - - - - - - - - - - - - - - - - - - -" + "\nSent: " + local_date_str + " @ " + local_time_str + "\n- - - - - - - - - - - - - - - - - - - - - - -"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:exclusiveGateway id="Gateway_0y8l8z1" name="Set Waku Message Timestamp?" default="Flow_1pusr0c">
|
||||
<bpmn:incoming>Flow_0xa8fic</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0jjgmim</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_1pusr0c</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_0jjgmim" name="Yes" sourceRef="Gateway_0y8l8z1" targetRef="Activity_04a0qu9">
|
||||
<bpmn:conditionExpression>is_waku_message_timestamp</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:exclusiveGateway id="Gateway_1jqak5f">
|
||||
<bpmn:incoming>Flow_1bdfog7</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_1pusr0c</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_04ow0m7</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_04ow0m7" sourceRef="Gateway_1jqak5f" targetRef="Event_1d6y8yr" />
|
||||
<bpmn:sequenceFlow id="Flow_1pusr0c" name="No" sourceRef="Gateway_0y8l8z1" targetRef="Gateway_1jqak5f" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Shared_Local_Date_Time">
|
||||
<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_0pqfgjq_di" bpmnElement="Activity_Get_Local_Date_Time">
|
||||
<dc:Bounds x="270" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_0y8l8z1_di" bpmnElement="Gateway_0y8l8z1" isMarkerVisible="true">
|
||||
<dc:Bounds x="425" y="152" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="423" y="209" width="61" height="40" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1d6y8yr_di" bpmnElement="Event_1d6y8yr">
|
||||
<dc:Bounds x="842" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_1jqak5f_di" bpmnElement="Gateway_1jqak5f" isMarkerVisible="true">
|
||||
<dc:Bounds x="715" y="152" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jezgwt_di" bpmnElement="Activity_04a0qu9">
|
||||
<dc:Bounds x="540" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_1al74ve_di" bpmnElement="Flow_1al74ve">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="270" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0xa8fic_di" bpmnElement="Flow_0xa8fic">
|
||||
<di:waypoint x="370" y="177" />
|
||||
<di:waypoint x="425" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1bdfog7_di" bpmnElement="Flow_1bdfog7">
|
||||
<di:waypoint x="640" y="177" />
|
||||
<di:waypoint x="715" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0jjgmim_di" bpmnElement="Flow_0jjgmim">
|
||||
<di:waypoint x="475" y="177" />
|
||||
<di:waypoint x="540" y="177" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="499" y="159" width="18" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_04ow0m7_di" bpmnElement="Flow_04ow0m7">
|
||||
<di:waypoint x="765" y="177" />
|
||||
<di:waypoint x="842" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1pusr0c_di" bpmnElement="Flow_1pusr0c">
|
||||
<di:waypoint x="450" y="152" />
|
||||
<di:waypoint x="450" y="90" />
|
||||
<di:waypoint x="740" y="90" />
|
||||
<di:waypoint x="740" y="152" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="588" y="72" width="15" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
Loading…
Reference in New Issue