User: hurairaidrees@gmail.com clicked save for playground/nutech/receipt/receipt.bpmn

This commit is contained in:
sartography-automated-committer 2024-03-04 04:59:47 +00:00
parent d9c128d4b1
commit d31b5a82c4

View File

@ -127,17 +127,17 @@ minutes = 0
seconds = 0
days = 0
# Extract the value after "PT"
time_value_str = timer_value_1.split('PT')[1]
# Extract the numeric part of the time value
numeric_part = ""
for char in time_value_str:
for char in timer_value_1:
if char.isdigit():
numeric_part += char
else:
break
# Add 'PT' to the numeric value
numeric_part_with_PT = 'PT' + numeric_part
# Populate values based on the selected time format
if time_format == "Hour(s)":
hours = int(numeric_part) if numeric_part.isdigit() else 0
@ -150,16 +150,17 @@ elif time_format == "Day(s)":
# Create ISO 8601 string representation based on the selected time format
if time_format == "Hour(s)":
timer_value_1 = f"PT{hours}H"
timer_value_1 = f"{numeric_part_with_PT}H"
elif time_format == "Minute(s)":
timer_value_1 = f"PT{minutes}M"
timer_value_1 = f"{numeric_part_with_PT}M"
elif time_format == "Second(s)":
timer_value_1 = f"PT{seconds}S"
timer_value_1 = f"{numeric_part_with_PT}S"
elif time_format == "Day(s)":
timer_value_1 = f"P{days}D"
timer_value_1 = f"{numeric_part_with_PT}D"
# Now timer_value_tfc_str contains the ISO 8601 string representation based on the selected time format
print(timer_value_1)</bpmn:script>
print(timer_value_1)
</bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="Gateway_1be7bb7">
<bpmn:incoming>Flow_0hcdtwt</bpmn:incoming>
@ -211,17 +212,17 @@ minutes = 0
seconds = 0
days = 0
# Extract the value after "PT"
time_value_str = timer_value_warehouse.split('PT')[1]
# Extract the numeric part of the time value
numeric_part = ""
for char in time_value_str:
for char in timer_value_warehouse:
if char.isdigit():
numeric_part += char
else:
break
# Add 'PT' to the numeric value
numeric_part_with_PT = 'PT' + numeric_part
# Populate values based on the selected time format
if time_format == "Hour(s)":
hours = int(numeric_part) if numeric_part.isdigit() else 0
@ -234,19 +235,16 @@ elif time_format == "Day(s)":
# Create ISO 8601 string representation based on the selected time format
if time_format == "Hour(s)":
timer_value_warehouse = f"PT{hours}H"
timer_value_warehouse = f"{numeric_part_with_PT}H"
elif time_format == "Minute(s)":
timer_value_warehouse = f"PT{minutes}M"
timer_value_warehouse = f"{numeric_part_with_PT}M"
elif time_format == "Second(s)":
timer_value_warehouse = f"PT{seconds}S"
timer_value_warehouse = f"{numeric_part_with_PT}S"
elif time_format == "Day(s)":
timer_value_warehouse = f"P{days}D"
timer_value_warehouse = f"{numeric_part_with_PT}D"
# Now timer_value_tfc_str contains the ISO 8601 string representation based on the selected time format
print(timer_value_warehouse)
</bpmn:script>
</bpmn:scriptTask>
<bpmn:userTask id="Activity_0o7ln9u" name="Receipt of Equipment at S10 Warehouse">