Interface DocumentRoutingService
-
- All Known Implementing Classes:
DocumentRoutingServiceImpl
public interface DocumentRoutingServiceThe DocumentRoutingService allows manipulation ofDocumentRoutes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddRouteElementToRoute(DocumentRef parentDocumentRef, int idx, DocumentRouteElement routeElement, CoreSession session)Deprecated.since 5.9.2 - Use only routes of type 'graph'voidaddRouteElementToRoute(DocumentRef parentDocumentRef, String sourceName, DocumentRouteElement routeElement, CoreSession session)Deprecated.since 5.9.2 - Use only routes of type 'graph'voidcancelTask(CoreSession session, String taskId)Cancels an open task.booleancanCreateInstance(CoreSession session, List<String> documentIds, String worflowModelName)Returnstrueif the workflow model can be started on the document list.booleancanUserValidateRoute(NuxeoPrincipal currentUser)Deprecated.usecanValidateRoute(DocumentModel, CoreSession)instead.booleancanValidateRoute(DocumentModel documentRoute, CoreSession coreSession)Checks if the principal that created the client session can validate the routevoidcleanupDoneAndCanceledRouteInstances(String repositoryName, int limit)Deprecated.since 2023, use #cleanupRouteInstances(String)instead.voidcleanupRouteInstances(String repositoryName)Remove the routes in state 'done' or 'canceled' of the given repository.voidcompleteTask(String routeId, String taskId, Map<String,Object> data, String status, CoreSession session)Completes a task on a give node.StringcreateNewInstance(String routeModelId, List<String> docIds, Map<String,Serializable> map, CoreSession session, boolean startInstance)Creates a new route instance and optionally starts it.StringcreateNewInstance(String routeModelId, List<String> docIds, CoreSession session, boolean startInstance)Creates a new route instance and optionally starts it.DocumentRoutecreateNewInstance(DocumentRoute model, String documentId, CoreSession session)Deprecated.since 5.6, use other APIsDocumentRoutecreateNewInstance(DocumentRoute model, String documentId, CoreSession session, boolean startInstance)Deprecated.since 5.6, use other APIsDocumentRoutecreateNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session)Deprecated.since 5.6, use other APIsDocumentRoutecreateNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session, boolean startInstance)Create a newDocumentRouteinstance from thisDocumentRoutemodel.voiddelegateTask(CoreSession session, String taskId, List<String> delegatedActors, String comment)Reassigns the given task to the list of actors.intdoCleanupDoneAndCanceledRouteInstances(String reprositoryName, int limit)Deprecated.since 2023, use GarbageCollectRoutesAction insteadvoidendTask(CoreSession session, Task task, Map<String,Object> data, String status)Ends a task.voidfinishTask(CoreSession session, DocumentRoute route, Task task, boolean delete)Deprecated.// will be removed in 5.8, use completeTask insteadList<DocumentRoute>getAvailableDocumentRoute(CoreSession session)Return the list of availableDocumentRoutedocument route.List<DocumentRoute>getAvailableDocumentRouteModel(CoreSession session)Return the list of availableDocumentRoutemodel the user can start.List<DocumentRoute>getDocumentRelatedWorkflows(DocumentModel document, CoreSession session)List<DocumentRoute>getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId)List<DocumentRoute>getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId, List<DocumentRouteElement.ElementLifeCycleState> states)Return the list of relatedDocumentRoutein a state for a given attached document.StringgetOperationChainId(String documentType)Deprecated.since 5.9.2 - Use only routes of type 'graph'DocumentModelListgetOrderedRouteElement(String routeElementId, CoreSession session)Deprecated.since 5.9.2 - Use only routes of type 'graph'List<DocumentRouteTableElement>getRouteElements(DocumentRoute route, CoreSession session)Computes the list of elementsDocumentRouteTableElementfor thisDocumentRoute.StringgetRouteModelDocIdWithId(CoreSession session, String id)Returns the doc id of the route model with the given idList<URL>getRouteModelTemplateResources()Returns all the route models resource templates.DocumentRoutegetRouteModelWithId(CoreSession session, String id)Returns the route model with the given idList<DocumentRoute>getRunnableWorkflows(CoreSession session, List<String> documentIds)Returns a list of runnable document routes for the input document IDs.List<DocumentRoute>getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session)List<DocumentRoute>getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session, String worflowModelName)List<Task>getTasks(DocumentModel document, String actorId, String workflowInstanceId, String workflowModelName, CoreSession session)Deprecated.since 11.1 this method does not scale as it does not paginate results.StringgetUndoFromDoneOperationChainId(String documentType)Return the operation chain to undo a step when the step is in done state.StringgetUndoFromRunningOperationChainId(String documentType)Deprecated.since 5.9.2 - Use only routes of type 'graph'List<DocumentModel>getWorkflowInputDocuments(CoreSession session, Task task)Gets the documents following the workflow to which the given task belongsvoidgrantPermissionToTaskAssignees(CoreSession session, String permission, List<DocumentModel> docs, Task task)Grants on these documents the specified assignees permissions for this task.voidgrantPermissionToTaskDelegatedActors(CoreSession session, String permission, List<DocumentModel> docs, Task task)Grants on these documents the specified assignees permissions for this task to the tasks delegated actors.voidimportAllRouteModels(CoreSession session)Imports all the route models resource templates.DocumentRouteimportRouteModel(URL templateResource, boolean overwrite, CoreSession session)Creates a route model in the root models folder defined by the current persister.voidinvalidateRouteModelsCache()booleanisLockedByCurrentUser(DocumentRoute routeModel, CoreSession session)Verify is thisDocumentRouteis already locked by the current user.booleanisRoutable(DocumentModel doc)Checks if the given document can be associated to a DocumentRoute.booleanisWorkflowModel(DocumentRoute documentRoute)Returns true if the document route is a model, false if it is just an instance i.e.voidlockDocumentRoute(DocumentRoute routeModel, CoreSession session)Locks thisDocumentRouteif not already locked by the current user.voidmakeRoutingTasks(CoreSession session, List<Task> tasks)Deprecated.The facet RoutingTask is statically attached to the new RoutingTask Document type since 7.1booleanpurgeDocumentRoute(CoreSession session, DocumentRoute route)Remove the workflow instance if it is canceled, done or orphan.voidreassignTask(CoreSession session, String taskId, List<String> actors, String comment)Reassigns the given task to the list of actors.voidregisterRouteResource(RouteModelResourceType resource, RuntimeContext extensionContext)Registers a new route model template to be imported at application startup.voidremovePermissionFromTaskAssignees(CoreSession session, List<DocumentModel> docs, Task task)Removes on these documents the specified assignees permissions for this task.voidremovePermissionsForTaskActors(CoreSession session, List<DocumentModel> docs, String taskId)Removes on these documents the specified assignees permissions for the task actors and also tasks delegated actors if this task was delegatedvoidremovePermissionsForTaskActors(CoreSession session, List<DocumentModel> docs, Task task)Removes on these documents the specified assignees permissions for the task actors and also tasks delegated actors if this task was delegatedvoidremoveRouteElement(DocumentRouteElement routeElement, CoreSession session)Deprecated.since 5.9.2 - Use only routes of type 'graph'voidresumeInstance(String routeId, String nodeId, Map<String,Object> data, String status, CoreSession session)Resumes a route instance on a give node.DocumentRoutesaveRouteAsNewModel(DocumentRoute route, CoreSession session)Save a route instance as a new model of route.List<DocumentModel>searchRouteModels(CoreSession session, String searchString)Returns the route models matching thesearchString.voidstartInstance(String routeInstanceId, List<String> docIds, Map<String,Serializable> map, CoreSession session)Starts an instance that was created withcreateNewInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession, boolean)but withstartInstance = false.voidunlockDocumentRoute(DocumentRoute routeModel, CoreSession session)Unlocks thisDocumentRoute.If the document is not locked throws aDocumentRouteNotLockedExceptionDocumentRouteunlockDocumentRouteUnrestrictedSession(DocumentRoute routeModel, CoreSession userSession)Unlock the givenDocumentRoutemodel under unrestricted session.voidupdateRouteElement(DocumentRouteElement routeModel, CoreSession session)Update the given route elementDocumentRoutevalidateRouteModel(DocumentRoute routeModel, CoreSession session)Validates the givenDocumentRoutemodel by changing its lifecycle state and setting it and all its children in ReadOnly.
-
-
-
Method Detail
-
createNewInstance
String createNewInstance(String routeModelId, List<String> docIds, Map<String,Serializable> map, CoreSession session, boolean startInstance)
Creates a new route instance and optionally starts it.If
startInstance = false, then the route can be started later by callingstartInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession).- Parameters:
routeModelId- the route model iddocIds- the list of document bound to the instancemap- the values to pass as initial workflow variablessession- the sessionstartInstance- if the route is automatically started- Returns:
- the created route instance id
-
createNewInstance
String createNewInstance(String routeModelId, List<String> docIds, CoreSession session, boolean startInstance)
Creates a new route instance and optionally starts it.If
startInstance = false, then the route can be started later by callingstartInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession).- Parameters:
routeModelId- the route model iddocIds- The list of document bound to the instance.session- the sessionstartInstance- if the route is automatically started- Returns:
- the created route instance id
-
createNewInstance
DocumentRoute createNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session, boolean startInstance)
Create a newDocumentRouteinstance from thisDocumentRoutemodel.- Parameters:
model- The model used to create the instance.documentIds- The list of document bound to the instance.startInstance- if theDocumentRouteis automatically started.- Returns:
- the created
DocumentRouteinstance.
-
createNewInstance
@Deprecated DocumentRoute createNewInstance(DocumentRoute model, String documentId, CoreSession session, boolean startInstance)
Deprecated.since 5.6, use other APIs
-
createNewInstance
@Deprecated DocumentRoute createNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session)
Deprecated.since 5.6, use other APIs
-
createNewInstance
@Deprecated DocumentRoute createNewInstance(DocumentRoute model, String documentId, CoreSession session)
Deprecated.since 5.6, use other APIs
-
startInstance
void startInstance(String routeInstanceId, List<String> docIds, Map<String,Serializable> map, CoreSession session)
Starts an instance that was created withcreateNewInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession, boolean)but withstartInstance = false.- Parameters:
routeInstanceId- the route instance iddocIds- the list of document bound to the instancemap- the values to pass as initial workflow variablessession- the session- Since:
- 5.7.2
-
resumeInstance
void resumeInstance(String routeId, String nodeId, Map<String,Object> data, String status, CoreSession session)
Resumes a route instance on a give node. Any remaining tasks on this node will be cancelled.Called by the UI action corresponding to a task button.
If all attached documents of the workflow instance have been deleted then the workflow is cancelled.
- Parameters:
routeId- the id of the route instancenodeId- the node id to resume ondata- the data coming from UI formstatus- the status coming from UI formsession- the session- Since:
- 5.6
-
completeTask
void completeTask(String routeId, String taskId, Map<String,Object> data, String status, CoreSession session)
Completes a task on a give node. If this is the last task the workflow will continue.Called by the UI action corresponding to a task button.
- Parameters:
routeId- the id of the route instancetaskId- the id of the taskdata- the data coming from UI formstatus- the status coming from UI formsession- the session- Since:
- 5.6
-
saveRouteAsNewModel
DocumentRoute saveRouteAsNewModel(DocumentRoute route, CoreSession session)
Save a route instance as a new model of route.The place in which the new instance is persisted and its name depends on
DocumentRoutingPersister. The route instance should be in either running, done or ready state. The new route model will be in draft state and won't have any attached documents.- Parameters:
route- the instance from which we create a new model.- Returns:
- the new model in draft state.
-
getAvailableDocumentRouteModel
List<DocumentRoute> getAvailableDocumentRouteModel(CoreSession session)
Return the list of availableDocumentRoutemodel the user can start.- Parameters:
session- The session of the user.- Returns:
- A list of available
DocumentRoute
-
getAvailableDocumentRoute
List<DocumentRoute> getAvailableDocumentRoute(CoreSession session)
Return the list of availableDocumentRoutedocument route.- Parameters:
session- The session of the user.- Returns:
- A list of available
DocumentRoute - Since:
- 7.2
-
getOperationChainId
@Deprecated String getOperationChainId(String documentType)
Deprecated.since 5.9.2 - Use only routes of type 'graph'Return the operation chain to run for a documentType. The document type should extend the DocumentRouteStep. Use thechainsToTypeextension point to contribute new mapping.- Parameters:
documentType- The document type- Returns:
- The operation chain id.
-
getUndoFromRunningOperationChainId
@Deprecated String getUndoFromRunningOperationChainId(String documentType)
Deprecated.since 5.9.2 - Use only routes of type 'graph'Return the operation chain to undo a step when the step is in running state. The document type should extend the DocumentRouteStep. Use thechainsToTypeextension point to contribute new mapping.
-
getUndoFromDoneOperationChainId
String getUndoFromDoneOperationChainId(String documentType)
Return the operation chain to undo a step when the step is in done state. The document type should extend the DocumentRouteStep. Use thechainsToTypeextension point to contribute new mapping.
-
validateRouteModel
DocumentRoute validateRouteModel(DocumentRoute routeModel, CoreSession session) throws DocumentRouteNotLockedException
Validates the givenDocumentRoutemodel by changing its lifecycle state and setting it and all its children in ReadOnly.- Returns:
- The validated route.
- Throws:
DocumentRouteNotLockedException
-
unlockDocumentRouteUnrestrictedSession
DocumentRoute unlockDocumentRouteUnrestrictedSession(DocumentRoute routeModel, CoreSession userSession)
Unlock the givenDocumentRoutemodel under unrestricted session.- Returns:
- The unlocked route.
- Since:
- 1.9
-
getRouteElements
List<DocumentRouteTableElement> getRouteElements(DocumentRoute route, CoreSession session)
Computes the list of elementsDocumentRouteTableElementfor thisDocumentRoute.- Parameters:
route-DocumentRoute.session- The session used to query theDocumentRoute.
-
getDocumentRoutesForAttachedDocument
List<DocumentRoute> getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId, List<DocumentRouteElement.ElementLifeCycleState> states)
Return the list of relatedDocumentRoutein a state for a given attached document.- Parameters:
session- The session used to query theDocumentRoute.states- the list of states.- Returns:
- A list of available
DocumentRoute
-
getDocumentRoutesForAttachedDocument
List<DocumentRoute> getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId)
- See Also:
for route running or ready.
-
canUserValidateRoute
@Deprecated boolean canUserValidateRoute(NuxeoPrincipal currentUser)
Deprecated.usecanValidateRoute(DocumentModel, CoreSession)instead.if the user can validate a route.
-
canValidateRoute
boolean canValidateRoute(DocumentModel documentRoute, CoreSession coreSession)
Checks if the principal that created the client session can validate the route
-
addRouteElementToRoute
@Deprecated void addRouteElementToRoute(DocumentRef parentDocumentRef, int idx, DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
Deprecated.since 5.9.2 - Use only routes of type 'graph'Add a route element in another route element.- Parameters:
parentDocumentRef- The DocumentRef of the parent document.idx- The position of the document in its container.routeElement- The document to add.- Throws:
DocumentRouteNotLockedException
-
addRouteElementToRoute
@Deprecated void addRouteElementToRoute(DocumentRef parentDocumentRef, String sourceName, DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
Deprecated.since 5.9.2 - Use only routes of type 'graph'Add a route element in another route element.If the parent element is in draft state, the routeElement is kept in draft state. Otherwise, the element is set to 'ready' state.
- Parameters:
parentDocumentRef- The DocumentRef of the parent document.sourceName- the name of the previous document in the container.routeElement- the document to add.- Throws:
DocumentRouteNotLockedException
-
removeRouteElement
@Deprecated void removeRouteElement(DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
Deprecated.since 5.9.2 - Use only routes of type 'graph'Remove the given route element- Throws:
DocumentRouteNotLockedException
-
getOrderedRouteElement
@Deprecated DocumentModelList getOrderedRouteElement(String routeElementId, CoreSession session)
Deprecated.since 5.9.2 - Use only routes of type 'graph'Get the children of the given stepFolder ordered by the ecm:pos metadata.
-
lockDocumentRoute
void lockDocumentRoute(DocumentRoute routeModel, CoreSession session) throws DocumentRouteAlredayLockedException
Locks thisDocumentRouteif not already locked by the current user. If the document is already locked by another user andDocumentRouteAlredayLockedExceptionis thrown- Parameters:
session- The session used to lock theDocumentRoute.- Throws:
DocumentRouteAlredayLockedException
-
unlockDocumentRoute
void unlockDocumentRoute(DocumentRoute routeModel, CoreSession session) throws DocumentRouteNotLockedException
Unlocks thisDocumentRoute.If the document is not locked throws aDocumentRouteNotLockedException- Parameters:
session- The session used to lock theDocumentRoute.- Throws:
DocumentRouteNotLockedException
-
updateRouteElement
void updateRouteElement(DocumentRouteElement routeModel, CoreSession session) throws DocumentRouteNotLockedException
Update the given route element- Throws:
DocumentRouteNotLockedException
-
isLockedByCurrentUser
boolean isLockedByCurrentUser(DocumentRoute routeModel, CoreSession session)
Verify is thisDocumentRouteis already locked by the current user.
-
isRoutable
boolean isRoutable(DocumentModel doc)
Checks if the given document can be associated to a DocumentRoute.- Parameters:
doc- the document- Returns:
trueif the document can be routed
-
importAllRouteModels
void importAllRouteModels(CoreSession session)
Imports all the route models resource templates.- Parameters:
session- the core session to use- Since:
- 7.3
-
importRouteModel
DocumentRoute importRouteModel(URL templateResource, boolean overwrite, CoreSession session)
Creates a route model in the root models folder defined by the current persister. The templateResource is a zip tree xml export of a route document and it is imported using the core-io importer.- Since:
- 5.6
-
registerRouteResource
void registerRouteResource(RouteModelResourceType resource, RuntimeContext extensionContext)
Registers a new route model template to be imported at application startup.- Parameters:
resource- the resource- Since:
- 5.6
-
getRouteModelTemplateResources
List<URL> getRouteModelTemplateResources()
Returns all the route models resource templates. Use therouteModelImporterextension point to contribute new resources.- Since:
- 5.6
-
searchRouteModels
List<DocumentModel> searchRouteModels(CoreSession session, String searchString)
Returns the route models matching thesearchString.- Since:
- 5.6
-
getRouteModelWithId
DocumentRoute getRouteModelWithId(CoreSession session, String id)
Returns the route model with the given id- Since:
- 5.6
-
getRouteModelDocIdWithId
String getRouteModelDocIdWithId(CoreSession session, String id)
Returns the doc id of the route model with the given id- Since:
- 5.7
-
makeRoutingTasks
@Deprecated void makeRoutingTasks(CoreSession session, List<Task> tasks)
Deprecated.The facet RoutingTask is statically attached to the new RoutingTask Document type since 7.1Marks the tasks as Routing tasks.This allows the related documents to be adapted to
RoutingTask.- Parameters:
session- the sessiontasks- the tasks- Since:
- 5.6, was on RoutingTaskService before
-
endTask
void endTask(CoreSession session, Task task, Map<String,Object> data, String status)
Ends a task. If this is the last task the workflow will continue.- Parameters:
status- name of the button clicked to submit the task form- Since:
- 5.6, was on RoutingTaskService before
-
grantPermissionToTaskAssignees
void grantPermissionToTaskAssignees(CoreSession session, String permission, List<DocumentModel> docs, Task task)
Grants on these documents the specified assignees permissions for this task.- Parameters:
session- the sessionpermission- the permissiondocs- the documentstask- the task- Since:
- 5.6
-
removePermissionFromTaskAssignees
void removePermissionFromTaskAssignees(CoreSession session, List<DocumentModel> docs, Task task)
Removes on these documents the specified assignees permissions for this task.- Parameters:
session- the sessiondocs- the documentstask- the task- Since:
- 5.6
-
getWorkflowInputDocuments
List<DocumentModel> getWorkflowInputDocuments(CoreSession session, Task task)
Gets the documents following the workflow to which the given task belongs- Since:
- 5.6, was on RoutingTaskService before
-
finishTask
@Deprecated void finishTask(CoreSession session, DocumentRoute route, Task task, boolean delete) throws DocumentRouteException
Deprecated.// will be removed in 5.8, use completeTask insteadFinishes an open task. All permissions granted to the tasks assignees on the document following the worklflow are removed. Doesn't resume the workflow as thecompleteTaskmethod. Not executed using an unrestricted session.- Throws:
DocumentRouteException- Since:
- 5.7
-
cancelTask
void cancelTask(CoreSession session, String taskId) throws DocumentRouteException
Cancels an open task. If the task was created by an workflow, all permissions granted to the tasks assignees on the document following the worklflow are removed. Doesn't resume the workflow as thecompleteTaskmethod.- Throws:
DocumentRouteException- Since:
- 5.7.3
-
reassignTask
void reassignTask(CoreSession session, String taskId, List<String> actors, String comment) throws DocumentRouteException
Reassigns the given task to the list of actors. Removes the permissions granted on the document following the workflow to the current task assignees and grants them to the new actors.- Throws:
DocumentRouteException- Since:
- 5.7.3
-
delegateTask
void delegateTask(CoreSession session, String taskId, List<String> delegatedActors, String comment) throws DocumentRouteException
Reassigns the given task to the list of actors. Grants to new delegated actors the same permissions as the task assignees on the document following the workflow .- Throws:
DocumentRouteException- Since:
- 5.8
-
grantPermissionToTaskDelegatedActors
void grantPermissionToTaskDelegatedActors(CoreSession session, String permission, List<DocumentModel> docs, Task task)
Grants on these documents the specified assignees permissions for this task to the tasks delegated actors.- Parameters:
session- the sessionpermission- the permissiondocs- the documentstask- the task- Since:
- 5.8
-
removePermissionsForTaskActors
void removePermissionsForTaskActors(CoreSession session, List<DocumentModel> docs, Task task)
Removes on these documents the specified assignees permissions for the task actors and also tasks delegated actors if this task was delegated- Parameters:
session- the sessiondocs- the documentstask- the task- Since:
- 5.8
-
removePermissionsForTaskActors
void removePermissionsForTaskActors(CoreSession session, List<DocumentModel> docs, String taskId)
Removes on these documents the specified assignees permissions for the task actors and also tasks delegated actors if this task was delegated- Parameters:
session- the sessiondocs- the documentstaskId- the taskId- Since:
- 7.4
-
cleanupDoneAndCanceledRouteInstances
@Deprecated void cleanupDoneAndCanceledRouteInstances(String repositoryName, int limit)
Deprecated.since 2023, use #cleanupRouteInstances(String)instead.Query for the routes 'done' or 'canceled' and delete them. The max no of the routes that will be deleted is specified by the 'limit' parameter. When the limit is '0' all the completed routes are deleted.- Since:
- 5.8
-
cleanupRouteInstances
void cleanupRouteInstances(String repositoryName)
Remove the routes in state 'done' or 'canceled' of the given repository.If 'nuxeo.routing.cleanup.workflow.instances.orphan' framework property is set to true, orphan routes (for which all associated documents have been removed) will also be removed.
- Parameters:
repositoryName- the repository name to clean up- Since:
- 2023
-
invalidateRouteModelsCache
void invalidateRouteModelsCache()
- Since:
- 5.9.3
-
doCleanupDoneAndCanceledRouteInstances
@Deprecated int doCleanupDoneAndCanceledRouteInstances(String reprositoryName, int limit)
Deprecated.since 2023, use GarbageCollectRoutesAction insteadQuery for the routes 'done' or 'canceled' and delete them. The max no of the routes that will be deleted is specified by the 'limit' parameter. When the limit is '0' all the completed routes are deleted. The routes to be deleted are ordered ascending by their creation date.- Returns:
- always -1
- Since:
- 7.1
-
getTasks
@Deprecated List<Task> getTasks(DocumentModel document, String actorId, String workflowInstanceId, String workflowModelName, CoreSession session)
Deprecated.since 11.1 this method does not scale as it does not paginate results. Useorg.nuxeo.ecm.platform.routing.core.provider.RoutingTaskPageProvider#getCurrentPage()instead.- Since:
- 7.2
-
getDocumentRelatedWorkflows
List<DocumentRoute> getDocumentRelatedWorkflows(DocumentModel document, CoreSession session)
- Since:
- 7.2
-
getRunningWorkflowInstancesLaunchedByCurrentUser
List<DocumentRoute> getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session)
- Since:
- 7.2
-
getRunningWorkflowInstancesLaunchedByCurrentUser
List<DocumentRoute> getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session, String worflowModelName)
- Since:
- 7.2
-
isWorkflowModel
boolean isWorkflowModel(DocumentRoute documentRoute)
Returns true if the document route is a model, false if it is just an instance i.e. a running workflow.- Since:
- 7.2
-
canCreateInstance
boolean canCreateInstance(CoreSession session, List<String> documentIds, String worflowModelName)
Returnstrueif the workflow model can be started on the document list.- Since:
- 11.4
-
getRunnableWorkflows
List<DocumentRoute> getRunnableWorkflows(CoreSession session, List<String> documentIds)
Returns a list of runnable document routes for the input document IDs.- Since:
- 11.4
-
purgeDocumentRoute
boolean purgeDocumentRoute(CoreSession session, DocumentRoute route)
Remove the workflow instance if it is canceled, done or orphan. An orphan instance has all its attached document already removed.- Returns:
- true if the route has been deleted, false otherwise
- Since:
- 2023
-
-