public class OrFork extends AbstractConditionalGateway
The underlying token model implies restraints on the subsequent branches. The following figure illustrates
the two types of valid usages.
One valid pattern is the balanced fork-join block which is built of a fork and a join. It synchronises (re-joins)
all branches leaving the fork in the paired join. As a join, either an AndJoin or a
CancellingDiscriminator may be used but not an XorJoin.
The other valid pattern leaves all subsequent branches independently and never synchronises (re-joins)
those back. In that case, every subsequent branch is ended implicitly by a node without outgoing
transitions.
+-(condition1)-[3]--+
[1]--[OR] [AND/CD]--[6]
+-(condition2)-[4]--+
+-(condition1)-[3]
[1]--[OR]
+-(condition2)-[4]
Note that while an AndFork executes all subsequent branches, this kind of gateway selects 0 to all
subsequent branches depending on the transition conditions. If no subsequent branches is selected, the incoming
token is terminated.| Constructor and Description |
|---|
OrFork(int id) |
OrFork(int id,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(GraphEngine engine,
Token token)
Called when the
GraphEngine cancels the execution of a
Token, that is currently pointing to this node and is in a wait
state. |
void |
execute(GraphEngine engine,
Token token)
Performs node specific logic.
|
addCondition, getConditionsstoregetId, getName, toStringpublic OrFork(int id)
public OrFork(int id,
String name)
public void execute(GraphEngine engine, Token token)
NodeGraphEngineFacade#complete(WorkItem) method
must be called to continue executing the GraphInstance.engine - the GraphEngine which is performing the executiontoken - the Token which is currently executing in this nodepublic void cancel(GraphEngine engine, Token token)
NodeGraphEngine cancels the execution of a
Token, that is currently pointing to this node and is in a wait
state.engine - the GraphEngine which is performing the executiontoken - the Token pointing to this nodeCopyright © 2018. All rights reserved.