Class WorkflowCustomization

java.lang.Object
io.axoniq.framework.workflow.configuration.WorkflowCustomization

public class WorkflowCustomization extends Object
Encapsulates workflow module configuration.
Since:
5.4.0
Author:
Simon Zambrovski
  • Field Details

  • 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

      public WorkflowCustomization workflowVersion(String workflowVersion)
      Sets the workflow definition version (semver string, e.g. "0.0.2"). Optional — defaults to Version.DEFAULT_VERSION ("0.0.1").
      Parameters:
      workflowVersion - the version to use for this workflow definition.
      Returns:
      module configuration instance.
    • workflowVersion

      public String workflowVersion()
      Returns:
      the configured workflow definition version.
    • eventNameCustomizer

      public WorkflowCustomization eventNameCustomizer(EventNameCustomizer eventNameCustomizer)
      Sets event name customizer.
      Parameters:
      eventNameCustomizer - event name customizer to set.
      Returns:
      module configuration instance.
    • workflowIdProvider

      public WorkflowCustomization workflowIdProvider(WorkflowIdProvider 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 the RecoverableWorkflowExceptionPolicy component, or RecoverableWorkflowExceptionPolicy.DEFAULT when none is registered.
      Parameters:
      recoverableExceptionPolicy - the policy to use for this workflow
      Returns:
      module configuration instance
    • recoverableExceptionPolicy

      public RecoverableWorkflowExceptionPolicy 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.