212 lines
11 KiB
XML
212 lines
11 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="Shared_Currency_Format" name="Shared: Currency Format" isExecutable="true">
|
|
<bpmn:callActivity id="Activity_05iptty" name="Call Shared: Build Enum List from AWS" calledElement="Shared_Build_Enum_List_from_AWS">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:preScript>whichSubject = "Currency"
|
|
addNew = False</spiffworkflow:preScript>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1m6sgai</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0xpgl88</bpmn:outgoing>
|
|
</bpmn:callActivity>
|
|
<bpmn:endEvent id="Event_0brhprl">
|
|
<bpmn:incoming>Flow_18r0v1l</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_18zj1kx" sourceRef="Activity_0j2b9gv" targetRef="Gateway_0lpxoao" />
|
|
<bpmn:userTask id="Activity_0j2b9gv" name="Select Currency">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:properties>
|
|
<spiffworkflow:property name="formJsonSchemaFilename" value="which-currency_JSONSchema.json" />
|
|
<spiffworkflow:property name="formUiSchemaFilename" value="which-currency_UISchema.json" />
|
|
</spiffworkflow:properties>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0xpgl88</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_18zj1kx</bpmn:outgoing>
|
|
</bpmn:userTask>
|
|
<bpmn:sequenceFlow id="Flow_174qezd" sourceRef="Activity_1gp7tds" targetRef="Activity_1q2cms5" />
|
|
<bpmn:businessRuleTask id="Activity_1gp7tds" name="Get Currency Formatting Info">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:calledDecisionId>Currency_Format</spiffworkflow:calledDecisionId>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1146lni</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_174qezd</bpmn:outgoing>
|
|
</bpmn:businessRuleTask>
|
|
<bpmn:sequenceFlow id="Flow_1jyj2rk" sourceRef="Activity_1q2cms5" targetRef="Gateway_0u1hfe0" />
|
|
<bpmn:scriptTask id="Activity_1q2cms5" name="Add Currency Format" scriptFormat="python">
|
|
<bpmn:incoming>Flow_174qezd</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1jyj2rk</bpmn:outgoing>
|
|
<bpmn:script># Add zeros if less than two decimal digits
|
|
curAmount_str = "{:0,.2f}".format(curAmount)
|
|
|
|
# Check if separaters need to be swapped
|
|
if curThousandsSeparator == ".":
|
|
main_currency, fractional_currency = curAmount_str.split(".")[0], curAmount_str.split(".")[1]
|
|
new_main_currency = main_currency.replace(",", ".")
|
|
curAmount_str = new_main_currency + curFractionalSeparator + fractional_currency
|
|
|
|
# Add Currency Symbol
|
|
if curSymbolLocation == "Left":
|
|
curAmount_str = curSymbol + " " * curSymbolSpaces + curAmount_str
|
|
elif curSymbolLocation == "Right":
|
|
curAmount_str = curAmount_str + " " * curSymbolSpaces + curSymbol
|
|
|
|
# Add Currency Code
|
|
curAmount_str = curAmount_str + " " + curCode</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:sequenceFlow id="Flow_0ljzxco" sourceRef="Activity_0045py7" targetRef="Gateway_0jk8rox" />
|
|
<bpmn:manualTask id="Activity_0045py7" name="Display Currency Format">
|
|
<bpmn:extensionElements>
|
|
<spiffworkflow:instructionsForEndUser>{{ curAmount_str }}</spiffworkflow:instructionsForEndUser>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1qlhanf</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0ljzxco</bpmn:outgoing>
|
|
</bpmn:manualTask>
|
|
<bpmn:scriptTask id="Activity_1ok1tfd" name="Check iI Testing" scriptFormat="python">
|
|
<bpmn:script># Check If Testing
|
|
try:
|
|
isCurTest
|
|
catch NameError:
|
|
isCurTest = True</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:exclusiveGateway id="Gateway_0qu1agy" name="Testing?" default="Flow_17jio5w">
|
|
<bpmn:outgoing>Flow_1m6sgai</bpmn:outgoing>
|
|
<bpmn:outgoing>Flow_17jio5w</bpmn:outgoing>
|
|
</bpmn:exclusiveGateway>
|
|
<bpmn:sequenceFlow id="Flow_1m6sgai" name="Yes" sourceRef="Gateway_0qu1agy" targetRef="Activity_05iptty">
|
|
<bpmn:conditionExpression>isCurTest</bpmn:conditionExpression>
|
|
</bpmn:sequenceFlow>
|
|
<bpmn:exclusiveGateway id="Gateway_0lpxoao">
|
|
<bpmn:incoming>Flow_18zj1kx</bpmn:incoming>
|
|
<bpmn:incoming>Flow_17jio5w</bpmn:incoming>
|
|
</bpmn:exclusiveGateway>
|
|
<bpmn:sequenceFlow id="Flow_17jio5w" name="No" sourceRef="Gateway_0qu1agy" targetRef="Gateway_0lpxoao" />
|
|
<bpmn:exclusiveGateway id="Gateway_0u1hfe0" name="Testing?" default="Flow_0hyui7b">
|
|
<bpmn:incoming>Flow_1jyj2rk</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1qlhanf</bpmn:outgoing>
|
|
<bpmn:outgoing>Flow_0hyui7b</bpmn:outgoing>
|
|
</bpmn:exclusiveGateway>
|
|
<bpmn:sequenceFlow id="Flow_1qlhanf" name="Yes" sourceRef="Gateway_0u1hfe0" targetRef="Activity_0045py7">
|
|
<bpmn:conditionExpression>isCurTest</bpmn:conditionExpression>
|
|
</bpmn:sequenceFlow>
|
|
<bpmn:exclusiveGateway id="Gateway_0jk8rox">
|
|
<bpmn:incoming>Flow_0ljzxco</bpmn:incoming>
|
|
<bpmn:incoming>Flow_0hyui7b</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_18r0v1l</bpmn:outgoing>
|
|
</bpmn:exclusiveGateway>
|
|
<bpmn:sequenceFlow id="Flow_18r0v1l" sourceRef="Gateway_0jk8rox" targetRef="Event_0brhprl" />
|
|
<bpmn:sequenceFlow id="Flow_0hyui7b" name="No" sourceRef="Gateway_0u1hfe0" targetRef="Gateway_0jk8rox" />
|
|
<bpmn:sequenceFlow id="Flow_0xpgl88" sourceRef="Activity_05iptty" targetRef="Activity_0j2b9gv" />
|
|
<bpmn:startEvent id="Event_1bw8dfr">
|
|
<bpmn:outgoing>Flow_1146lni</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:sequenceFlow id="Flow_1146lni" sourceRef="Event_1bw8dfr" targetRef="Activity_1gp7tds" />
|
|
</bpmn:process>
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Shared_Currency_Format">
|
|
<bpmndi:BPMNShape id="Activity_0jkj7ru_di" bpmnElement="Activity_05iptty">
|
|
<dc:Bounds x="260" y="137" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0brhprl_di" bpmnElement="Event_0brhprl">
|
|
<dc:Bounds x="1422" y="159" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_145za7d_di" bpmnElement="Activity_0j2b9gv">
|
|
<dc:Bounds x="420" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0z2f649_di" bpmnElement="Activity_1gp7tds">
|
|
<dc:Bounds x="700" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_14tui7g_di" bpmnElement="Activity_1q2cms5">
|
|
<dc:Bounds x="860" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0bc9xkn_di" bpmnElement="Activity_0045py7">
|
|
<dc:Bounds x="1140" y="137" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1ca0h53_di" bpmnElement="Activity_1ok1tfd">
|
|
<dc:Bounds x="-50" y="20" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_0qu1agy_di" bpmnElement="Gateway_0qu1agy" isMarkerVisible="true">
|
|
<dc:Bounds x="115" y="152" width="50" height="50" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="119.5" y="212" width="41" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_0lpxoao_di" bpmnElement="Gateway_0lpxoao" isMarkerVisible="true">
|
|
<dc:Bounds x="575" y="152" width="50" height="50" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_0u1hfe0_di" bpmnElement="Gateway_0u1hfe0" isMarkerVisible="true">
|
|
<dc:Bounds x="1015" y="152" width="50" height="50" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1020" y="209" width="41" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_0jk8rox_di" bpmnElement="Gateway_0jk8rox" isMarkerVisible="true">
|
|
<dc:Bounds x="1305" y="152" width="50" height="50" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_1bw8dfr_di" bpmnElement="Event_1bw8dfr">
|
|
<dc:Bounds x="732" y="302" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="Flow_18zj1kx_di" bpmnElement="Flow_18zj1kx">
|
|
<di:waypoint x="520" y="177" />
|
|
<di:waypoint x="575" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_174qezd_di" bpmnElement="Flow_174qezd">
|
|
<di:waypoint x="800" y="177" />
|
|
<di:waypoint x="860" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1jyj2rk_di" bpmnElement="Flow_1jyj2rk">
|
|
<di:waypoint x="960" y="177" />
|
|
<di:waypoint x="1015" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0ljzxco_di" bpmnElement="Flow_0ljzxco">
|
|
<di:waypoint x="1240" y="177" />
|
|
<di:waypoint x="1305" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1m6sgai_di" bpmnElement="Flow_1m6sgai">
|
|
<di:waypoint x="165" y="177" />
|
|
<di:waypoint x="260" y="177" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="185" y="153" width="18" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_17jio5w_di" bpmnElement="Flow_17jio5w">
|
|
<di:waypoint x="140" y="152" />
|
|
<di:waypoint x="140" y="100" />
|
|
<di:waypoint x="600" y="100" />
|
|
<di:waypoint x="600" y="152" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="363" y="82" width="15" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1qlhanf_di" bpmnElement="Flow_1qlhanf">
|
|
<di:waypoint x="1065" y="177" />
|
|
<di:waypoint x="1140" y="177" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1081" y="159" width="18" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_18r0v1l_di" bpmnElement="Flow_18r0v1l">
|
|
<di:waypoint x="1355" y="177" />
|
|
<di:waypoint x="1422" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0hyui7b_di" bpmnElement="Flow_0hyui7b">
|
|
<di:waypoint x="1040" y="152" />
|
|
<di:waypoint x="1040" y="110" />
|
|
<di:waypoint x="1330" y="110" />
|
|
<di:waypoint x="1330" y="152" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1178" y="92" width="15" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0xpgl88_di" bpmnElement="Flow_0xpgl88">
|
|
<di:waypoint x="360" y="177" />
|
|
<di:waypoint x="420" y="177" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1146lni_di" bpmnElement="Flow_1146lni">
|
|
<di:waypoint x="750" y="302" />
|
|
<di:waypoint x="750" y="217" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn:definitions>
|