public class AndFork extends AbstractGateway
The underlying token model implies restraints on the subsequent branches. The following figure illustrates
the two types of valid usages.
One valid pattern is a 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.
+--[3]--+
[1]--[AND] [AND/CD]--[6]
+--[4]--+
+--[3]
[1]--[AND]
+--[4]
Note that an AndFork behaves identical to an OrFork with a null condition
for every subsequent branch.| Constructor and Description |
|---|
AndFork(int id) |
AndFork(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.
|
storegetId, getName, toStringpublic AndFork(int id)
public AndFork(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.