Interface GraphRoute
-
- All Superinterfaces:
DocumentRoute
,DocumentRouteElement
,DocumentRouteStepsContainer
,Serializable
- All Known Implementing Classes:
GraphRouteImpl
public interface GraphRoute extends DocumentRoute
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
Fields Modifier and Type Field Description static String
PROP_AVAILABILITY_FILTER
static String
PROP_PARENT_NODE
The id of the node in the parent route from which this route was started.static String
PROP_PARENT_ROUTE
The id of the parent route instance from which this route was started.static String
PROP_VARIABLES_FACET
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DocumentModelList
getAttachedDocumentModels()
Gets the attached documents.String
getAvailabilityFilter()
Returns the availability filter name for this graph.Map<String,Serializable>
getJsonVariables()
Gets the Json formatted graph variables.GraphNode
getNode(String id)
Gets the node with the given id.Collection<GraphNode>
getNodes()
Gets a collection of the route nodesGraphNode
getStartNode()
Gets the start node for this graph.List<GraphNode>
getSuspendedNodes()
Get the list of nodes of which the State is suspended.Map<String,Serializable>
getVariables()
Gets the graph variables.boolean
hasParentRoute()
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 Detail
-
PROP_VARIABLES_FACET
static final String PROP_VARIABLES_FACET
- See Also:
- Constant Field Values
-
PROP_AVAILABILITY_FILTER
static final String PROP_AVAILABILITY_FILTER
- See Also:
- Constant Field Values
-
PROP_PARENT_ROUTE
static final String PROP_PARENT_ROUTE
The id of the parent route instance from which this route was started.- Since:
- 5.7.2
- See Also:
- Constant Field Values
-
PROP_PARENT_NODE
static final String PROP_PARENT_NODE
The id of the node in the parent route from which this route was started.- Since:
- 5.7.2
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStartNode
GraphNode getStartNode() throws DocumentRouteException
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
void setVariables(Map<String,Serializable> map)
Sets the graph variables.- Parameters:
map
- the map of variables
-
setJSONVariables
void setJSONVariables(Map<String,String> map)
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
GraphNode getNode(String id) throws IllegalArgumentException
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
void resumeParentRoute(CoreSession session)
Resumes execution of the parent route from which this graph was started.- Parameters:
session
- the session- Since:
- 5.7.2
-
getSuspendedNodes
List<GraphNode> getSuspendedNodes()
Get the list of nodes of which the State is suspended.- Since:
- 7.4
-
-