Interface MorpheusProcessService

All Superinterfaces:
MorpheusDataQueryService<Process>, MorpheusDataService<Process,Process>

public interface MorpheusProcessService extends 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.
  • Method Details

    • startProcess

      io.reactivex.rxjava3.core.Single<Process> startProcess(Workload workload, ProcessEvent.ProcessType processType, User user, String timerCategory)
      Start a new Process for the Workload
      Parameters:
      workload - the Workload to associate the Process to
      processType - the ProcessType to start
      user - the User that starts the process (optional)
      timerCategory - a category to associate with this Process
      Returns:
      Boolean indicating success
    • startProcess

      io.reactivex.rxjava3.core.Single<Process> startProcess(Workload workload, ProcessEvent.ProcessType processType, User user, String timerCategory, String eventTitle)
      Start a new Process for the Workload
      Parameters:
      workload - the Workload to associate the Process to
      processType - the ProcessType to start
      user - the User that starts the process (optional)
      timerCategory - a category to associate with this Process
      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 start
      nextEvent - The new ProcessEvent to start
      processStatus - The status (i.e. 'complete', 'failed')
      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 Process
      Parameters:
      process - The Process from which to fetch the last ProcessEvent to stop
      processStatus - The status (i.e. 'complete', 'failed')
      output - The output to associate with the ProcessEvent
      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 end
      processStatus - The status (i.e. 'complete', 'failed')
      output - The output to associate with the Process
      Returns:
      Boolean indicating success