Package io.iworkflow.core
Class WorkflowStateOptions
java.lang.Object
io.iworkflow.core.WorkflowStateOptions
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Class<? extends WorkflowState>
int
hashCode()
setDataAttributesLoadingPolicy
(PersistenceLoadingPolicy dataAttributesLoadingPolicy) setExecuteApiDataAttributesLoadingPolicy
(PersistenceLoadingPolicy executeApiDataAttributesLoadingPolicy) setExecuteApiRetryPolicy
(RetryPolicy executeApiRetryPolicy) setExecuteApiSearchAttributesLoadingPolicy
(PersistenceLoadingPolicy executeApiSearchAttributesLoadingPolicy) setExecuteApiTimeoutSeconds
(Integer executeApiTimeoutSeconds) By default, workflow would fail after waitUntil API retry exhausted.setProceedToStateWhenExecuteRetryExhausted
(Class<? extends WorkflowState> proceedToStateWhenExecuteRetryExhausted) By default, workflow would fail after execute API retry exhausted.setProceedToStateWhenExecuteRetryExhausted
(Class<? extends WorkflowState> proceedToStateWhenExecuteRetryExhausted, WorkflowStateOptions stateOptionsOverride) By default, workflow would fail after execute API retry exhausted.setSearchAttributesLoadingPolicy
(PersistenceLoadingPolicy searchAttributesLoadingPolicy) setWaitUntilApiDataAttributesLoadingPolicy
(PersistenceLoadingPolicy waitUntilApiDataAttributesLoadingPolicy) setWaitUntilApiRetryPolicy
(RetryPolicy waitUntilApiRetryPolicy) setWaitUntilApiSearchAttributesLoadingPolicy
(PersistenceLoadingPolicy waitUntilApiSearchAttributesLoadingPolicy) setWaitUntilApiTimeoutSeconds
(Integer waitUntilApiTimeoutSeconds) toString()
-
Constructor Details
-
WorkflowStateOptions
public WorkflowStateOptions()
-
-
Method Details
-
getSearchAttributesLoadingPolicy
-
setSearchAttributesLoadingPolicy
public WorkflowStateOptions setSearchAttributesLoadingPolicy(PersistenceLoadingPolicy searchAttributesLoadingPolicy) -
getWaitUntilApiSearchAttributesLoadingPolicy
-
setWaitUntilApiSearchAttributesLoadingPolicy
public WorkflowStateOptions setWaitUntilApiSearchAttributesLoadingPolicy(PersistenceLoadingPolicy waitUntilApiSearchAttributesLoadingPolicy) -
getExecuteApiSearchAttributesLoadingPolicy
-
setExecuteApiSearchAttributesLoadingPolicy
public WorkflowStateOptions setExecuteApiSearchAttributesLoadingPolicy(PersistenceLoadingPolicy executeApiSearchAttributesLoadingPolicy) -
getDataAttributesLoadingPolicy
-
setDataAttributesLoadingPolicy
public WorkflowStateOptions setDataAttributesLoadingPolicy(PersistenceLoadingPolicy dataAttributesLoadingPolicy) -
getWaitUntilApiDataAttributesLoadingPolicy
-
setWaitUntilApiDataAttributesLoadingPolicy
public WorkflowStateOptions setWaitUntilApiDataAttributesLoadingPolicy(PersistenceLoadingPolicy waitUntilApiDataAttributesLoadingPolicy) -
getExecuteApiDataAttributesLoadingPolicy
-
setExecuteApiDataAttributesLoadingPolicy
public WorkflowStateOptions setExecuteApiDataAttributesLoadingPolicy(PersistenceLoadingPolicy executeApiDataAttributesLoadingPolicy) -
getWaitUntilApiTimeoutSeconds
-
setWaitUntilApiTimeoutSeconds
-
getExecuteApiTimeoutSeconds
-
setExecuteApiTimeoutSeconds
-
getWaitUntilApiRetryPolicy
-
setWaitUntilApiRetryPolicy
-
getExecuteApiRetryPolicy
-
setExecuteApiRetryPolicy
-
getProceedToExecuteWhenWaitUntilRetryExhausted
-
setProceedToExecuteWhenWaitUntilRetryExhausted
By default, workflow would fail after waitUntil API retry exhausted. This policy is to allow proceeding to the execute API after waitUntil API exhausted all retries. This is useful for some advanced use cases like SAGA pattern. RetryPolicy is required to be set with maximumAttempts or maximumAttemptsDurationSeconds for waitUntil API.
NOTE: execute API will use commandResults to check whether the waitUntil has succeeded or not.
See more in wiki- Parameters:
proceed
- true to proceed to the execute API after waitUntil API exhausted all retries; false to fail.- Returns:
- this
-
getProceedToStateWhenExecuteRetryExhausted
-
getProceedToStateWhenExecuteRetryExhaustedStateOptions
-
setProceedToStateWhenExecuteRetryExhausted
public WorkflowStateOptions setProceedToStateWhenExecuteRetryExhausted(Class<? extends WorkflowState> proceedToStateWhenExecuteRetryExhausted) By default, workflow would fail after execute API retry exhausted. Set the state to proceed to the specified state after the execute API exhausted all retries This is useful for some advanced use cases like SAGA pattern. RetryPolicy is required to be set with maximumAttempts or maximumAttemptsDurationSeconds for execute API.
Note that the failure handling state will take the same input as the failed from state.- Parameters:
proceedToStateWhenExecuteRetryExhausted
- the state to proceed to after the execute API exhausted all retries- Returns:
- this
-
setProceedToStateWhenExecuteRetryExhausted
public WorkflowStateOptions setProceedToStateWhenExecuteRetryExhausted(Class<? extends WorkflowState> proceedToStateWhenExecuteRetryExhausted, WorkflowStateOptions stateOptionsOverride) By default, workflow would fail after execute API retry exhausted. Set the state to proceed to the specified state after the execute API exhausted all retries This is useful for some advanced use cases like SAGA pattern. RetryPolicy is required to be set with maximumAttempts or maximumAttemptsDurationSeconds for execute API.
Note that the failure handling state will take the same input as the failed from state.- Parameters:
proceedToStateWhenExecuteRetryExhausted
- the state to proceed to after the execute API exhausted all retriesstateOptionsOverride
- the state options override to use when proceeding to the configured state after execute API retry is exhausted- Returns:
- this
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-