Package com.morpheusdata.core
Interface MorpheusProcessService
- All Superinterfaces:
MorpheusDataQueryService<Process>,MorpheusDataService<Process,Process>
The service to inform Morpheus of long-running processes. This service is typically used during provisioning of
Workloads to notify that various steps of a process have started and then completed. The actual underlying actions
performed during the execution of the process is not controlled via this service. Rather, it is purely a way to
notify Morpheus that various actions are currently being performed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringWhen the status is set to STATUS_COMPLETE, the step will show as complete and the message field is shown in the history detail modal.static final StringWhen the status is set to STATUS_FAILED, the step will show as failed and the error filed will be shown in the history detail modal. -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>endProcess(Process process, String processStatus, String output) End the process with the status specifiedio.reactivex.rxjava3.core.Single<Boolean>endProcessStep(Process process, String processStatus, String output) Stops the last ProcessEvent associated with the Processio.reactivex.rxjava3.core.Single<Boolean>endProcessStep(Process process, String processStatus, String output, Boolean appendOutput) Stops the last ProcessEvent associated with the Processio.reactivex.rxjava3.core.Single<Boolean>endProcessStepAt(Process process, ProcessEvent.ProcessType lastStepType, String processStatus, String output) Deprecated.io.reactivex.rxjava3.core.Single<Boolean>endProcessStepAt(Process process, ProcessStepType lastStepType, String processStatus, String output, Boolean appendOutput) Stops a specific ProcessEvent associated with the Process.io.reactivex.rxjava3.core.Single<Process>startProcess(Workload workload, ProcessEvent.ProcessType processType, User user, String timerCategory) Deprecated.io.reactivex.rxjava3.core.Single<Process>startProcess(Workload workload, ProcessEvent.ProcessType processType, User user, String timerCategory, String eventTitle) Deprecated.io.reactivex.rxjava3.core.Single<Process>startProcess(Workload workload, ProcessStepType stepType, User user, String timerCategory) Start a new Process for the Workloadio.reactivex.rxjava3.core.Single<Process>startProcess(Workload workload, ProcessStepType stepType, User user, String timerCategory, String eventTitle) Start a new Process for the Workloadio.reactivex.rxjava3.core.Single<Boolean>startProcessStep(Process process, ProcessEvent nextEvent, String processStatus) Start a new ProcessEvent associated to the Process.io.reactivex.rxjava3.core.Single<Boolean>startProcessStepAt(Process process, ProcessEvent.ProcessType lastStepType, ProcessEvent nextEvent, String processStatus) io.reactivex.rxjava3.core.Single<Boolean>startProcessStepAt(Process process, ProcessStepType lastStepType, ProcessEvent nextStep, String processStatus) Start a new ProcessEvent associated to the Process while ending a specific previous step.io.reactivex.rxjava3.core.Single<Boolean>updateProcessStep(Process process, ProcessStepType lastStepType, ProcessStepUpdate stepUpdate, Boolean appendOutput) Updates the last ProcessEvent of type `lastStepType`Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, searchMethods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save, save
-
Field Details
-
STATUS_COMPLETE
When the status is set to STATUS_COMPLETE, the step will show as complete and the message field is shown in the history detail modal.- See Also:
-
STATUS_FAILED
When the status is set to STATUS_FAILED, the step will show as failed and the error filed will be shown in the history detail modal.- See Also:
-
-
Method Details
-
startProcess
io.reactivex.rxjava3.core.Single<Process> startProcess(Workload workload, ProcessEvent.ProcessType processType, User user, String timerCategory) Deprecated.Start a new Process for the Workload- Parameters:
workload- the Workload to associate the Process toprocessType- the ProcessType to startuser- the User that starts the process (optional)timerCategory- a category to associate with this Process. The category is used to provide estimated durations for a Process based on previous run of processes with this same category.- Returns:
- Boolean indicating success
-
startProcess
io.reactivex.rxjava3.core.Single<Process> startProcess(Workload workload, ProcessStepType stepType, User user, String timerCategory) Start a new Process for the Workload- Parameters:
workload- the Workload to associate the Process tostepType- the ProcessStepType to startuser- the User that starts the process (optional)timerCategory- a category to associate with this Process. The category is used to provide estimated durations for a Process based on previous run of processes with this same category.- Returns:
- Boolean indicating success
-
startProcess
@Deprecated(since="1.2.8") io.reactivex.rxjava3.core.Single<Process> startProcess(Workload workload, ProcessEvent.ProcessType processType, User user, String timerCategory, String eventTitle) Deprecated.Start a new Process for the Workload- Parameters:
workload- the Workload to associate the Process toprocessType- the ProcessType to startuser- the User that starts the process (optional)timerCategory- a category to associate with this Process. The category is used to provide estimated durations for a Process based on previous run of processes with this same category.eventTitle- an event title to associate with this Process- Returns:
- Boolean indicating success
-
startProcess
io.reactivex.rxjava3.core.Single<Process> startProcess(Workload workload, ProcessStepType stepType, User user, String timerCategory, String eventTitle) Start a new Process for the Workload- Parameters:
workload- the Workload to associate the Process tostepType- the ProcessStepType to startuser- the User that starts the process (optional)timerCategory- a category to associate with this Process. The category is used to provide estimated durations for a Process based on previous run of processes with this same category.eventTitle- an event title to associate with this Process- Returns:
- Boolean indicating success
-
startProcessStep
io.reactivex.rxjava3.core.Single<Boolean> startProcessStep(Process process, ProcessEvent nextEvent, String processStatus) Start a new ProcessEvent associated to the Process. This will end any currently running ProcessEvents associated to the Process- Parameters:
process- The Process on which to create a new ProcessEvent to startnextEvent- The new ProcessEvent to startprocessStatus- The status (i.e. 'complete', 'failed')- Returns:
- Boolean indicating success
-
startProcessStepAt
@Deprecated(since="1.2.8") io.reactivex.rxjava3.core.Single<Boolean> startProcessStepAt(Process process, ProcessEvent.ProcessType lastStepType, ProcessEvent nextEvent, String processStatus) Start a new ProcessEvent associated to the Process while ending a specific previous step. This will end the ProcessEvent with the specified lastStepType and then start a new ProcessEvent.- Parameters:
process- The Process on which to create a new ProcessEvent to startlastStepType- The type of the last step to end before starting the new eventnextEvent- The new ProcessEvent to startprocessStatus- The status (i.e. 'complete', 'failed')- Returns:
- Boolean indicating success
-
startProcessStepAt
io.reactivex.rxjava3.core.Single<Boolean> startProcessStepAt(Process process, ProcessStepType lastStepType, ProcessEvent nextStep, String processStatus) Start a new ProcessEvent associated to the Process while ending a specific previous step. This will end the ProcessEvent with the specified lastStepType and then start a new ProcessEvent.- Parameters:
process- The Process on which to create a new ProcessEvent to startlastStepType- The type of the last step to end before starting the new eventnextStep- The new ProcessEvent to startprocessStatus- The status (i.e. 'complete', 'failed')- Returns:
- Boolean indicating success
-
updateProcessStep
io.reactivex.rxjava3.core.Single<Boolean> updateProcessStep(Process process, ProcessStepType lastStepType, ProcessStepUpdate stepUpdate, Boolean appendOutput) Updates the last ProcessEvent of type `lastStepType`- Parameters:
process- The process to search for an event of type `lastStepType`lastStepType- type of the last event to updatestepUpdate- update parameters for the eventappendOutput- true to append to the existing output; false to replace- Returns:
- Boolean indicating success
-
endProcessStep
io.reactivex.rxjava3.core.Single<Boolean> endProcessStep(Process process, String processStatus, String output) Stops the last ProcessEvent associated with the ProcessThis will not appendOutput and will instead override it. If you want to preserve the existing output, use
endProcessStep(Process, String, String, Boolean)which allows you to specify appendOutput = true.- Parameters:
process- The Process from which to fetch the last ProcessEvent to stopprocessStatus- The status (i.e. 'complete', 'failed')output- The output to associate with the ProcessEvent- Returns:
- Boolean indicating success
-
endProcessStep
io.reactivex.rxjava3.core.Single<Boolean> endProcessStep(Process process, String processStatus, String output, Boolean appendOutput) Stops the last ProcessEvent associated with the Process- Parameters:
process- The Process from which to fetch the last ProcessEvent to stopprocessStatus- The status (i.e. 'complete', 'failed')output- The output to associate with the ProcessEventappendOutput- true to append to the existing output; false to replace- Returns:
- Boolean indicating success
-
endProcessStepAt
@Deprecated(since="1.2.8") io.reactivex.rxjava3.core.Single<Boolean> endProcessStepAt(Process process, ProcessEvent.ProcessType lastStepType, String processStatus, String output) Stops a specific ProcessEvent associated with the Process.This will not appendOutput and will instead override it. If you want to preserve the existing output, use
endProcessStep(Process, String, String, Boolean)which allows you to specify appendOutput = true.- Parameters:
process- The Process from which to fetch the last ProcessEvent to stoplastStepType- The type of the last step to endprocessStatus- The status (i.e. 'complete', 'failed'). If not specified, 'complete' is used.output- The output to associate with the ProcessEvent- Returns:
- Boolean indicating succes
-
endProcessStepAt
io.reactivex.rxjava3.core.Single<Boolean> endProcessStepAt(Process process, ProcessStepType lastStepType, String processStatus, String output, Boolean appendOutput) Stops a specific ProcessEvent associated with the Process.- Parameters:
process- The Process from which to fetch the last ProcessEvent to stoplastStepType- The type of the last step to endprocessStatus- The status (i.e. 'complete', 'failed'). If not specified, 'complete' is used.output- The output to associate with the ProcessEventappendOutput- true to append to the existing output; false to replace- Returns:
- Boolean indicating success
-
endProcess
io.reactivex.rxjava3.core.Single<Boolean> endProcess(Process process, String processStatus, String output) End the process with the status specified- Parameters:
process- The Process to endprocessStatus- The status (i.e. 'complete', 'failed')output- The output to associate with the Process- Returns:
- Boolean indicating success
-
endProcessStepAt(Process, ProcessStepType, String, String, Boolean)