Package com.morpheusdata.core.providers
Interface ProcessJobProvider
- All Superinterfaces:
PluginProvider
A
PluginProvider that defines a unit of executable async work for a ProcessEvent.
The provider runs against a single ProcessEvent â it receives the current step's inputs and returns success or
failure, plus optional nextOpts that get forwarded to the next step in the chain. The provider defines
what the step does. MorpheusProcessService, ApplianceJobService, and PluginProcessJobService
handle scheduling, dispatch, and progression.
When the plugin loads, Morpheus syncs the provider's metadata into a ProcessJobType domain row. The
provider's PluginProvider.getCode() becomes the identifier across the system: it is the ProcessJobType.code
and the value stored in ProcessEvent.jobName.
- Since:
- 1.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.ConfigurationDriftCheckFacet<T>, PluginProvider.EventSubscriberFacet<E extends Event>, PluginProvider.UpdateFacet<T> -
Method Summary
Modifier and TypeMethodDescriptionexecute(ProcessJobExecutionRequest request) Execute the process step.A description of this process job provider.default List<OptionType>Option types that define configurable inputs for this step.default IntegerThe maximum number of automatic retry attempts before the step fails terminally.default IntegerThe delay in seconds between automatic retry attempts.default BooleanWhether this step can be canceled by a user.default BooleanWhether this step should be automatically retried on failure.default ServiceResponseonFail(ProcessJobExecutionRequest request) Called when a step fails terminally (retries exhausted or not retryable).Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin
-
Method Details
-
getDescription
String getDescription()A description of this process job provider. Used when syncing provider metadata into the ProcessJobType domain row.- Returns:
- human-readable description of what this process job does
-
execute
Execute the process step.- Parameters:
request- contains the processEventId and the current step's merged opts- Returns:
- success with optional
ProcessJobExecutionResponse.nextOptsto forward to the next step, or failure to trigger retry/onFail handling
-
onFail
Called when a step fails terminally (retries exhausted or not retryable). Use for cleanup of side effects from this step. Exceptions are logged but do not change the outcome â the step is already failed. Not called on cancel.- Parameters:
request- the same request that was passed toexecute(ProcessJobExecutionRequest)- Returns:
- a ServiceResponse (success/failure is logged but does not affect the outcome)
-
isRetryable
Whether this step should be automatically retried on failure.- Returns:
- true if retryable, false otherwise. Default is false.
-
getRetryCount
The maximum number of automatic retry attempts before the step fails terminally.- Returns:
- retry count. Default is 5.
-
getRetryDelaySeconds
The delay in seconds between automatic retry attempts.- Returns:
- delay in seconds. Default is 10.
-
isCancelable
Whether this step can be canceled by a user. Canceling sets a flag on the process event; the plugin is responsible for checking the canceled flag during execution.- Returns:
- true if cancelable, false otherwise. Default is false.
-
getOptionTypes
Option types that define configurable inputs for this step. These are rendered in the retry dialog so users can modify inputs before manually retrying a failed step.- Returns:
- list of OptionType definitions. Default is an empty list.
-