remove imports from scripts
This commit is contained in:
parent
1db06c3d56
commit
ae9b557b98
|
@ -85,7 +85,7 @@
|
|||
<bpmn:scriptTask id="set_topic_one" name="Set Topic One" scriptFormat="python">
|
||||
<bpmn:incoming>Flow_10conab</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1ihr88m</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
topic_one_b = f"topic_one_b_conversation_{timestamp}"
|
||||
|
@ -112,7 +112,7 @@ del time</bpmn:script>
|
|||
<bpmn:scriptTask id="set_topic_two" name="Set Topic Two">
|
||||
<bpmn:incoming>Flow_0o5ojq9</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_17gfxad</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_two_a = f"topic_two_a_conversation_{timestamp}"
|
||||
topic_two_b = f"topic_two_b_conversation_{timestamp}"
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<bpmn:sequenceFlow id="Flow_1gohkts" name="Yes" sourceRef="Gateway_1lbghql" targetRef="Event_0m3ri6v" />
|
||||
<bpmn:sequenceFlow id="Flow_18xvx8w" name="yes" sourceRef="Gateway_1l4tz4i" targetRef="Activity_0fq1nb4" />
|
||||
<bpmn:sequenceFlow id="Flow_1m8oeg0" sourceRef="Activity_1ucvkk4" targetRef="Activity_06b32ar" />
|
||||
<bpmn:userTask id="Submit_the_invoice" name="2. Submit the invoice" scriptFormat="python" script="import decimal # Check if there are more than two decimal places d = decimal.Decimal('56.4325') d_cnt = d.as_tuple().exponent if d_cnt < -2: isDecimal = False else: isDecimal = True isNameNum = False for c in contributorName: if c.isdigit(): isNameNum = True break">
|
||||
<bpmn:userTask id="Submit_the_invoice" name="2. Submit the invoice" scriptFormat="python" script="# Check if there are more than two decimal places d = decimal.Decimal('56.4325') d_cnt = d.as_tuple().exponent if d_cnt < -2: isDecimal = False else: isDecimal = True isNameNum = False for c in contributorName: if c.isdigit(): isNameNum = True break">
|
||||
<bpmn:extensionElements>
|
||||
<spiffworkflow:properties>
|
||||
<spiffworkflow:property name="formJsonSchemaFilename" value="Submit-the-invoice_JSONSchema.json" />
|
||||
|
@ -292,7 +292,7 @@
|
|||
<bpmn:scriptTask id="Activity_Check_Due_Date" name="Check Due Date" scriptFormat="python">
|
||||
<bpmn:incoming>Flow_0iiotdb</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1s4qhn1</bpmn:outgoing>
|
||||
<bpmn:script>from datetime import datetime
|
||||
<bpmn:script>
|
||||
|
||||
invoice_date_obj = datetime.strptime(invoice.dueDate, '%Y-%m-%d')
|
||||
local_date_time_obj = datetime.strptime(local_date_str, '%Y-%m-%d')
|
||||
|
@ -337,7 +337,7 @@ del c</bpmn:script>
|
|||
<bpmn:scriptTask id="Activity_check_invoice_amount" name="Check Invoice Amount" scriptFormat="python">
|
||||
<bpmn:incoming>Flow_18qyq02</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1okg2rg</bpmn:outgoing>
|
||||
<bpmn:script>import decimal
|
||||
<bpmn:script>
|
||||
|
||||
# Check if there are more than two decimal places
|
||||
invoiceAmount_str = str(invoice.invoiceAmount)
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
<bpmn:scriptTask id="Activity_0h7gas9" name="Get Local Date and Time" scriptFormat="python">
|
||||
<bpmn:incoming>Flow_1ipjjs0</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0agt8ei</bpmn:outgoing>
|
||||
<bpmn:script>from datetime import datetime
|
||||
|
||||
<bpmn:script>
|
||||
local_date_time_str = str(datetime.utcnow())
|
||||
local_date_time = get_localtime(timestamp=local_date_time_str)
|
||||
local_date_str = local_date_time.strftime('%Y-%m-%d')
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<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>from datetime import datetime
|
||||
<bpmn:script>
|
||||
|
||||
local_date_time_obj = datetime.utcnow()
|
||||
local_date_str = local_date_time_obj.strftime('%Y-%m-%d')
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<bpmn:scriptTask id="Activity_032nk4u" name="Set Topic One">
|
||||
<bpmn:incoming>Flow_17cp9lq</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1o5couk</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
del time</bpmn:script>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<bpmn:scriptTask id="Activity_0xbi8gj" name="Set Topic One">
|
||||
<bpmn:incoming>Flow_0u7lz54</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0g3hvo9</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
del time</bpmn:script>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<bpmn:scriptTask id="Activity_1unqzlg" name="Set Topic One">
|
||||
<bpmn:incoming>Flow_15bgmal</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1euq8c9</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
del time</bpmn:script>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<bpmn:scriptTask id="Activity_1sf61zm" name="Set Topic">
|
||||
<bpmn:incoming>Flow_02trvmu</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1fciaqh</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
del time</bpmn:script>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<bpmn:scriptTask id="Activity_07kdswo" name="Set Topic">
|
||||
<bpmn:incoming>Flow_1kh86v5</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_12hrt0s</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
del time</bpmn:script>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<bpmn:scriptTask id="Activity_1qnybc2" name="Set Topic">
|
||||
<bpmn:incoming>Flow_1bk0sdv</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0tv692t</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
del time</bpmn:script>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<bpmn:scriptTask id="Activity_19g2fkm" name="Set Topic">
|
||||
<bpmn:incoming>Flow_1bk0sdv</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1rkklg1</bpmn:outgoing>
|
||||
<bpmn:script>import time
|
||||
<bpmn:script>
|
||||
timestamp = time.time()
|
||||
topic_one_a = f"topic_one_a_conversation_{timestamp}"
|
||||
topic_one_b = f"topic_one_b_conversation_{timestamp}"
|
||||
|
|
Loading…
Reference in New Issue