v1.6.0 Release
💥Breaking changes: WorkflowStateOptions
--> StateOptions
The iwfidl.WorkflowStateOptions
is an internal model of the API protocol of SDKs and iWF server.
It was a implementation leakage to use it as the return value of GetStateOptions()
method of WorkflowState
interface.
Because of the leakage
- It's confusing that user can set
SkipWaitUntil
boolean - Use can set
ExecuteApiFailurePolicy
and raw state options - It makes things tricky to support
ExecuteApiFailurePolicy
properly
Now we have a dedicated model iwf.StateOptions
in SDK to separate from the API model.
How to migrate
It should be very simple. The breaking changes does't involve anything on server side.
Mostly, just change iwfidl.WorkflowStateOptions
to iwf.StateOptions
.
See how we have changed in the integration tests and samples.
Because iwf.StateOptions
share almost the same fields as iwfidl.WorkflowStateOptions
, except for SkipWaitUntil
and fields for ExecuteApiFailureProceed*
.
To make it clear to use the failure recovery/proceed feature, the SetProceedOnExecuteFailure
is now removed.
Use ExecuteApiFailureProceedState
field instead in the StateOptions
:
options := &iwf.StateOptions{
...
ExecuteApiFailureProceedState: &youRecoveryState{},
}
You should not need to set the state options for this recovery state, because the SDK will use the one returned from the state implementation.
What's Changed
- Refactor StateOptions and execute failure policy by @longquanzheng in #74
Full Changelog: v1.5.0...v1.6.0