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

Commit 15bfd58

Browse files
committed
Merge pull request #81 from adamfowleruk/feature-80
Fixes #80 - tested fork within fork example working with 12 pipelines
2 parents 351e930 + f48972d commit 15bfd58

File tree

6 files changed

+533
-277
lines changed

6 files changed

+533
-277
lines changed

data/examples/bpmn2/fork-within-fork.bpmn2

Lines changed: 154 additions & 151 deletions
Large diffs are not rendered by default.

documentation/STEPS.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,16 @@ c) To configure a User Task assigned to anyone with access to a named work queue
5454

5555
Note: Although it is called a Queue, work can be completed in any order.
5656

57-
## Exclusive Gateway
57+
## Gateways
58+
59+
Gateways are supported as below. The fork and rendezvous semantics are as follows:-
60+
61+
| Gateway | Fork method | Rendezvous Method |
62+
| Exclusive | CONDITIONAL (First true, or default route) | NONE (Only ever one route) |
63+
| Parallel | NONE (All routes) | ALL |
64+
| Inclusive | CONDITIONAL (All true, or default route) | ALL |
65+
66+
### Exclusive Gateway
5867

5968
The ability to select a single execution route based on a list of choices and evaluated criteria. A decision point.
6069

@@ -74,9 +83,61 @@ Finally, configure your route criteria
7483
- Click on the exclusive gateway
7584
- Click on Properties -> Gateway
7685
- For each route, enter an XQuery expression that evaluates to true (equals fn:true())
86+
- You may specify a default route to be executed always, if no other route evaluates to true
7787

7888
See *XQuery Expressions* later in this document for details on expressions, and examples.
7989

90+
### Parallel Gateway
91+
92+
Allows multiple simultaneous routes to be processed at the same time.
93+
94+
Internally, creates workflow sub-process documents and requires multiple CPF pipeline configurations - created by the importer.
95+
96+
First, create a parallel gateway:-
97+
- Drop a Parallel Gateway on to the process diagram
98+
- Click on Properties -> Gateway
99+
- Set Gateway direction to 'Diverging'
100+
101+
Then create your routes:-
102+
- Mouse over your gateway
103+
- Click and drag the connector icon (arrow) to another step. Name this connector (route).
104+
- Give each route a meaningful name
105+
106+
Finally, Synchronise all parallel flows back to another Parallel Gateway (Rendezvous):-
107+
- Drop an Parallel Gateway on to the process diagram
108+
- Click on Properties -> Gateway
109+
- Set gateway direction to 'Converging'
110+
- Connect all route flows to this second parallel gateway
111+
112+
### Inclusive Gateway
113+
114+
Like a Parallel Gateway as it allows execution of multiple routes simultaneously, but it checks the conditions on those
115+
routes and allows a default route to be specified, just like an Exclusive Gateway.
116+
117+
First, create an Inclusive Gateway:-
118+
- Drop an Inclusive Gateway on to the process diagram
119+
- Click on Properties -> Gateway
120+
- Set Gateway Direction to 'Diverging'
121+
122+
Then, create your routes:-
123+
- Mouse over your gateway
124+
- Click and drag the connector icon (arrow) to another step. Name this connector (route).
125+
- Give each route a meaningful name
126+
127+
Then, configure your route criteria
128+
- Click on the inclusive gateway
129+
- Click on Properties -> Gateway
130+
- For each route, enter an XQuery expression that evaluates to true (equals fn:true())
131+
- You may specify a default route to be executed always, if no other route evaluates to true
132+
133+
See *XQuery Expressions* later in this document for details on expressions, and examples.
134+
135+
Finally, Synchronise all parallel flows back to another Inclusive Gateway (Rendezvous):-
136+
- Drop an Inclusive Gateway on to the process diagram
137+
- Click on Properties -> Gateway
138+
- Set gateway direction to 'Converging'
139+
- Connect all route flows to this second inclusive gateway
140+
80141
## Send Task
81142

82143
This task can send SOAP, HTTP-REST and Email messages (amongst others). It is currently in development, with smtp

modules/app/models/lib-stack.xqy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ declare function stack:push($map as map:map,$obj as item()) as empty-sequence()
66
map:put($map,xs:string(map:count($map) + 1),$obj)
77
};
88

9-
declare function stack:peek($map as map:map) as item() {
9+
declare function stack:peek($map as map:map) {
1010
map:get($map,xs:string(map:count($map)))
1111
};
1212

13-
declare function stack:previous($map as map:map) as item() {
13+
declare function stack:previous($map as map:map) {
1414
map:get($map,xs:string(map:count($map) - 1))
1515
};
1616

17-
declare function stack:pop($map as map:map) as item() {
17+
declare function stack:pop($map as map:map) {
1818
let $count := xs:string(map:count($map))
1919
let $item := map:get($map,$count)
2020
let $remove := map:delete($map,$count)

0 commit comments

Comments
 (0)