Interface DocumentRouteElement
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
DocumentRoute
,DocumentRouteStep
,DocumentRouteStepsContainer
,GraphRoute
- All Known Implementing Classes:
DocumentRouteElementImpl
,DocumentRouteImpl
,DocumentRouteStepsContainerImpl
,GraphNodeImpl
,GraphRouteImpl
public interface DocumentRouteElement extends Serializable
An element of aDocumentRoute
- Author:
- arussel
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DocumentRouteElement.ElementLifeCycleState
The lifecycle state of an elementstatic class
DocumentRouteElement.ElementLifeCycleTransistion
The transition of the lifecycle state.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
backToReady(CoreSession session)
Set the step back to the ready state from running or done.void
cancel(CoreSession session)
Cancel this element.boolean
canDeleteStep(CoreSession session)
If this session can delete this step.boolean
canUndoStep(CoreSession session)
If this step can be undone.boolean
canUpdateStep(CoreSession session)
If this session can update this step.boolean
canValidateStep(CoreSession session)
If this session can validate the step.void
followTransition(DocumentRouteElement.ElementLifeCycleTransistion transition, CoreSession session, boolean recursive)
make this element follow a transition.DocumentModelList
getAttachedDocuments(CoreSession session)
Return the list of documents that this route processes.String
getDescription()
the description of this element.DocumentModel
getDocument()
Get the underlying document representing this element.DocumentRoute
getDocumentRoute(CoreSession session)
Return the DocumentRoute this element is part of.String
getName()
The name of this element.String
getTitle()
boolean
isCanceled()
boolean
isDone()
if this route is done.boolean
isDraft()
if this route is draft.boolean
isModifiable()
boolean
isReady()
if this element is ready.boolean
isRunning()
if this route is running.boolean
isValidated()
if the route this element is part of has been validated.void
resume(CoreSession session, String nodeId, String taskId, Map<String,Object> data, String status)
Resumes execution on a route node.void
run(CoreSession session)
Execute this element.void
run(CoreSession session, Map<String,Serializable> map)
Execute this element.void
save(CoreSession session)
save the document representing this DocumentRoute.void
setCanceled(CoreSession session)
Set the step to a cancel step.void
setCanDeleteStep(CoreSession session, String userOrGroup)
make this user or group step deleter.void
setCanReadStep(CoreSession session, String userOrGroup)
make this user or group a step reader.void
setCanUpdateStep(CoreSession session, String userOrGroup)
make this user or group a step updater.void
setCanValidateStep(CoreSession session, String userOrGroup)
make this user or group a validator for this step.void
setDone(CoreSession session)
set this element as done.void
setReadOnly(CoreSession session)
remove write rights to everyone but the administrators.void
setReady(CoreSession session)
set this element as ready.void
setRunning(CoreSession session)
set this element as running.void
setValidated(CoreSession session)
set this element as validated.void
validate(CoreSession session)
Set this element to the validate state and put it in read only mode.
-
-
-
Method Detail
-
getAttachedDocuments
DocumentModelList getAttachedDocuments(CoreSession session)
Return the list of documents that this route processes.- Parameters:
session
- the session used to fetch the documents
-
getDocumentRoute
DocumentRoute getDocumentRoute(CoreSession session)
Return the DocumentRoute this element is part of.- Parameters:
session
- The session use to fetch the route.
-
isValidated
boolean isValidated()
if the route this element is part of has been validated.
-
isReady
boolean isReady()
if this element is ready.
-
isDone
boolean isDone()
if this route is done.
-
isRunning
boolean isRunning()
if this route is running.
-
isDraft
boolean isDraft()
if this route is draft.
-
getName
String getName()
The name of this element.
-
getDescription
String getDescription()
the description of this element.
-
run
void run(CoreSession session)
Execute this element. If this is a step, it will run the operation, if this is a containter it will run its children.
-
run
void run(CoreSession session, Map<String,Serializable> map)
Execute this element. If this is a step, it will run the operation, if this is a container it will run its children.- Parameters:
map
- the values to pass as initial workflow variables
-
resume
void resume(CoreSession session, String nodeId, String taskId, Map<String,Object> data, String status)
Resumes execution on a route node.- Parameters:
session
- the sessionnodeId
- the node id to resume ontaskId
- the task iddata
- the data coming from UI formstatus
- the id of the button clicked to submit the related task form- Since:
- 5.6
-
validate
void validate(CoreSession session)
Set this element to the validate state and put it in read only mode.
-
getDocument
DocumentModel getDocument()
Get the underlying document representing this element.
-
save
void save(CoreSession session)
save the document representing this DocumentRoute.
-
setValidated
void setValidated(CoreSession session)
set this element as validated.
-
setReady
void setReady(CoreSession session)
set this element as ready.
-
setRunning
void setRunning(CoreSession session)
set this element as running.
-
setDone
void setDone(CoreSession session)
set this element as done.
-
setReadOnly
void setReadOnly(CoreSession session)
remove write rights to everyone but the administrators.
-
followTransition
void followTransition(DocumentRouteElement.ElementLifeCycleTransistion transition, CoreSession session, boolean recursive)
make this element follow a transition.- Parameters:
transition
- the followed transition.session
- the session used to follow the transition.recursive
- If this element has children, do we recurse the follow transition.- See Also:
BulkLifeCycleChangeListener
-
canValidateStep
boolean canValidateStep(CoreSession session)
If this session can validate the step.
-
setCanValidateStep
void setCanValidateStep(CoreSession session, String userOrGroup)
make this user or group a validator for this step.
-
canUpdateStep
boolean canUpdateStep(CoreSession session)
If this session can update this step.
-
setCanUpdateStep
void setCanUpdateStep(CoreSession session, String userOrGroup)
make this user or group a step updater.
-
setCanReadStep
void setCanReadStep(CoreSession session, String userOrGroup)
make this user or group a step reader.
-
canDeleteStep
boolean canDeleteStep(CoreSession session)
If this session can delete this step.
-
canUndoStep
boolean canUndoStep(CoreSession session)
If this step can be undone. Default is to allow undoing only if the parent folder is running.
-
setCanDeleteStep
void setCanDeleteStep(CoreSession session, String userOrGroup)
make this user or group step deleter.
-
backToReady
void backToReady(CoreSession session)
Set the step back to the ready state from running or done. This method only modify the step state, it does not run any other action (such as undoing the step action)
-
setCanceled
void setCanceled(CoreSession session)
Set the step to a cancel step. This method only modify the state of this element and does not run any other action.
-
cancel
void cancel(CoreSession session)
Cancel this element.
-
isCanceled
boolean isCanceled()
-
isModifiable
boolean isModifiable()
- Returns:
- true
-
getTitle
String getTitle()
- Since:
- 7.2
-
-