public class ProcessManagementImpl extends Object implements ProcessManagement
| Constructor and Description |
|---|
ProcessManagementImpl(ServerConfiguration config,
ProcessDistributor processDistributor)
constructor of ProcessManagementImpl
|
| Modifier and Type | Method and Description |
|---|---|
ItemStatus |
cancel(String operationId,
Integer tenantId)
Handle a cancel action for the corresponding process workflow
|
void |
close() |
List<ProcessWorkflow> |
findAllProcessWorkflow(Integer tenantId)
Retrieve All the workflow process for monitoring purpose The final business scope of this feature is likely to be
redefined, to match the future need
|
ProcessWorkflow |
findOneProcessWorkflow(String operationId,
Integer tenantId)
find the workflow process according to the operation_id and the tenant_id
|
ServerConfiguration |
getConfiguration()
server configuration
|
List<ProcessDetail> |
getFilteredProcess(ProcessQuery query,
Integer tenantId)
Get filtered process workflow
|
Map<String,IEventsState> |
getProcessMonitorList()
sProcessMonitorList
|
Map<String,WorkFlow> |
getWorkflowDefinitions()
Retrieve the loaded workflow definitions
|
Map<Integer,Map<String,ProcessWorkflow>> |
getWorkFlowList() |
ProcessWorkflow |
init(WorkerParameters workerParameters,
String workflowId,
LogbookTypeProcess logbookTypeProcess,
Integer tenantId,
String contextId)
Init a new process workflow
|
ItemStatus |
next(WorkerParameters workerParameters,
Integer tenantId)
Handle a next action for the corresponding process workflow
|
ItemStatus |
pause(String operationId,
Integer tenantId)
Handle a pause action for the corresponding process workflow
|
void |
reloadWorkflowDefinitions()
Reload workflow definitions
|
ItemStatus |
replay(WorkerParameters workerParameters,
Integer tenantId)
Handle a replay action for the corresponding process workflow
|
ItemStatus |
resume(WorkerParameters workerParameters,
Integer tenantId)
Handle a resume action for the corresponding process workflow
|
void |
startProcess()
This method is called when the server started
Start all process
|
void |
stopProcess()
This method is used to properly stop all processworklfow Call stop on all running process workflow and propagate
this stop to the distributor The distributor should : - Unregister all worker and complete all opened connections
to the workers - Stop properly waiting tasks - Save index of element to be used in the next start
|
public ProcessManagementImpl(ServerConfiguration config, ProcessDistributor processDistributor) throws ProcessingStorageWorkspaceException
config - configuration of process engine serverprocessDistributor - ProcessingStorageWorkspaceException - thrown when error occurred on loading paused processpublic void startProcess()
ProcessLifeCyclestartProcess in interface ProcessLifeCyclepublic void stopProcess()
stopProcess in interface ProcessLifeCyclepublic ProcessWorkflow init(WorkerParameters workerParameters, String workflowId, LogbookTypeProcess logbookTypeProcess, Integer tenantId, String contextId) throws ProcessingException
ProcessManagementinit in interface ProcessManagementworkerParameters - parameters to be passed to ProcessEngineworkflowId - the workflow identifierlogbookTypeProcess - the process typetenantId - the tenant identifiercontextId - the context IDProcessingException - if the process could not be initializedpublic ItemStatus next(WorkerParameters workerParameters, Integer tenantId) throws ProcessingException, StateNotAllowedException
ProcessManagementnext in interface ProcessManagementworkerParameters - parameters to be passed to ProcessEnginetenantId - the tenant identifierProcessingException - if next could not be appliedStateNotAllowedException - if the process state is incorrectpublic ItemStatus replay(WorkerParameters workerParameters, Integer tenantId) throws ProcessingException, StateNotAllowedException
ProcessManagementreplay in interface ProcessManagementworkerParameters - parameters to be passed to ProcessEnginetenantId - the tenant identifierProcessingException - if replay could not be appliedStateNotAllowedException - if the process state is incorrectpublic ItemStatus resume(WorkerParameters workerParameters, Integer tenantId) throws ProcessingException, StateNotAllowedException
ProcessManagementresume in interface ProcessManagementworkerParameters - parameters to be passed to ProcessEnginetenantId - the tenant identifierProcessingException - if resume could not be appliedStateNotAllowedException - if the process state is incorrectpublic ItemStatus pause(String operationId, Integer tenantId) throws ProcessingException, StateNotAllowedException
ProcessManagementpause in interface ProcessManagementoperationId - the operation identifiertenantId - the tenant identifierProcessingException - if pause could not be appliedStateNotAllowedException - if the process state is incorrectpublic ItemStatus cancel(String operationId, Integer tenantId) throws WorkflowNotFoundException, ProcessingException, StateNotAllowedException
ProcessManagementcancel in interface ProcessManagementoperationId - the operation identifiertenantId - the tenant identifierProcessingException - if cancel could not be appliedStateNotAllowedException - if the process state is incorrectWorkflowNotFoundExceptionpublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseablepublic List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId)
ProcessManagementfindAllProcessWorkflow in interface ProcessManagementtenantId - the tenant identifierpublic ProcessWorkflow findOneProcessWorkflow(String operationId, Integer tenantId)
ProcessManagementfindOneProcessWorkflow in interface ProcessManagementoperationId - the operation identifiertenantId - the tenant identifierpublic Map<String,WorkFlow> getWorkflowDefinitions()
ProcessManagementgetWorkflowDefinitions in interface ProcessManagementpublic void reloadWorkflowDefinitions()
ProcessManagementreloadWorkflowDefinitions in interface ProcessManagementpublic Map<Integer,Map<String,ProcessWorkflow>> getWorkFlowList()
getWorkFlowList in interface ProcessManagementpublic Map<String,IEventsState> getProcessMonitorList()
ProcessManagementgetProcessMonitorList in interface ProcessManagementpublic List<ProcessDetail> getFilteredProcess(ProcessQuery query, Integer tenantId)
ProcessManagementgetFilteredProcess in interface ProcessManagementquery - to filtertenantId - the tenandIdpublic ServerConfiguration getConfiguration()
ProcessManagementgetConfiguration in interface ProcessManagementCopyright © 2018 Vitam. All rights reserved.