public interface GraphNode
Modifier and Type | Interface and Description |
---|---|
static class |
GraphNode.Button |
static class |
GraphNode.EscalationRule |
static class |
GraphNode.State
The internal state of a node.
|
static class |
GraphNode.TaskInfo |
static class |
GraphNode.Transition |
Modifier and Type | Method and Description |
---|---|
void |
addTaskInfo(String taskId)
Persist the info when a new task is created from this node
|
boolean |
allowTaskReassignment()
Returns true if tasks created from this node can be reassigned.
|
void |
cancelSubRoute()
Cancels the sub-route if there is one.
|
void |
cancelTasks()
Cancels the tasks not ended on this node.
|
boolean |
canMerge()
Checks if the merge is ready to execute (enough input transitions are
present).
|
Date |
computeTaskDueDate()
Evaluates the task due date from the taskDueDateExpr and sets it as the
dueDate
|
void |
ending()
Does bookkeeping at node end.
|
List<GraphNode.EscalationRule> |
evaluateEscalationRules()
Evaluates the rules for the escalation rules and returns the ones to be
executed.
|
List<String> |
evaluateTaskAssignees()
Evaluates the task assignees from the taskAssigneesVar
|
List<GraphNode.Transition> |
evaluateTransitions()
Evaluates transition conditions and returns the transitions that were
true.
|
void |
executeChain(String chainId)
Executes an Automation chain in the context of this node.
|
boolean |
executeOnlyFirstTransition()
When workflow engine runs an exclusive node, it evaluates the transition
one by one and stops a soon as one of the transition is evaluated to true
|
void |
executeTransitionChain(GraphNode.Transition transition)
Executes an Automation chain in the context of this node for a given
transition
|
long |
getCanceledCount()
Gets the canceled count for this node.
|
DocumentModel |
getDocument()
Gets the document representing this node
|
List<GraphNode.TaskInfo> |
getEndedTasksInfo()
Gets all the ended tasks originating from this node.
|
List<GraphNode.EscalationRule> |
getEscalationRules()
Gets the list of all escalation rules for the node
|
String |
getId()
Get the node id.
|
String |
getInputChain()
Get input chain.
|
List<GraphNode.Transition> |
getInputTransitions()
Gets the input transitions.
|
String |
getOutputChain()
Get output chain.
|
List<GraphNode.Transition> |
getOutputTransitions()
Gets the output transitions.
|
List<GraphNode.TaskInfo> |
getProcessedTasksInfo()
Gets all the ended tasks originating from this node that were processed
with a status.
|
GraphNode.State |
getState()
Get the node state.
|
String |
getSubRouteModelId()
Gets the sub-route model id.
|
List<String> |
getTaskAssignees()
Gets the task assignees
|
String |
getTaskAssigneesPermission()
Gets the permission to the granted to the actors on this task on the
document following the workflow
|
List<GraphNode.Button> |
getTaskButtons()
Gets the task buttons
|
String |
getTaskDirective()
Gets the task directive
|
String |
getTaskDocType() |
Date |
getTaskDueDate()
Gets the due date
|
String |
getTaskDueDateExpr() |
String |
getTaskLayout()
Gets the task layout
|
String |
getTaskNotificationTemplate() |
List<GraphNode.TaskInfo> |
getTasksInfo()
Gets all the tasks info for the tasks created from this node
|
Map<String,Serializable> |
getVariables()
Gets a map containing the variables currently defined on this node
|
Map<String,Serializable> |
getWorkflowContextualInfo(CoreSession session,
boolean detached)
Gets a map containing the workflow and node variables and workflow
documents.
|
boolean |
hasMultipleTasks()
Checks if this node has created multiple tasks, one for each assignees.
|
boolean |
hasOpenTasks()
Returns false if all tasks created from this node were ended.
|
boolean |
hasSubRoute()
Checks if this node has a sub-route model defined.
|
boolean |
hasTask()
Checks it this node has an associated user task.
|
void |
initAddInputTransition(GraphNode.Transition transition)
Internal during graph init.
|
boolean |
isMerge()
Checks if this is a merge node.
|
boolean |
isStart()
Checks if this is the start node.
|
boolean |
isStop()
Checks if this is a stop node.
|
void |
setAllVariables(Map<String,Object> map)
Sets the graph and node variables.
|
void |
setButton(String status)
Sets the property button on the node, keeping the id of the last action
executed by the user on the associated task if any
|
void |
setCanceled()
Notes that this node was canceled (increments canceled counter).
|
void |
setLastActor(String actor)
Sets the last actor on a node (user who completed the task).
|
void |
setState(GraphNode.State state)
Set the node state.
|
void |
setVariable(String name,
String value)
Sets the variable on this node if it exists as a Node Variable.
|
void |
starting()
Does bookkeeping at node start.
|
DocumentRoute |
startSubRoute()
Starts the sub-route on this node.
|
void |
updateTaskInfo(String taskId,
boolean ended,
String status,
String actor,
String comment)
Persist these info from the task on the node.
|
static final String MERGE_ONE
static final String MERGE_ALL
static final String PROP_NODE_ID
static final String PROP_TITLE
static final String PROP_START
static final String PROP_STOP
static final String PROP_MERGE
static final String PROP_COUNT
static final String PROP_CANCELED
static final String PROP_INPUT_CHAIN
static final String PROP_OUTPUT_CHAIN
static final String PROP_HAS_TASK
static final String PROP_VARIABLES_FACET
static final String PROP_TRANSITIONS
static final String PROP_TRANS_NAME
static final String PROP_TRANS_TARGET
static final String PROP_TRANS_CONDITION
static final String PROP_TRANS_RESULT
static final String PROP_TRANS_CHAIN
static final String PROP_TRANS_LABEL
static final String PROP_TASK_ASSIGNEES
static final String PROP_TASK_ASSIGNEES_VAR
static final String PROP_TASK_ASSIGNEES_PERMISSION
static final String PROP_TASK_DUE_DATE
static final String PROP_TASK_DIRECTIVE
static final String PROP_TASK_LAYOUT
static final String PROP_TASK_BUTTONS
static final String PROP_BTN_NAME
static final String PROP_BTN_LABEL
static final String PROP_BTN_FILTER
static final String PROP_NODE_X_COORDINATE
static final String PROP_NODE_Y_COORDINATE
static final String PROP_NODE_BUTTON
static final String PROP_NODE_START_DATE
static final String PROP_NODE_END_DATE
static final String PROP_NODE_LAST_ACTOR
static final String PROP_TASK_DOC_TYPE
static final String PROP_TASK_NOTIFICATION_TEMPLATE
static final String PROP_TASK_DUE_DATE_EXPR
static final String PROP_EXECUTE_ONLY_FIRST_TRANSITION
static final String PROP_SUB_ROUTE_MODEL_EXPR
static final String PROP_SUB_ROUTE_INSTANCE_ID
static final String PROP_SUB_ROUTE_VARS
static final String PROP_KEYVALUE_KEY
static final String PROP_KEYVALUE_VALUE
static final String PROP_ESCALATION_RULES
static final String PROP_ESCALATION_RULE_ID
static final String PROP_ESCALATION_RULE_LABEL
static final String PROP_ESCALATION_RULE_MULTIPLE_EXECUTION
static final String PROP_ESCALATION_RULE_CONDITION
static final String PROP_ESCALATION_RULE_CHAIN
static final String PROP_ESCALATION_RULE_EXECUTED
static final String PROP_HAS_MULTIPLE_TASKS
static final String PROP_TASKS_INFO
static final String PROP_TASK_INFO_ACTOR
static final String PROP_TASK_INFO_COMMENT
static final String PROP_TASK_INFO_STATUS
static final String PROP_TASK_INFO_ENDED
static final String PROP_TASK_INFO_TASK_DOC_ID
static final String PROP_ALLOW_TASK_REASSIGNMENT
static final String NODE_VARIABLE_COMMENT
String getId()
GraphNode.State getState()
void setState(GraphNode.State state)
state
- the node stateboolean isStart()
boolean isStop()
boolean isMerge()
boolean canMerge()
void setCanceled()
long getCanceledCount()
void cancelTasks()
String getInputChain()
String getOutputChain()
boolean hasTask()
Date getTaskDueDate()
String getTaskDirective()
String getTaskAssigneesPermission()
String getTaskLayout()
String getTaskDocType()
String getTaskNotificationTemplate()
void starting()
void ending()
void executeChain(String chainId) throws DocumentRouteException
chainId
- the chainDocumentRouteException
void initAddInputTransition(GraphNode.Transition transition)
List<GraphNode.Transition> getInputTransitions()
List<GraphNode.Transition> getOutputTransitions()
String getTaskDueDateExpr()
void executeTransitionChain(GraphNode.Transition transition) throws DocumentRouteException
transition
- the transitionDocumentRouteException
List<GraphNode.Transition> evaluateTransitions() throws DocumentRouteException
Transitions are evaluated in the order set on the node when the workflow was designed. Since @5.7.2 if the node has the property "executeOnlyFirstTransition" set to true, only the first transition evaluated to true is returned
DocumentRouteException
void setAllVariables(Map<String,Object> map)
map
- the map of variablesList<GraphNode.Button> getTaskButtons()
DocumentModel getDocument()
Map<String,Serializable> getVariables()
void setButton(String status)
status
- void setLastActor(String actor)
actor
- the user idList<String> evaluateTaskAssignees() throws DocumentRouteException
DocumentRouteException
Date computeTaskDueDate() throws DocumentRouteException
DocumentRouteException
Map<String,Serializable> getWorkflowContextualInfo(CoreSession session, boolean detached)
detached
- The documents added into this map can be detached or notboolean executeOnlyFirstTransition()
boolean hasSubRoute() throws DocumentRouteException
true
if there is a sub-routeDocumentRouteException
String getSubRouteModelId() throws DocumentRouteException
If this is present, then this node will be suspended while the sub-route is run. When the sub-route ends, this node will resume.
null
if none is definedDocumentRouteException
DocumentRoute startSubRoute() throws DocumentRouteException
DocumentRouteException
void cancelSubRoute() throws DocumentRouteException
DocumentRouteException
List<GraphNode.EscalationRule> evaluateEscalationRules()
List<GraphNode.EscalationRule> getEscalationRules()
boolean hasMultipleTasks()
List<GraphNode.TaskInfo> getTasksInfo()
void addTaskInfo(String taskId) throws ClientException
ClientException
void updateTaskInfo(String taskId, boolean ended, String status, String actor, String comment) throws ClientException
ClientException
List<GraphNode.TaskInfo> getEndedTasksInfo()
List<GraphNode.TaskInfo> getProcessedTasksInfo()
boolean hasOpenTasks()
boolean allowTaskReassignment()
Copyright © 2013 Nuxeo SA. All Rights Reserved.