Class GraphRunner
java.lang.Object
org.nuxeo.ecm.platform.routing.core.impl.AbstractRunner
org.nuxeo.ecm.platform.routing.core.impl.GraphRunner
- All Implemented Interfaces:
Serializable
,ElementRunner
Runs the proper nodes depending on the graph state.
- Since:
- 5.6
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Maximum number of steps we do before deciding that this graph is looping. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel
(CoreSession session, DocumentRouteElement element) Cancel this element.protected void
createTask
(CoreSession session, GraphRoute graph, GraphNode node) protected void
finishTask
(CoreSession session, GraphRoute graph, GraphNode node, Task task, boolean delete) protected void
finishTask
(CoreSession session, GraphRoute graph, GraphNode node, Task task, boolean delete, String status) protected void
recursiveCancelInput
(GraphRoute graph, GraphNode originalNode, LinkedList<GraphNode> pendingNodes) void
resume
(CoreSession session, DocumentRouteElement element, String nodeId, String taskId, Map<String, Object> varData, String status) Resumes this graph route on a given node.void
run
(CoreSession session, DocumentRouteElement element) Run this element.void
run
(CoreSession session, DocumentRouteElement element, Map<String, Serializable> map) Run this element.protected void
runGraph
(CoreSession session, DocumentRouteElement element, GraphNode initialNode) Runs the graph starting with the given node.Methods inherited from class org.nuxeo.ecm.platform.routing.core.impl.AbstractRunner
getChildrenElement
-
Field Details
-
MAX_LOOPS
public static final int MAX_LOOPSMaximum number of steps we do before deciding that this graph is looping.- See Also:
-
-
Constructor Details
-
GraphRunner
public GraphRunner()
-
-
Method Details
-
run
Description copied from interface:ElementRunner
Run this element.- Specified by:
run
in interfaceElementRunner
- Overrides:
run
in classAbstractRunner
-
run
Description copied from interface:ElementRunner
Run this element. If an exception is thrown while doing, it cancels the route.- Specified by:
run
in interfaceElementRunner
-
resume
public void resume(CoreSession session, DocumentRouteElement element, String nodeId, String taskId, Map<String, Object> varData, String status) Description copied from interface:ElementRunner
Resumes this graph route on a given node.- Specified by:
resume
in interfaceElementRunner
- Overrides:
resume
in classAbstractRunner
-
cancel
Description copied from interface:ElementRunner
Cancel this element.- Specified by:
cancel
in interfaceElementRunner
- Overrides:
cancel
in classAbstractRunner
- See Also:
-
runGraph
protected void runGraph(CoreSession session, DocumentRouteElement element, GraphNode initialNode) throws DocumentRouteException Runs the graph starting with the given node.- Parameters:
initialNode
- the initial node to run- Throws:
DocumentRouteException
-
recursiveCancelInput
protected void recursiveCancelInput(GraphRoute graph, GraphNode originalNode, LinkedList<GraphNode> pendingNodes) -
createTask
protected void createTask(CoreSession session, GraphRoute graph, GraphNode node) throws DocumentRouteException - Throws:
DocumentRouteException
-
finishTask
protected void finishTask(CoreSession session, GraphRoute graph, GraphNode node, Task task, boolean delete) throws DocumentRouteException - Throws:
DocumentRouteException
-
finishTask
protected void finishTask(CoreSession session, GraphRoute graph, GraphNode node, Task task, boolean delete, String status) throws DocumentRouteException - Throws:
DocumentRouteException
-