public class GraphNodeImpl extends DocumentRouteElementImpl implements GraphNode
GraphNode.Button, GraphNode.State, GraphNode.Transition
DocumentRouteElement.ElementLifeCycleState, DocumentRouteElement.ElementLifeCycleTransistion
MERGE_ALL, MERGE_ONE, PROP_BTN_FILTER, PROP_BTN_LABEL, PROP_BTN_NAME, PROP_CANCELED, PROP_COUNT, PROP_HAS_TASK, PROP_INPUT_CHAIN, PROP_MERGE, PROP_NODE_BUTTON, PROP_NODE_END_DATE, PROP_NODE_ID, PROP_NODE_LAST_ACTOR, PROP_NODE_START_DATE, PROP_NODE_X_COORDINATE, PROP_NODE_Y_COORDINATE, PROP_OUTPUT_CHAIN, PROP_START, PROP_STOP, PROP_TASK_ASSIGNEES, PROP_TASK_ASSIGNEES_PERMISSION, PROP_TASK_ASSIGNEES_VAR, PROP_TASK_BUTTONS, PROP_TASK_DIRECTIVE, PROP_TASK_DOC_TYPE, PROP_TASK_DUE_DATE, PROP_TASK_DUE_DATE_EXPR, PROP_TASK_LAYOUT, PROP_TASK_NOTIFICATION_TEMPLATE, PROP_TITLE, PROP_TRANS_CHAIN, PROP_TRANS_CONDITION, PROP_TRANS_LABEL, PROP_TRANS_NAME, PROP_TRANS_RESULT, PROP_TRANS_TARGET, PROP_TRANSITIONS, PROP_VARIABLES_FACET
Constructor and Description |
---|
GraphNodeImpl(DocumentModel doc,
GraphRouteImpl graph) |
Modifier and Type | Method and Description |
---|---|
void |
cancelTasks()
Cancels the task if this is a suspended task 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.
|
static boolean |
equality(Object o1,
Object o2) |
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.
|
void |
executeChain(String chainId,
String transitionId) |
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.
|
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.
|
GraphNode.State |
getState()
Get the node state.
|
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
|
String |
getTaskAssigneesVar() |
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() |
Map<String,Serializable> |
getVariables()
Gets a map containing the variables currently defined on this node
|
Map<String,Serializable> |
getWorkflowContextualInfo()
Gets a map containing the workflow and node variables
|
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 |
setVariables(Map<String,Serializable> map) |
void |
starting()
Does bookkeeping at node start.
|
String |
toString() |
backToReady, cancel, canDeleteStep, canUndoStep, canUpdateStep, canValidateStep, followTransition, getAttachedDocuments, getDescription, getDocument, getDocumentRoute, getName, isCanceled, isDone, isDraft, isModifiable, isReady, isRunning, isValidated, resume, run, run, save, setCanceled, setCanDeleteStep, setCanReadStep, setCanUpdateStep, setCanValidateStep, setDone, setReadOnly, setReady, setRunning, setValidated, undo, validate
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDocument
public GraphNodeImpl(DocumentModel doc, GraphRouteImpl graph)
public GraphNode.State getState()
GraphNode
public void setState(GraphNode.State state)
GraphNode
public boolean isStart()
GraphNode
public boolean isStop()
GraphNode
public void setCanceled()
GraphNode
setCanceled
in interface GraphNode
public long getCanceledCount()
GraphNode
getCanceledCount
in interface GraphNode
public boolean isMerge()
GraphNode
public String getInputChain()
GraphNode
getInputChain
in interface GraphNode
public String getOutputChain()
GraphNode
getOutputChain
in interface GraphNode
public boolean hasTask()
GraphNode
public List<String> getTaskAssignees()
GraphNode
getTaskAssignees
in interface GraphNode
public String getTaskAssigneesVar()
public Date getTaskDueDate()
GraphNode
getTaskDueDate
in interface GraphNode
public String getTaskDirective()
GraphNode
getTaskDirective
in interface GraphNode
public String getTaskAssigneesPermission()
GraphNode
getTaskAssigneesPermission
in interface GraphNode
public String getTaskLayout()
GraphNode
getTaskLayout
in interface GraphNode
public String getTaskNotificationTemplate()
getTaskNotificationTemplate
in interface GraphNode
public String getTaskDueDateExpr()
getTaskDueDateExpr
in interface GraphNode
public void starting()
GraphNode
public void ending()
GraphNode
public Map<String,Serializable> getVariables()
GraphNode
getVariables
in interface GraphNode
public void setVariables(Map<String,Serializable> map)
public void setAllVariables(Map<String,Object> map)
GraphNode
setAllVariables
in interface GraphNode
map
- the map of variablespublic Map<String,Serializable> getWorkflowContextualInfo()
GraphNode
getWorkflowContextualInfo
in interface GraphNode
public void executeChain(String chainId) throws DocumentRouteException
GraphNode
executeChain
in interface GraphNode
chainId
- the chainDocumentRouteException
public void executeTransitionChain(GraphNode.Transition transition) throws DocumentRouteException
GraphNode
executeTransitionChain
in interface GraphNode
transition
- the transitionDocumentRouteException
public void executeChain(String chainId, String transitionId) throws DocumentRouteException
DocumentRouteException
public void initAddInputTransition(GraphNode.Transition transition)
GraphNode
initAddInputTransition
in interface GraphNode
public List<GraphNode.Transition> getOutputTransitions()
GraphNode
getOutputTransitions
in interface GraphNode
public List<GraphNode.Transition> evaluateTransitions() throws DocumentRouteException
GraphNode
Transitions are evaluated and ordered by transition id order.
evaluateTransitions
in interface GraphNode
DocumentRouteException
public List<String> evaluateTaskAssignees() throws DocumentRouteException
GraphNode
evaluateTaskAssignees
in interface GraphNode
DocumentRouteException
public boolean canMerge()
GraphNode
public List<GraphNode.Transition> getInputTransitions()
GraphNode
getInputTransitions
in interface GraphNode
public void cancelTasks()
GraphNode
cancelTasks
in interface GraphNode
public List<GraphNode.Button> getTaskButtons()
GraphNode
getTaskButtons
in interface GraphNode
public void setButton(String status)
GraphNode
public void setLastActor(String actor)
GraphNode
setLastActor
in interface GraphNode
actor
- the user idpublic String getTaskDocType()
getTaskDocType
in interface GraphNode
public Date computeTaskDueDate() throws DocumentRouteException
GraphNode
computeTaskDueDate
in interface GraphNode
DocumentRouteException
Copyright © 2012 Nuxeo SA. All Rights Reserved.