Interface ITaskFlowAnalysis
- All Superinterfaces:
ITaskFlowAnalysisData
,Serializable
Represents the result of analyzing a workflow task. Contains the data of the control flow analysis. Given a program
with a set of nodes as configured in the workflow designer, the flow analysis can answer questions such as "which
nodes can precede a given node?" or "do all branches end with a return?"
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.google.common.graph.Graph<NodeKey>
Deprecated.getPotentialPredecessorsOf
(NodeKey targetKey) Deprecated.getPotentialPredecessorsOf
(NodeKey targetKey, FlowGraphFilter.Backward filter) Finds all potential predecessors of the given node reachable via paths in the flow graph, observing the constraints imposed by the given filter.getPotentialSuccessorsOf
(NodeKey sourceKey) Deprecated.getPotentialSuccessorsOf
(NodeKey sourceKey, FlowGraphFilter.Forward filter) Finds all potential successors of the given node reachable via paths in the flow graph, observing the constraints imposed by the given filter.default boolean
isPotentiallyReachable
(NodeKey sourceKey, NodeKey targetKey) default boolean
isPotentiallyReachable
(NodeKey sourceKey, NodeKey targetKey, FlowGraphFilter.Generic filter) Checks whether the target node is reachable from the source ode via a path in the flow graph, observing the constraints imposed by the given filter.Methods inherited from interface de.xima.fc.interfaces.workflow.analysis.ITaskFlowAnalysisData
getRootEndPoints, getValueFlowGraph
-
Method Details
-
getFlowGraph
Deprecated.UseITaskFlowAnalysisData.getValueFlowGraph()
instead. This method may be implemented in an inefficient manner and might e.g. create a newGraph
instance each time it is called.Returns the flow graph that indicated potential successors for each node. The flow graph is a directed graph with one edge for each node contained in the analyzed task. The graph has an edge fromnode1
tonode2
iff is is possible thatnode1
transfers control directly tonode2
; i.e. iff there exists at least one code path wherenode2
immediately succeedsnode1
.- Returns:
- The flow graph that was obtained from analyzing the task.
-
getPotentialPredecessorsOf
Deprecated.Finds all potential predecessors of the given node, i.e. the nodes from which the given target node can be reached.- Parameters:
targetKey
- The key of the target node to check.- Returns:
- The keys of all nodes for which
isNodePotentiallyReachable(nodeUuid, targetUuid)
returnstrue
.
-
getPotentialPredecessorsOf
Finds all potential predecessors of the given node reachable via paths in the flow graph, observing the constraints imposed by the given filter.More precisely, given a target node n, this method finds all nodes {m} such that
- there exists a contiguous path (m, i1, i2, i3, ..., ik, n) from node m to node n, consisting of existing edges from the flow graph.
- all edges of the path match
IFlowGraphFilterInstance#allowsEdge
- the edge (m, i1) matches
IFlowGraphFilterInstance#allowsInitialEdge
- the edge (ik, n) matches
IFlowGraphFilterInstance#allowsFinalEdge
isPotentiallyReachable(m, n, filter)
returnstrue
.- Parameters:
targetKey
- The key of the target node to check.filter
- Filter applied when traversing the flow graph for finding paths from the target to preceding edges. SeeFlowGraphFilters
for some common filters.- Returns:
- The keys of all nodes from which the target node can be reached via a path that starts with an edge of the given type.
- Since:
- 8.0.0
-
getPotentialSuccessorsOf
Deprecated.Finds all potential successors of the given node, i.e. the nodes can be reached from the given source node.- Parameters:
sourceKey
- The key of the source node to check.- Returns:
- The keys of all nodes for which
isNodePotentiallyReachable(sourceUuid, nodeUuid)
returnstrue
.
-
getPotentialSuccessorsOf
Finds all potential successors of the given node reachable via paths in the flow graph, observing the constraints imposed by the given filter.More precisely, given a source node n, this method finds all nodes {m} such that
- there exists a contiguous path (n, i1, i2, i3, ..., ik, m) from node n to node m, consisting of existing edges from the flow graph.
- all edges of the path match
IFlowGraphFilterInstance#allowsEdge
- the edge (n, i1) matches
IFlowGraphFilterInstance#allowsInitialEdge
- the edge (ik, m) matches
IFlowGraphFilterInstance#allowsFinalEdge
isPotentiallyReachable(n, m, filter)
returnstrue
.- Parameters:
sourceKey
- The key of the source node to check.filter
- Filter applied when traversing the flow graph for finding paths from the source to succeeding edges. SeeFlowGraphFilters
for some common filters.- Returns:
- The keys of all nodes which can be reached from the given source node via a path that starts with an edge of the given type.
- Since:
- 8.0.0
-
isPotentiallyReachable
Checks whether the target node is reachable from the source ode via a path in the flow graph.Effectively, this checks whether the target node is a potential successor of the source node. For example:
action1(); if (test) { action2(); } else { action3(); } action4();
In the example above,- action1 is potentially reachable from no other action
- action2 is potentially reachable from action1
- action3 is potentially reachable from action1
- action4 is potentially reachable from action1, action2, and action3
- Parameters:
sourceKey
- Key of the source node to check.targetKey
- Key of the target node to check.- Returns:
- Whether any code path includes a path where the source node was executed at the point in time the target node is about to be executed.
-
isPotentiallyReachable
default boolean isPotentiallyReachable(NodeKey sourceKey, NodeKey targetKey, FlowGraphFilter.Generic filter) Checks whether the target node is reachable from the source ode via a path in the flow graph, observing the constraints imposed by the given filter.More precisely, given a source node n and a target node m, this checks whether a path (n, i1, i2, i3, ..., ik, m) consisting of edges from the flow graph exists that connects node n to m, such that:
- all edges of the path match
IFlowGraphFilterInstance#allowsEdge
- the edge (n, i1) matches
IFlowGraphFilterInstance#allowsInitialEdge
- the edge (ik, m) matches
IFlowGraphFilterInstance#allowsFinalEdge
- Parameters:
sourceKey
- Key of the source node to check.targetKey
- Key of the target node to check.filter
- Filter applied when traversing the flow graph for finding paths from the source to the target. SeeFlowGraphFilters
for some common filters.- Returns:
- Whether any code path includes a path where the source node finished with the given type, and where the source node was executed at the point in time when the target node is about to be executed.
- Since:
- 8.0.0
- all edges of the path match
-
ITaskFlowAnalysisData.getValueFlowGraph()
instead.