Interface ICreateFlowGraphContext<TElement extends IWorkflowNodeTypeProviding>
-
- Type Parameters:
TElement- The type of the node elements on which the analysis is performed. This type may be different depending on whether the analysis is performed on the backend data modelWorkflowNodeor the frontend view model.
public interface ICreateFlowGraphContext<TElement extends IWorkflowNodeTypeProviding>Context provided to the node handlers during a call tocreateFlowGraph. See that method for more details on flow graphs. Handlers may use this context to recursively analyze their children as well.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description intchildCount(TElement node)default voidconnect(com.google.common.collect.ImmutableSet<NodeKey> from, INodeKeyProviding to, IFlowGraphEdgeDataConfigurator data)For eachsourceinfrom, adds an edge(source, to)to the flow graph.default voidconnect(com.google.common.collect.ImmutableSet<NodeKey> from, NodeKey to)Deprecated.voidconnect(com.google.common.collect.ImmutableSet<NodeKey> from, NodeKey to, IFlowGraphEdgeDataConfigurator data)For eachsourceinfrom, adds an edge(source, to)to the flow graph.default voidconnect(com.google.common.collect.ImmutableSet<NodeKey> from, TElement toParent, int toChildIndex)voidconnect(com.google.common.collect.ImmutableSet<NodeKey> from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.voidconnect(com.google.common.collect.ImmutableSet<NodeKey> from, TElement to, IFlowGraphEdgeDataConfigurator data)Adds an edge(from, child)to the flow graph for every element in the set of from nodes.default voidconnect(INodeKeyProviding from, INodeKeyProviding to, IFlowGraphEdgeDataConfigurator data)Adds an edge(from, to)to the flow graph.default voidconnect(INodeKeyProviding from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.default voidconnect(NodeKey from, NodeKey to)Deprecated.voidconnect(NodeKey from, NodeKey to, IFlowGraphEdgeDataConfigurator data)Adds an edge(from, to)to the flow graph.voidconnect(NodeKey from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.default voidconnect(TElement from, TElement to)voidconnect(TElement from, TElement to, IFlowGraphEdgeDataConfigurator data)Adds an edge(from, to)to the flow graph.voidconnectChildToParent(TElement parent, int childIndex, IFlowGraphEdgeDataConfigurator data)Finds thechildat the given index in thetoParentand adds an edge(child, parent)to the flow graph.default voidconnectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, INodeKeyProviding to, IFlowGraphEdgeDataConfigurator data)For eachsourceinfrom, adds an edge(source, to)to the flow graph.voidconnectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, NodeKey to, IFlowGraphEdgeDataConfigurator data)For eachsourceinfrom, adds an edge(source, to)to the flow graph.voidconnectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.voidconnectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, TElement to, IFlowGraphEdgeDataConfigurator data)Adds an edge(from, child)to the flow graph for every element in the set of from nodes.default voidconnectParentToChild(TElement parent, int childIndex)voidconnectParentToChild(TElement parent, int childIndex, IFlowGraphEdgeDataConfigurator data)Adds an edge(parent, parent[childIndex])to the flow graph.IFlowGraphEndPointscreateFlowGraph(TElement node)Creates the flow graph for the given node and return its end points.IFlowGraphEndPointscreateFlowGraphForChild(TElement parent, int childIndex)Creates the flow graph for the given node and return its end points.NodeKeycreateNodeKey(TElement element)Creates the element key that needs to be entered in the list of potentially reachable nodes.IFlowGraphEndPointsendPoints(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Normal> normalEndPoints, com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Throwing> throwingEndPoints, com.google.common.collect.ImmutableSet<FlowGraphEndPoint.ControlTransfer> controlTransferEndPoints, com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Returning> returningEndPoints)default IFlowGraphEndPointsendPoints(com.google.common.collect.ImmutableSet<NodeKey> normalEndPoints, com.google.common.collect.ImmutableSet<NodeKey> throwingEndPoints)Deprecated.IFlowGraphEndPointsendPointsAlwaysNormal(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Normal> normalEndPoints)Creates the end points for a node that always completes normally and never throws or returns.default IFlowGraphEndPointsendPointsAlwaysReturning()Deprecated.Returning end points are not handled separately, useendPointsAlwaysReturning(ImmutableSet).IFlowGraphEndPointsendPointsAlwaysReturning(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Returning> returningEndPoints)Creates the end points for a node that always returns.IFlowGraphEndPointsendPointsAlwaysThrowing(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Throwing> throwingEndPoints)Creates the end points for a node that always throws an exception.IFlowGraphEndPointsendPointsAlwaysTransferringControl(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.ControlTransfer> controlTransferEndPoints)Creates the end points for a node that always transfers control and never completes normally and never throws.default IFlowGraphEndPointsendPointsNeverNormal(com.google.common.collect.ImmutableSet<NodeKey> throwingEndPoints)Deprecated.default IFlowGraphEndPointsendPointsNeverThrowing(com.google.common.collect.ImmutableSet<NodeKey> normalEndPoints)Deprecated.default IFlowGraphEndPointsendPointsSameNormalAndThrowing(com.google.common.collect.ImmutableSet<NodeKey> endPoints)Deprecated.booleanisHasChild(TElement node, int childIndex)<E> com.google.common.collect.ImmutableSet<E>union(com.google.common.collect.ImmutableSet<E>... sets)Helper method that computes the union of all given sets.<E> com.google.common.collect.ImmutableSet<E>union(com.google.common.collect.ImmutableSet<E> set1, com.google.common.collect.ImmutableSet<E> set2)Helper method that computes the union of all given sets.<E> com.google.common.collect.ImmutableSet<E>union(E endPoint, com.google.common.collect.ImmutableSet<E> set)Helper method that computes the union of the given key with all items of the give set.<E> com.google.common.collect.ImmutableSet<E>union(Iterable<com.google.common.collect.ImmutableSet<E>> sets)Helper method that computes the union of all given sets.
-
-
-
Method Detail
-
childCount
int childCount(TElement node)
- Parameters:
node- Node to check.- Returns:
- Number of children the given node contains.
-
connect
default void connect(INodeKeyProviding from, INodeKeyProviding to, IFlowGraphEdgeDataConfigurator data)
Adds an edge(from, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
default void connect(INodeKeyProviding from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)
Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.- Parameters:
from- Source node.toParent- Parent with the target node.toChildIndex- Index of the target node in the parent node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
default void connect(com.google.common.collect.ImmutableSet<NodeKey> from, INodeKeyProviding to, IFlowGraphEdgeDataConfigurator data)
For eachsourceinfrom, adds an edge(source, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
@Deprecated default void connect(com.google.common.collect.ImmutableSet<NodeKey> from, NodeKey to)
Deprecated.For eachsourceinfrom, adds an edge(source, to)to the flow graph.- Parameters:
from- Source node.to- Target node.
-
connect
void connect(com.google.common.collect.ImmutableSet<NodeKey> from, NodeKey to, IFlowGraphEdgeDataConfigurator data)
For eachsourceinfrom, adds an edge(source, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
void connect(com.google.common.collect.ImmutableSet<NodeKey> from, TElement to, IFlowGraphEdgeDataConfigurator data)
Adds an edge(from, child)to the flow graph for every element in the set of from nodes.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.1.0
- See Also:
etc. for standard implementations.
-
connect
@Deprecated default void connect(com.google.common.collect.ImmutableSet<NodeKey> from, TElement toParent, int toChildIndex)
Deprecated.Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.- Parameters:
from- Source node.toParent- Parent with the target node.toChildIndex- Index of the target node in the parent node.
-
connect
void connect(com.google.common.collect.ImmutableSet<NodeKey> from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)
Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.- Parameters:
from- Source node.toParent- Parent with the target node.toChildIndex- Index of the target node in the parent node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
@Deprecated default void connect(NodeKey from, NodeKey to)
Deprecated.Adds an edge(from, to)to the flow graph.- Parameters:
from- Source node.to- Target node.
-
connect
void connect(NodeKey from, NodeKey to, IFlowGraphEdgeDataConfigurator data)
Adds an edge(from, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
void connect(NodeKey from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)
Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.- Parameters:
from- Source node.toParent- Parent with the target node.toChildIndex- Index of the target node in the parent node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connect
@Deprecated default void connect(TElement from, TElement to)
Deprecated.Adds an edge(from, to)to the flow graph.- Parameters:
from- Source node.to- Target node.
-
connect
void connect(TElement from, TElement to, IFlowGraphEdgeDataConfigurator data)
Adds an edge(from, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
connectChildToParent
void connectChildToParent(TElement parent, int childIndex, IFlowGraphEdgeDataConfigurator data)
Finds thechildat the given index in thetoParentand adds an edge(child, parent)to the flow graph.- Parameters:
parent- Parent node to which to draw a connection.childIndex- Index of the child from which to draw a connection.data- For setting the edge data on the added edges.- Since:
- 8.1.0
- See Also:
etc. for standard implementations.
-
connectEndPoints
default void connectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, INodeKeyProviding to, IFlowGraphEdgeDataConfigurator data)
For eachsourceinfrom, adds an edge(source, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.1.0
- See Also:
etc. for standard implementations.
-
connectEndPoints
void connectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, NodeKey to, IFlowGraphEdgeDataConfigurator data)
For eachsourceinfrom, adds an edge(source, to)to the flow graph.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.1.0
- See Also:
etc. for standard implementations.
-
connectEndPoints
void connectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, TElement to, IFlowGraphEdgeDataConfigurator data)
Adds an edge(from, child)to the flow graph for every element in the set of from nodes.- Parameters:
from- Source node.to- Target node.data- For setting the edge data on the added edges.- Since:
- 8.1.0
- See Also:
etc. for standard implementations.
-
connectEndPoints
void connectEndPoints(com.google.common.collect.ImmutableSet<? extends INodeKeyProviding> from, TElement toParent, int toChildIndex, IFlowGraphEdgeDataConfigurator data)
Finds thechildat the given index in thetoParentand adds an edge(from, child)to the flow graph.- Parameters:
from- Source node.toParent- Parent with the target node.toChildIndex- Index of the target node in the parent node.data- For setting the edge data on the added edges.- Since:
- 8.1.0
- See Also:
etc. for standard implementations.
-
connectParentToChild
@Deprecated default void connectParentToChild(TElement parent, int childIndex)
Deprecated.Finds thechildat the given index in thetoParentand adds an edge(parent, child)to the flow graph.- Parameters:
parent- Parent node from which to draw a connection.childIndex- Index of the parent's child to which to draw a connection.
-
connectParentToChild
void connectParentToChild(TElement parent, int childIndex, IFlowGraphEdgeDataConfigurator data)
Adds an edge(parent, parent[childIndex])to the flow graph.- Parameters:
parent- Parent node from which to draw a connection.childIndex- Index of the parent's child to which to draw a connection.data- For setting the edge data on the added edges.- Since:
- 8.0.0
- See Also:
etc. for standard implementations.
-
createFlowGraph
IFlowGraphEndPoints createFlowGraph(TElement node) throws WorkflowAnalysisException
Creates the flow graph for the given node and return its end points.- Parameters:
node- Child to analyze.- Returns:
- The end points of the given node.
- Throws:
WorkflowAnalysisException- When the analysis could not be completed, usually because a child threw an exception.
-
createFlowGraphForChild
IFlowGraphEndPoints createFlowGraphForChild(TElement parent, int childIndex) throws WorkflowAnalysisException
Creates the flow graph for the given node and return its end points.- Parameters:
parent- Parent node with a child to analyze.childIndex- Index of the child to analyze.- Returns:
- The end points of the given node.
- Throws:
WorkflowAnalysisException- When the analysis could not be completed, usually because a child threw an exception.
-
createNodeKey
NodeKey createNodeKey(TElement element)
Creates the element key that needs to be entered in the list of potentially reachable nodes.- Parameters:
element- Element for which to create the key.- Returns:
- The key of the element.
-
endPoints
IFlowGraphEndPoints endPoints(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Normal> normalEndPoints, com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Throwing> throwingEndPoints, com.google.common.collect.ImmutableSet<FlowGraphEndPoint.ControlTransfer> controlTransferEndPoints, com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Returning> returningEndPoints)
- Parameters:
normalEndPoints- The normal end points, seeIFlowGraphEndPoints.getNormal()throwingEndPoints- The throwing end points, seeIFlowGraphEndPoints.getThrowing().controlTransferEndPoints- The control transfer end points, seeIFlowGraphEndPoints.getControlTransfer().returningEndPoints- The returning end points, seeIFlowGraphEndPoints.getReturning().- Returns:
- A new end points POJO instance with the given data.
- Since:
- 8.1.0
-
endPoints
@Deprecated default IFlowGraphEndPoints endPoints(com.google.common.collect.ImmutableSet<NodeKey> normalEndPoints, com.google.common.collect.ImmutableSet<NodeKey> throwingEndPoints)
Deprecated.- Parameters:
normalEndPoints- The normal end points, seeIFlowGraphEndPoints.getNormal()throwingEndPoints- The throwing end points, seeIFlowGraphEndPoints.getThrowing().- Returns:
- A new end points POJO instance with the given data.
-
endPointsAlwaysNormal
IFlowGraphEndPoints endPointsAlwaysNormal(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Normal> normalEndPoints)
Creates the end points for a node that always completes normally and never throws or returns.- Parameters:
normalEndPoints- The normal end points, seeIFlowGraphEndPoints.getNormal().- Returns:
- A new end points POJO instance with the given data and all other
end pointsset to an empty set.
-
endPointsAlwaysReturning
@Deprecated default IFlowGraphEndPoints endPointsAlwaysReturning()
Deprecated.Returning end points are not handled separately, useendPointsAlwaysReturning(ImmutableSet).- Returns:
- A new POJO with no normal and no throwing end points.
-
endPointsAlwaysReturning
IFlowGraphEndPoints endPointsAlwaysReturning(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Returning> returningEndPoints)
Creates the end points for a node that always returns.- Parameters:
returningEndPoints- The returning end points, seeIFlowGraphEndPoints.getReturning().- Returns:
- A new end points POJO instance with the given data and all other
end pointsset to an empty set. - Since:
- 8.1.0
-
endPointsAlwaysThrowing
IFlowGraphEndPoints endPointsAlwaysThrowing(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.Throwing> throwingEndPoints)
Creates the end points for a node that always throws an exception.- Parameters:
throwingEndPoints- The throwing end points, seeIFlowGraphEndPoints.getThrowing().- Returns:
- A new end points POJO instance with the given data and all other
end pointsset to an empty set.
-
endPointsAlwaysTransferringControl
IFlowGraphEndPoints endPointsAlwaysTransferringControl(com.google.common.collect.ImmutableSet<FlowGraphEndPoint.ControlTransfer> controlTransferEndPoints)
Creates the end points for a node that always transfers control and never completes normally and never throws.- Parameters:
controlTransferEndPoints- The control transfer end points, seeIFlowGraphEndPoints.getControlTransfer().- Returns:
- A new end points POJO instance with the given data and all other
end pointsset to an empty set.
-
endPointsNeverNormal
@Deprecated default IFlowGraphEndPoints endPointsNeverNormal(com.google.common.collect.ImmutableSet<NodeKey> throwingEndPoints)
Deprecated.- Parameters:
throwingEndPoints- The value for bothIFlowGraphEndPoints.getThrowingEndPoints().- Returns:
- A new POJO with the given data and
IFlowGraphEndPoints.getNormalEndPoints()set to an empty set.
-
endPointsNeverThrowing
@Deprecated default IFlowGraphEndPoints endPointsNeverThrowing(com.google.common.collect.ImmutableSet<NodeKey> normalEndPoints)
Deprecated.- Parameters:
normalEndPoints- The value for bothIFlowGraphEndPoints.getNormalEndPoints().- Returns:
- A new POJO with the given data and
IFlowGraphEndPoints.getThrowingEndPoints()set to an empty set.
-
endPointsSameNormalAndThrowing
@Deprecated default IFlowGraphEndPoints endPointsSameNormalAndThrowing(com.google.common.collect.ImmutableSet<NodeKey> endPoints)
Deprecated.- Parameters:
endPoints- The value for bothIFlowGraphEndPoints.getNormalEndPoints()andIFlowGraphEndPoints.getThrowingEndPoints().- Returns:
- A new POJO with the given data.
-
isHasChild
boolean isHasChild(TElement node, int childIndex)
- Parameters:
node- Node to check.childIndex- Index to check.- Returns:
truewhen the node has a child at the given index,falseotherwise.
-
union
<E> com.google.common.collect.ImmutableSet<E> union(E endPoint, com.google.common.collect.ImmutableSet<E> set)Helper method that computes the union of the given key with all items of the give set.- Parameters:
endPoint- An end point to combine with the set.set- A set to combine with the key.- Returns:
- A set representing the union of all given keys.
-
union
<E> com.google.common.collect.ImmutableSet<E> union(com.google.common.collect.ImmutableSet<E>... sets)
Helper method that computes the union of all given sets.- Parameters:
sets- More sets to unite.- Returns:
- A set representing the union of all input sets.
-
union
<E> com.google.common.collect.ImmutableSet<E> union(com.google.common.collect.ImmutableSet<E> set1, com.google.common.collect.ImmutableSet<E> set2)Helper method that computes the union of all given sets.- Parameters:
set1- One set to combined.set2- Another set to combined.- Returns:
- A set representing the union of all input sets.
-
union
<E> com.google.common.collect.ImmutableSet<E> union(Iterable<com.google.common.collect.ImmutableSet<E>> sets)
Helper method that computes the union of all given sets.- Parameters:
sets- More sets to unite.- Returns:
- A set representing the union of all input sets.
-
-