mirror of
https://github.com/sartography/demo-process-models.git
synced 2025-02-24 13:58:18 +00:00
User: dbayless@humanscalebusiness.org added process model file playground/human-scale-business/test-process/Data Modification.bpmn
This commit is contained in:
parent
2593cce2fc
commit
a27c1a2221
@ -0,0 +1,131 @@
|
|||||||
|
<?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:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" 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="Process_gvu6xe0" isExecutable="true">
|
||||||
|
<bpmn:startEvent id="StartEvent_1" name="Process initiated">
|
||||||
|
<bpmn:outgoing>Flow_1nl5h18</bpmn:outgoing>
|
||||||
|
</bpmn:startEvent>
|
||||||
|
<bpmn:sequenceFlow id="Flow_1nl5h18" sourceRef="StartEvent_1" targetRef="Activity_1bwmgt5" />
|
||||||
|
<bpmn:userTask id="Activity_1bwmgt5" name="Input data">
|
||||||
|
<bpmn:extensionElements>
|
||||||
|
<spiffworkflow:properties>
|
||||||
|
<spiffworkflow:property name="formJsonSchemaFilename" value="" />
|
||||||
|
<spiffworkflow:property name="formUiSchemaFilename" value="" />
|
||||||
|
</spiffworkflow:properties>
|
||||||
|
</bpmn:extensionElements>
|
||||||
|
<bpmn:incoming>Flow_1nl5h18</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_1omdz2s</bpmn:outgoing>
|
||||||
|
</bpmn:userTask>
|
||||||
|
<bpmn:sequenceFlow id="Flow_1omdz2s" sourceRef="Activity_1bwmgt5" targetRef="Activity_0zgmg71" />
|
||||||
|
<bpmn:scriptTask id="Activity_0zgmg71" name="Modify data">
|
||||||
|
<bpmn:extensionElements>
|
||||||
|
<spiffworkflow:unitTests>
|
||||||
|
<spiffworkflow:unitTest id="ScriptUnitTest_1ea9ygy">
|
||||||
|
<spiffworkflow:inputJson>// Test Inputs
|
||||||
|
{
|
||||||
|
"flag_stars": "12",
|
||||||
|
"longest_river": "nile",
|
||||||
|
"woman_nobel": "curie"
|
||||||
|
}</spiffworkflow:inputJson>
|
||||||
|
<spiffworkflow:expectedOutputJson>// Test Outputs
|
||||||
|
{
|
||||||
|
"flag_stars": "12",
|
||||||
|
"longest": "nile",
|
||||||
|
"num_correct": 3,
|
||||||
|
"score": 100,
|
||||||
|
"woman_nobel": "curie"
|
||||||
|
}</spiffworkflow:expectedOutputJson>
|
||||||
|
</spiffworkflow:unitTest>
|
||||||
|
</spiffworkflow:unitTests>
|
||||||
|
</bpmn:extensionElements>
|
||||||
|
<bpmn:incoming>Flow_1omdz2s</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_1nzxnal</bpmn:outgoing>
|
||||||
|
<bpmn:script>if flag_stars.lower().strip() == "twelve":
|
||||||
|
num_correct += 1
|
||||||
|
elif int(flag_stars) == 12:
|
||||||
|
num_correct += 1
|
||||||
|
|
||||||
|
if "nile" in longest.lower():
|
||||||
|
num_correct += 1
|
||||||
|
|
||||||
|
if "curie" in woman_nobel.lower():
|
||||||
|
num_correct += 1
|
||||||
|
|
||||||
|
score = int(num_correct / 3 * 100)</bpmn:script>
|
||||||
|
</bpmn:scriptTask>
|
||||||
|
<bpmn:sequenceFlow id="Flow_1nzxnal" sourceRef="Activity_0zgmg71" targetRef="Activity_0uidepv" />
|
||||||
|
<bpmn:userTask id="Activity_0uidepv" name="Review results">
|
||||||
|
<bpmn:extensionElements>
|
||||||
|
<spiffworkflow:preScript># Initialize denominator
|
||||||
|
k = 1
|
||||||
|
|
||||||
|
# Initialize sum
|
||||||
|
s = 0
|
||||||
|
|
||||||
|
for i in range(1000000):
|
||||||
|
|
||||||
|
# even index elements are positive
|
||||||
|
if i % 2 == 0:
|
||||||
|
s += 4/k
|
||||||
|
else:
|
||||||
|
|
||||||
|
# odd index elements are negative
|
||||||
|
s -= 4/k
|
||||||
|
|
||||||
|
# denominator is odd
|
||||||
|
k += 2
|
||||||
|
|
||||||
|
pi = s
|
||||||
|
del(k)</spiffworkflow:preScript>
|
||||||
|
</bpmn:extensionElements>
|
||||||
|
<bpmn:incoming>Flow_1nzxnal</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_00h8381</bpmn:outgoing>
|
||||||
|
</bpmn:userTask>
|
||||||
|
<bpmn:endEvent id="Event_1otyxgi" name="Process completed">
|
||||||
|
<bpmn:incoming>Flow_00h8381</bpmn:incoming>
|
||||||
|
</bpmn:endEvent>
|
||||||
|
<bpmn:sequenceFlow id="Flow_00h8381" sourceRef="Activity_0uidepv" targetRef="Event_1otyxgi" />
|
||||||
|
</bpmn:process>
|
||||||
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_gvu6xe0">
|
||||||
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||||
|
<dc:Bounds x="-258" y="222" width="36" height="36" />
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds x="-280" y="265" width="81" height="14" />
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Activity_1vlhzms_di" bpmnElement="Activity_1bwmgt5">
|
||||||
|
<dc:Bounds x="-170" y="200" width="100" height="80" />
|
||||||
|
<bpmndi:BPMNLabel />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Activity_1joau9d_di" bpmnElement="Activity_0zgmg71">
|
||||||
|
<dc:Bounds x="-10" y="200" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Activity_02yp6de_di" bpmnElement="Activity_0uidepv">
|
||||||
|
<dc:Bounds x="150" y="200" width="100" height="80" />
|
||||||
|
<bpmndi:BPMNLabel />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Event_1otyxgi_di" bpmnElement="Event_1otyxgi">
|
||||||
|
<dc:Bounds x="312" y="222" width="36" height="36" />
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds x="305" y="265" width="51" height="27" />
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_1nl5h18_di" bpmnElement="Flow_1nl5h18">
|
||||||
|
<di:waypoint x="-222" y="240" />
|
||||||
|
<di:waypoint x="-170" y="240" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_1omdz2s_di" bpmnElement="Flow_1omdz2s">
|
||||||
|
<di:waypoint x="-70" y="240" />
|
||||||
|
<di:waypoint x="-10" y="240" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_1nzxnal_di" bpmnElement="Flow_1nzxnal">
|
||||||
|
<di:waypoint x="90" y="240" />
|
||||||
|
<di:waypoint x="150" y="240" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_00h8381_di" bpmnElement="Flow_00h8381">
|
||||||
|
<di:waypoint x="250" y="240" />
|
||||||
|
<di:waypoint x="312" y="240" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
</bpmndi:BPMNPlane>
|
||||||
|
</bpmndi:BPMNDiagram>
|
||||||
|
</bpmn:definitions>
|
@ -6,6 +6,6 @@
|
|||||||
],
|
],
|
||||||
"fault_or_suspend_on_exception": "fault",
|
"fault_or_suspend_on_exception": "fault",
|
||||||
"metadata_extraction_paths": null,
|
"metadata_extraction_paths": null,
|
||||||
"primary_file_name": null,
|
"primary_file_name": "Data Modification.bpmn",
|
||||||
"primary_process_id": null
|
"primary_process_id": "Process_gvu6xe0"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user