Interface IEventsState
- All Known Implementing Classes:
StateMachine
public interface IEventsState
This interface expose the action to be executed by the ProcessManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancel as soon as possible the processWorkflow, To do that, the step pauseCancelAction is updated to be PauseOrCancelAction.ACTION_CANCEL Unlike pause, - The final step should be executed, - PauseOrCancelAction.ACTION_CANCEL have no impact on the final step - The final step cannot be cancelledint
boolean
isDone()
boolean
boolean
void
next
(WorkerParameters workerParameters) Like a resume but pause at the next stepvoid
pause()
Pause the processWorkflow, If the last step the just wait the final step Else pause the processWorkflow as soon as possible Do not wait all elements of the current step to be executed The step pauseCancelAction will be updated to PauseOrCancelAction.ACTION_PAUSE If all elements of the current step are executed then stop correctly and step pauseCancelAction will be updated to PauseOrCancelAction.ACTION_COMPLETE After next or resume occurs on paused processWorkflow, It will starts from the step pauseCancelAction equals to PauseOrCancelAction.ACTION_PAUSE if exists and update pauseCancelAction to be PauseOrCancelAction.ACTION_RECOVER Else starts normally from the next stepvoid
replay
(WorkerParameters workerParameters) Replay the last executed step, or if it s stated, the step passed as a parametervoid
resume
(WorkerParameters workerParameters) Do an evaluation of the State RUNNING If the state is not permitted a StateNotAllowedException is thrown Else call doRunning methodvoid
shutdown()
Should used only when server is shutting down To prevent deadlock, this method is not synchronized, Because onComplete and onPauseOrCancel are synchronized and called from ProcessEngine
-
Method Details
-
resume
Do an evaluation of the State RUNNING If the state is not permitted a StateNotAllowedException is thrown Else call doRunning method- Parameters:
workerParameters
-- Throws:
StateNotAllowedException
ProcessingException
-
next
Like a resume but pause at the next step- Parameters:
workerParameters
-- Throws:
StateNotAllowedException
ProcessingException
-
pause
Pause the processWorkflow, If the last step the just wait the final step Else pause the processWorkflow as soon as possible Do not wait all elements of the current step to be executed The step pauseCancelAction will be updated to PauseOrCancelAction.ACTION_PAUSE If all elements of the current step are executed then stop correctly and step pauseCancelAction will be updated to PauseOrCancelAction.ACTION_COMPLETE After next or resume occurs on paused processWorkflow, It will starts from the step pauseCancelAction equals to PauseOrCancelAction.ACTION_PAUSE if exists and update pauseCancelAction to be PauseOrCancelAction.ACTION_RECOVER Else starts normally from the next step- Throws:
StateNotAllowedException
-
replay
Replay the last executed step, or if it s stated, the step passed as a parameter- Parameters:
workerParameters
-- Throws:
StateNotAllowedException
ProcessingException
-
shutdown
void shutdown()Should used only when server is shutting down To prevent deadlock, this method is not synchronized, Because onComplete and onPauseOrCancel are synchronized and called from ProcessEngine -
cancel
Cancel as soon as possible the processWorkflow, To do that, the step pauseCancelAction is updated to be PauseOrCancelAction.ACTION_CANCEL Unlike pause, - The final step should be executed, - PauseOrCancelAction.ACTION_CANCEL have no impact on the final step - The final step cannot be cancelled- Throws:
StateNotAllowedException
-
isDone
boolean isDone()- Returns:
- true is processWorkflow is completed or Pause
-
isRecover
boolean isRecover()- Returns:
- true is processWorkflow is Pause
-
isStepByStep
boolean isStepByStep()- Returns:
- true if processWorkflow is running in stepByStep (next) mode or in continue mode (resume)
-
getLogbookTypeProcess
LogbookTypeProcess getLogbookTypeProcess()- Returns:
- The LogbookTypeProcess
-
getTenant
int getTenant()- Returns:
- The tenantId of the processWorkflow
-
getWorkflowId
String getWorkflowId()- Returns:
- The workflow Id
-
getContextId
String getContextId() -
getWorkflowParameters
-