Class GraphRouteImpl
java.lang.Object
org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteElementImpl
org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteStepsContainerImpl
org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteImpl
org.nuxeo.ecm.platform.routing.core.impl.GraphRouteImpl
- All Implemented Interfaces:
Serializable
,DocumentRoute
,DocumentRouteElement
,DocumentRouteStep
,DocumentRouteStepsContainer
,GraphRoute
- Since:
- 5.6
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteElementImpl
DocumentRouteElementImpl.GetIsParentRunningUnrestricted, DocumentRouteElementImpl.SetDocumentOnReadOnlyUnrestrictedSessionRunner
Nested classes/interfaces inherited from interface org.nuxeo.ecm.platform.routing.api.DocumentRouteElement
DocumentRouteElement.ElementLifeCycleState, DocumentRouteElement.ElementLifeCycleTransistion
-
Field Summary
Modifier and TypeFieldDescriptionTo be used through getter.To be used through getter.Fields inherited from class org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteElementImpl
document, runner
Fields inherited from interface org.nuxeo.ecm.platform.routing.core.impl.GraphRoute
PROP_AVAILABILITY_FILTER, PROP_PARENT_NODE, PROP_PARENT_ROUTE, PROP_VARIABLES_FACET
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
compute()
protected void
computeLoopTransitions
(String startNodeId) Finds which transitions are re-looping (feedback arc set).protected String
protected void
Deduce input transitions from output transitions.Gets the attached documents.Returns the availability filter name for this graph.Gets the Json formatted graph variables.Gets the node with the given id.getNodes()
Gets a collection of the route nodesGets the start node for this graph.Get the list of nodes of which the State is suspended.Gets the graph variables.boolean
Checks if this graph instance has been started from another graph.void
resumeParentRoute
(CoreSession session) Resumes execution of the parent route from which this graph was started.void
setJSONVariables
(Map<String, String> map) Sets the variables of the workflow based on their JSON representation (especially for scalar lists).void
setVariables
(Map<String, Serializable> map) Sets the graph variables.toString()
Methods inherited from class org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteImpl
canUndoStep, fireWorkflowCompletionEvent, getInitiator, getModelId, getModelName, setDone
Methods inherited from class org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteStepsContainerImpl
getAttachedDocuments, setAttachedDocuments, validate
Methods inherited from class org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteElementImpl
backToReady, cancel, canDeleteStep, canUpdateStep, canValidateStep, checkLifeCycleState, followTransition, getAttachedDocuments, getDescription, getDocument, getDocumentRoute, getName, getProperty, getTitle, hasPermissionOnDocument, isCanceled, isDone, isDraft, isModifiable, isReady, isRunning, isValidated, resume, run, run, save, setCanceled, setCanDeleteStep, setCanReadStep, setCanUpdateStep, setCanValidateStep, setPermissionOnDocument, setReadOnly, setReady, setRunning, setValidated
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.platform.routing.api.DocumentRoute
getAttachedDocuments, getInitiator, getModelId, getModelName, setAttachedDocuments
Methods inherited from interface org.nuxeo.ecm.platform.routing.api.DocumentRouteElement
backToReady, cancel, canDeleteStep, canUndoStep, canUpdateStep, canValidateStep, followTransition, getAttachedDocuments, getDescription, getDocument, getDocumentRoute, getName, getTitle, isCanceled, isDone, isDraft, isModifiable, isReady, isRunning, isValidated, resume, run, run, save, setCanceled, setCanDeleteStep, setCanReadStep, setCanUpdateStep, setCanValidateStep, setDone, setReadOnly, setReady, setRunning, setValidated, validate
-
Field Details
-
nodes
To be used through getter. -
nodesById
To be used through getter.
-
-
Constructor Details
-
GraphRouteImpl
-
-
Method Details
-
toString
-
getNodes
Description copied from interface:GraphRoute
Gets a collection of the route nodes- Specified by:
getNodes
in interfaceGraphRoute
-
compute
protected void compute() -
computeNodes
-
computeTransitions
Deduce input transitions from output transitions.- Throws:
DocumentRouteException
-
computeLoopTransitions
Finds which transitions are re-looping (feedback arc set).- Throws:
DocumentRouteException
-
getStartNode
Description copied from interface:GraphRoute
Gets the start node for this graph.- Specified by:
getStartNode
in interfaceGraphRoute
- Returns:
- the start node
- Throws:
DocumentRouteException
-
getNode
Description copied from interface:GraphRoute
Gets the node with the given id.- Specified by:
getNode
in interfaceGraphRoute
- Returns:
- the node
-
getVariables
Description copied from interface:GraphRoute
Gets the graph variables.- Specified by:
getVariables
in interfaceGraphRoute
- Returns:
- the map of variables
-
getJsonVariables
Description copied from interface:GraphRoute
Gets the Json formatted graph variables.- Specified by:
getJsonVariables
in interfaceGraphRoute
- Returns:
- the map of variables
-
setVariables
Description copied from interface:GraphRoute
Sets the graph variables.- Specified by:
setVariables
in interfaceGraphRoute
- Parameters:
map
- the map of variables
-
setJSONVariables
Description copied from interface:GraphRoute
Sets the variables of the workflow based on their JSON representation (especially for scalar lists). For example:Map<String, String> map = new HashMap<String, String>(); map.put("contributors","[\"John Doe\", \"John Smith\"]"); map.put("title","Test Title");
- Specified by:
setJSONVariables
in interfaceGraphRoute
- Parameters:
map
- the map of variables
-
getAttachedDocumentModels
Description copied from interface:GraphRoute
Gets the attached documents.- Specified by:
getAttachedDocumentModels
in interfaceGraphRoute
- Returns:
- a list of document
-
getAvailabilityFilter
Description copied from interface:GraphRoute
Returns the availability filter name for this graph.- Specified by:
getAvailabilityFilter
in interfaceGraphRoute
-
hasParentRoute
public boolean hasParentRoute()Description copied from interface:GraphRoute
Checks if this graph instance has been started from another graph.- Specified by:
hasParentRoute
in interfaceGraphRoute
- Returns:
true
if this is a sub-route instance
-
resumeParentRoute
Description copied from interface:GraphRoute
Resumes execution of the parent route from which this graph was started.- Specified by:
resumeParentRoute
in interfaceGraphRoute
- Parameters:
session
- the session
-
getSuspendedNodes
Description copied from interface:GraphRoute
Get the list of nodes of which the State is suspended.- Specified by:
getSuspendedNodes
in interfaceGraphRoute
-