Class WorkflowCustomization
java.lang.Object
io.axoniq.framework.workflow.configuration.WorkflowCustomization
Encapsulates workflow module configuration.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowCustomizationdefaultConfiguration(String workflowName, @Nullable Configuration configuration) Create default module configuration.eventNameCustomizer(EventNameCustomizer eventNameCustomizer) Sets event name customizer.Returns the policy that decides whether an exception escaping the workflow body pauses the workflow or fails it.recoverableExceptionPolicy(RecoverableWorkflowExceptionPolicy recoverableExceptionPolicy) Sets the policy that decides whether an exception escaping the workflow body pauses the workflow or fails it.registerWorkflowStatusChangeListener(WorkflowStatus workflowStatus, WorkflowStatusChangeListener workflowStatusChangeListener) Registers a workflow status change listener for given status.unregisterWorkflowStatusChangeListener(WorkflowStatus workflowStatus, WorkflowStatusChangeListener workflowStatusChangeListener) Un-Registers a workflow status change listener for the given status.workflowIdProvider(WorkflowIdProvider workflowIdProvider) Sets workflow id provider.workflowVersion(String workflowVersion) Sets the workflow definition version (semver string, e.g.
-
Field Details
-
eventNameCustomizer
-
workflowIdProvider
-
-
Method Details
-
defaultConfiguration
public static WorkflowCustomization defaultConfiguration(String workflowName, @Nullable Configuration configuration) Create default module configuration.- Parameters:
workflowName- name of the workflow.configuration- configuration to use.- Returns:
- workflow module configuration.
-
workflowVersion
Sets the workflow definition version (semver string, e.g."0.0.2"). Optional — defaults toVersion.DEFAULT_VERSION("0.0.1").- Parameters:
workflowVersion- the version to use for this workflow definition.- Returns:
- module configuration instance.
-
workflowVersion
- Returns:
- the configured workflow definition version.
-
eventNameCustomizer
Sets event name customizer.- Parameters:
eventNameCustomizer- event name customizer to set.- Returns:
- module configuration instance.
-
workflowIdProvider
Sets workflow id provider.- Parameters:
workflowIdProvider- workflow id provider to set.- Returns:
- module configuration instance.
-
recoverableExceptionPolicy
public WorkflowCustomization recoverableExceptionPolicy(RecoverableWorkflowExceptionPolicy recoverableExceptionPolicy) Sets the policy that decides whether an exception escaping the workflow body pauses the workflow or fails it. Defaults to theRecoverableWorkflowExceptionPolicycomponent, orRecoverableWorkflowExceptionPolicy.DEFAULTwhen none is registered.- Parameters:
recoverableExceptionPolicy- the policy to use for this workflow- Returns:
- module configuration instance
-
recoverableExceptionPolicy
Returns the policy that decides whether an exception escaping the workflow body pauses the workflow or fails it.- Returns:
- the configured recoverable exception policy
-
registerWorkflowStatusChangeListener
public WorkflowCustomization registerWorkflowStatusChangeListener(WorkflowStatus workflowStatus, WorkflowStatusChangeListener workflowStatusChangeListener) Registers a workflow status change listener for given status.- Parameters:
workflowStatus- workflow status to register for.workflowStatusChangeListener- workflow status change listener to register.- Returns:
- module configuration instance.
-
unregisterWorkflowStatusChangeListener
public WorkflowCustomization unregisterWorkflowStatusChangeListener(WorkflowStatus workflowStatus, WorkflowStatusChangeListener workflowStatusChangeListener) Un-Registers a workflow status change listener for the given status.- Parameters:
workflowStatus- workflow status to register for.workflowStatusChangeListener- workflow status change listener to register.- Returns:
- module configuration instance.
-