Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 08be107

Browse files
committed
More eval testing
Added gateways to REST tests workflow fixed attachment and regex replacement evaluations Small scripting niceties (all.sh)
1 parent bb1a62d commit 08be107

17 files changed

+461
-341
lines changed

data/.initial.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"prefix": "/initial", "collections": ["initialcontent"], "folder": "empty"
2+
"prefix": "/initial", "collections": ["initialcontent","testdata"], "folder": "initial"
33
}

data/examples/bpmn2/015-restapi-tests.bpmn

Lines changed: 115 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
<bpmn2:resource id="Resource_1" name="admin"/>
66
<bpmn2:resource id="Resource_2" name="Editors"/>
77
<bpmn2:process id="015-restapi-tests" name="REST API Test 015" processType="Public">
8-
<bpmn2:userTask id="UserTask_2" name="SomeoneDoSomething">
8+
<bpmn2:userTask id="UserTask_2" name="Editor Queue Approval">
99
<bpmn2:documentation id="Documentation_20">Assigned to a work stack</bpmn2:documentation>
1010
<bpmn2:incoming>ns1:SequenceFlow_3</bpmn2:incoming>
1111
<bpmn2:outgoing>ns1:SequenceFlow_4</bpmn2:outgoing>
1212
<bpmn2:resourceRole id="ResourceRole_2" name="Queue">
1313
<bpmn2:resourceRef>Resource_2</bpmn2:resourceRef>
1414
</bpmn2:resourceRole>
1515
</bpmn2:userTask>
16-
<bpmn2:sequenceFlow id="SequenceFlow_4" name="Complete" sourceRef="UserTask_2" targetRef="EndEvent_1"/>
16+
<bpmn2:sequenceFlow id="SequenceFlow_4" name="Complete" sourceRef="UserTask_2" targetRef="ExclusiveGateway_1"/>
1717
<bpmn2:startEvent id="StartEvent_1" name="Start">
1818
<bpmn2:outgoing>ns1:SequenceFlow_2</bpmn2:outgoing>
1919
</bpmn2:startEvent>
2020
<bpmn2:sequenceFlow id="SequenceFlow_2" sourceRef="StartEvent_1" targetRef="UserTask_1"/>
21-
<bpmn2:userTask id="UserTask_1" name="DecideSomething">
21+
<bpmn2:userTask id="UserTask_1" name="User Decides Something">
2222
<bpmn2:documentation id="Documentation_19">Named user task</bpmn2:documentation>
2323
<bpmn2:incoming>ns1:SequenceFlow_2</bpmn2:incoming>
2424
<bpmn2:outgoing>ns1:SequenceFlow_3</bpmn2:outgoing>
@@ -27,8 +27,50 @@
2727
</bpmn2:resourceRole>
2828
</bpmn2:userTask>
2929
<bpmn2:sequenceFlow id="SequenceFlow_3" name="Complete" sourceRef="UserTask_1" targetRef="UserTask_2"/>
30-
<bpmn2:endEvent id="EndEvent_1" name="End">
30+
<bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Check Has Attachment" gatewayDirection="Diverging" default="SequenceFlow_6">
3131
<bpmn2:incoming>ns1:SequenceFlow_4</bpmn2:incoming>
32+
<bpmn2:outgoing>ns1:SequenceFlow_1</bpmn2:outgoing>
33+
<bpmn2:outgoing>ns1:SequenceFlow_6</bpmn2:outgoing>
34+
</bpmn2:exclusiveGateway>
35+
<bpmn2:sequenceFlow id="SequenceFlow_1" name="Has Attachment" sourceRef="ExclusiveGateway_1" targetRef="Task_1">
36+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_1" language="http://www.w3.org/1999/XPath">fn:not(fn:empty($wf:process/wf:attachments/wf:attachment[@name=&quot;Document&quot;]/@uri))</bpmn2:conditionExpression>
37+
</bpmn2:sequenceFlow>
38+
<bpmn2:sequenceFlow id="SequenceFlow_6" name="No Attachment" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_3"/>
39+
<bpmn2:task id="Task_1" name="Do Something With Attachment">
40+
<bpmn2:incoming>ns1:SequenceFlow_1</bpmn2:incoming>
41+
<bpmn2:outgoing>ns1:SequenceFlow_5</bpmn2:outgoing>
42+
</bpmn2:task>
43+
<bpmn2:sequenceFlow id="SequenceFlow_5" name="Complete" sourceRef="Task_1" targetRef="ExclusiveGateway_2"/>
44+
<bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Check Document Property" gatewayDirection="Diverging" default="SequenceFlow_7">
45+
<bpmn2:incoming>ns1:SequenceFlow_5</bpmn2:incoming>
46+
<bpmn2:outgoing>ns1:SequenceFlow_7</bpmn2:outgoing>
47+
<bpmn2:outgoing>ns1:SequenceFlow_8</bpmn2:outgoing>
48+
</bpmn2:exclusiveGateway>
49+
<bpmn2:sequenceFlow id="SequenceFlow_7" name="Property doesn't match" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_3"/>
50+
<bpmn2:sequenceFlow id="SequenceFlow_8" name="Property Matches" sourceRef="ExclusiveGateway_2" targetRef="Task_2">
51+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_2" language="http://www.w3.org/1999/XPath">fn:doc(xs:string($wf:process/wf:attachments/wf:attachment[@name=&quot;Document&quot;]/@uri))/mydoc/choiceA = &quot;wibble&quot;</bpmn2:conditionExpression>
52+
</bpmn2:sequenceFlow>
53+
<bpmn2:task id="Task_2" name="Do something with value">
54+
<bpmn2:incoming>ns1:SequenceFlow_8</bpmn2:incoming>
55+
<bpmn2:outgoing>ns1:SequenceFlow_9</bpmn2:outgoing>
56+
</bpmn2:task>
57+
<bpmn2:sequenceFlow id="SequenceFlow_9" name="Complete" sourceRef="Task_2" targetRef="ExclusiveGateway_3"/>
58+
<bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Should we party like it's 1999 (before millennium)?" gatewayDirection="Diverging" default="SequenceFlow_11">
59+
<bpmn2:incoming>ns1:SequenceFlow_7</bpmn2:incoming>
60+
<bpmn2:incoming>ns1:SequenceFlow_6</bpmn2:incoming>
61+
<bpmn2:incoming>ns1:SequenceFlow_9</bpmn2:incoming>
62+
<bpmn2:outgoing>ns1:SequenceFlow_10</bpmn2:outgoing>
63+
<bpmn2:outgoing>ns1:SequenceFlow_11</bpmn2:outgoing>
64+
</bpmn2:exclusiveGateway>
65+
<bpmn2:sequenceFlow id="SequenceFlow_10" name="Before Millennium" sourceRef="ExclusiveGateway_3" targetRef="EndEvent_1">
66+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_3" language="http://www.w3.org/1999/XPath">fn:current-dateTime() lt xs:dateTime(&quot;2000-01-01T00:00:00&quot;)</bpmn2:conditionExpression>
67+
</bpmn2:sequenceFlow>
68+
<bpmn2:sequenceFlow id="SequenceFlow_11" name="Later than 1999" sourceRef="ExclusiveGateway_3" targetRef="EndEvent_2"/>
69+
<bpmn2:endEvent id="EndEvent_1" name="End Happy">
70+
<bpmn2:incoming>ns1:SequenceFlow_10</bpmn2:incoming>
71+
</bpmn2:endEvent>
72+
<bpmn2:endEvent id="EndEvent_2" name="End Sad">
73+
<bpmn2:incoming>ns1:SequenceFlow_11</bpmn2:incoming>
3274
</bpmn2:endEvent>
3375
<bpmn2:property id="Property_1" itemSubjectRef="_ItemDefinition_5" name="processData"/>
3476
</bpmn2:process>
@@ -38,14 +80,32 @@
3880
<dc:Bounds height="36.0" width="36.0" x="30.0" y="143.0"/>
3981
</bpmndi:BPMNShape>
4082
<bpmndi:BPMNShape id="BPMNShape_2" bpmnElement="EndEvent_1">
41-
<dc:Bounds height="36.0" width="36.0" x="820.0" y="143.0"/>
83+
<dc:Bounds height="36.0" width="36.0" x="150.0" y="261.0"/>
4284
</bpmndi:BPMNShape>
4385
<bpmndi:BPMNShape id="BPMNShape_UserTask_2" bpmnElement="UserTask_2">
4486
<dc:Bounds height="50.0" width="161.0" x="510.0" y="136.0"/>
4587
</bpmndi:BPMNShape>
4688
<bpmndi:BPMNShape id="BPMNShape_UserTask_1" bpmnElement="UserTask_1">
4789
<dc:Bounds height="50.0" width="161.0" x="200.0" y="136.0"/>
4890
</bpmndi:BPMNShape>
91+
<bpmndi:BPMNShape id="BPMNShape_ExclusiveGateway_1" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
92+
<dc:Bounds height="50.0" width="50.0" x="565.0" y="254.0"/>
93+
</bpmndi:BPMNShape>
94+
<bpmndi:BPMNShape id="BPMNShape_Task_1" bpmnElement="Task_1">
95+
<dc:Bounds height="50.0" width="110.0" x="730.0" y="254.0"/>
96+
</bpmndi:BPMNShape>
97+
<bpmndi:BPMNShape id="BPMNShape_ExclusiveGateway_2" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
98+
<dc:Bounds height="50.0" width="50.0" x="760.0" y="367.0"/>
99+
</bpmndi:BPMNShape>
100+
<bpmndi:BPMNShape id="BPMNShape_Task_2" bpmnElement="Task_2">
101+
<dc:Bounds height="50.0" width="110.0" x="730.0" y="476.0"/>
102+
</bpmndi:BPMNShape>
103+
<bpmndi:BPMNShape id="BPMNShape_ExclusiveGateway_3" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
104+
<dc:Bounds height="50.0" width="50.0" x="390.0" y="367.0"/>
105+
</bpmndi:BPMNShape>
106+
<bpmndi:BPMNShape id="BPMNShape_EndEvent_1" bpmnElement="EndEvent_2">
107+
<dc:Bounds height="36.0" width="36.0" x="150.0" y="483.0"/>
108+
</bpmndi:BPMNShape>
49109
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_1" targetElement="BPMNShape_UserTask_1">
50110
<di:waypoint xsi:type="dc:Point" x="66.0" y="161.0"/>
51111
<di:waypoint xsi:type="dc:Point" x="126.0" y="161.0"/>
@@ -58,12 +118,56 @@
58118
<di:waypoint xsi:type="dc:Point" x="428.0" y="161.0"/>
59119
<di:waypoint xsi:type="dc:Point" x="510.0" y="161.0"/>
60120
</bpmndi:BPMNEdge>
61-
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_UserTask_2" targetElement="BPMNShape_2">
62-
<di:waypoint xsi:type="dc:Point" x="671.0" y="161.0"/>
63-
<di:waypoint xsi:type="dc:Point" x="738.0" y="161.0"/>
64-
<di:waypoint xsi:type="dc:Point" x="738.0" y="161.0"/>
65-
<di:waypoint xsi:type="dc:Point" x="820.0" y="161.0"/>
121+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_UserTask_2" targetElement="BPMNShape_ExclusiveGateway_1">
122+
<di:waypoint xsi:type="dc:Point" x="590.0" y="186.0"/>
123+
<di:waypoint xsi:type="dc:Point" x="590.0" y="216.0"/>
124+
<di:waypoint xsi:type="dc:Point" x="590.0" y="216.0"/>
125+
<di:waypoint xsi:type="dc:Point" x="590.0" y="254.0"/>
126+
</bpmndi:BPMNEdge>
127+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_ExclusiveGateway_1" targetElement="BPMNShape_Task_1">
128+
<di:waypoint xsi:type="dc:Point" x="616.0" y="279.0"/>
129+
<di:waypoint xsi:type="dc:Point" x="667.0" y="279.0"/>
130+
<di:waypoint xsi:type="dc:Point" x="667.0" y="279.0"/>
131+
<di:waypoint xsi:type="dc:Point" x="730.0" y="279.0"/>
132+
</bpmndi:BPMNEdge>
133+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_ExclusiveGateway_2">
134+
<di:waypoint xsi:type="dc:Point" x="785.0" y="304.0"/>
135+
<di:waypoint xsi:type="dc:Point" x="785.0" y="332.0"/>
136+
<di:waypoint xsi:type="dc:Point" x="785.0" y="332.0"/>
137+
<di:waypoint xsi:type="dc:Point" x="785.0" y="367.0"/>
138+
</bpmndi:BPMNEdge>
139+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="BPMNShape_ExclusiveGateway_1" targetElement="BPMNShape_ExclusiveGateway_3">
140+
<di:waypoint xsi:type="dc:Point" x="565.0" y="279.0"/>
141+
<di:waypoint xsi:type="dc:Point" x="415.0" y="279.0"/>
142+
<di:waypoint xsi:type="dc:Point" x="415.0" y="367.0"/>
143+
</bpmndi:BPMNEdge>
144+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="BPMNShape_ExclusiveGateway_2" targetElement="BPMNShape_ExclusiveGateway_3">
145+
<di:waypoint xsi:type="dc:Point" x="760.0" y="392.0"/>
146+
<di:waypoint xsi:type="dc:Point" x="617.0" y="392.0"/>
147+
<di:waypoint xsi:type="dc:Point" x="617.0" y="392.0"/>
148+
<di:waypoint xsi:type="dc:Point" x="441.0" y="392.0"/>
149+
</bpmndi:BPMNEdge>
150+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="BPMNShape_ExclusiveGateway_2" targetElement="BPMNShape_Task_2">
151+
<di:waypoint xsi:type="dc:Point" x="785.0" y="418.0"/>
152+
<di:waypoint xsi:type="dc:Point" x="785.0" y="444.0"/>
153+
<di:waypoint xsi:type="dc:Point" x="785.0" y="444.0"/>
154+
<di:waypoint xsi:type="dc:Point" x="785.0" y="476.0"/>
155+
</bpmndi:BPMNEdge>
156+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="BPMNShape_Task_2" targetElement="BPMNShape_ExclusiveGateway_3">
157+
<di:waypoint xsi:type="dc:Point" x="730.0" y="501.0"/>
158+
<di:waypoint xsi:type="dc:Point" x="415.0" y="501.0"/>
159+
<di:waypoint xsi:type="dc:Point" x="415.0" y="418.0"/>
160+
</bpmndi:BPMNEdge>
161+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="BPMNShape_ExclusiveGateway_3" targetElement="BPMNShape_2">
162+
<di:waypoint xsi:type="dc:Point" x="390.0" y="392.0"/>
163+
<di:waypoint xsi:type="dc:Point" x="168.0" y="392.0"/>
164+
<di:waypoint xsi:type="dc:Point" x="168.0" y="297.0"/>
165+
</bpmndi:BPMNEdge>
166+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="BPMNShape_ExclusiveGateway_3" targetElement="BPMNShape_EndEvent_1">
167+
<di:waypoint xsi:type="dc:Point" x="390.0" y="392.0"/>
168+
<di:waypoint xsi:type="dc:Point" x="168.0" y="392.0"/>
169+
<di:waypoint xsi:type="dc:Point" x="168.0" y="483.0"/>
66170
</bpmndi:BPMNEdge>
67171
</bpmndi:BPMNPlane>
68172
</bpmndi:BPMNDiagram>
69-
</bpmn2:definitions>
173+
</bpmn2:definitions>

data/initial/sampledoc.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<mydoc>
2+
<choiceA>wibble</choiceA>
3+
<choiceB>C</choiceB>
4+
</mydoc>

0 commit comments

Comments
 (0)