Interface GraphRoute
- All Superinterfaces:
DocumentRoute
,DocumentRouteElement
,DocumentRouteStepsContainer
,Serializable
- All Known Implementing Classes:
GraphRouteImpl
A route graph, defining a workflow with arbitrarily complex transitions between nodes.
- Since:
- 5.6
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.nuxeo.ecm.platform.routing.api.DocumentRouteElement
DocumentRouteElement.ElementLifeCycleState, DocumentRouteElement.ElementLifeCycleTransistion
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets 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.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
-
PROP_VARIABLES_FACET
- See Also:
-
PROP_AVAILABILITY_FILTER
- See Also:
-
PROP_PARENT_ROUTE
The id of the parent route instance from which this route was started.- Since:
- 5.7.2
- See Also:
-
PROP_PARENT_NODE
The id of the node in the parent route from which this route was started.- Since:
- 5.7.2
- See Also:
-
-
Method Details
-
getStartNode
Gets the start node for this graph.- Returns:
- the start node
- Throws:
DocumentRouteException
-
getAttachedDocumentModels
DocumentModelList getAttachedDocumentModels()Gets the attached documents.- Returns:
- a list of document
-
getVariables
Map<String,Serializable> getVariables()Gets the graph variables.- Returns:
- the map of variables
-
getJsonVariables
Map<String,Serializable> getJsonVariables()Gets the Json formatted graph variables.- Returns:
- the map of variables
- Since:
- 7.2
-
setVariables
Sets the graph variables.- Parameters:
map
- the map of variables
-
setJSONVariables
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");
- Parameters:
map
- the map of variables- Since:
- 5.9.3, 5.8.0-HF10
-
getNode
Gets the node with the given id.- Returns:
- the node
- Throws:
IllegalArgumentException
- if there is no such node
-
getNodes
Collection<GraphNode> getNodes()Gets a collection of the route nodes -
getAvailabilityFilter
String getAvailabilityFilter()Returns the availability filter name for this graph. -
hasParentRoute
boolean hasParentRoute()Checks if this graph instance has been started from another graph.- Returns:
true
if this is a sub-route instance- Since:
- 5.7.2
-
resumeParentRoute
Resumes execution of the parent route from which this graph was started.- Parameters:
session
- the session- Since:
- 5.7.2
-
getSuspendedNodes
Get the list of nodes of which the State is suspended.- Since:
- 7.4
-