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()
ProcessLifeCycle
startProcess
in interface ProcessLifeCycle
public void stopProcess()
stopProcess
in interface ProcessLifeCycle
public ProcessWorkflow init(WorkerParameters workerParameters, String workflowId, LogbookTypeProcess logbookTypeProcess, Integer tenantId, String contextId) throws ProcessingException
ProcessManagement
init
in interface ProcessManagement
workerParameters
- 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
ProcessManagement
next
in interface ProcessManagement
workerParameters
- 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
ProcessManagement
replay
in interface ProcessManagement
workerParameters
- 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
ProcessManagement
resume
in interface ProcessManagement
workerParameters
- 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
ProcessManagement
pause
in interface ProcessManagement
operationId
- 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
ProcessManagement
cancel
in interface ProcessManagement
operationId
- the operation identifiertenantId
- the tenant identifierProcessingException
- if cancel could not be appliedStateNotAllowedException
- if the process state is incorrectWorkflowNotFoundException
public void close()
close
in interface VitamAutoCloseable
close
in interface AutoCloseable
public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId)
ProcessManagement
findAllProcessWorkflow
in interface ProcessManagement
tenantId
- the tenant identifierpublic ProcessWorkflow findOneProcessWorkflow(String operationId, Integer tenantId)
ProcessManagement
findOneProcessWorkflow
in interface ProcessManagement
operationId
- the operation identifiertenantId
- the tenant identifierpublic Map<String,WorkFlow> getWorkflowDefinitions()
ProcessManagement
getWorkflowDefinitions
in interface ProcessManagement
public void reloadWorkflowDefinitions()
ProcessManagement
reloadWorkflowDefinitions
in interface ProcessManagement
public Map<Integer,Map<String,ProcessWorkflow>> getWorkFlowList()
getWorkFlowList
in interface ProcessManagement
public Map<String,IEventsState> getProcessMonitorList()
ProcessManagement
getProcessMonitorList
in interface ProcessManagement
public List<ProcessDetail> getFilteredProcess(ProcessQuery query, Integer tenantId)
ProcessManagement
getFilteredProcess
in interface ProcessManagement
query
- to filtertenantId
- the tenandIdpublic ServerConfiguration getConfiguration()
ProcessManagement
getConfiguration
in interface ProcessManagement
Copyright © 2018 Vitam. All rights reserved.