Releases: indeedeng/iwf-golang-sdk
v1.7.0
What's Changed
- add start delay by @duoertai in #78
- 💥 Breaking changes (requires new server v1.10.0)
- IWF-158: Updating iwf-idl submodule to fix typo IdReusePolicy of ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY by @stevo89519 in #80
New Contributors
- @stevo89519 made their first contribution in #80
Full Changelog: v1.6.0...v1.7.0
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
v1.5.0 Release
What's Changed
- Updating codegen to support UseMemoForDataAttributes by @edmondop in #67
- Add execute API failure policy support by @nakanaori in #71
- [UNIT TEST] Update mockgen and create client mock by @afasari in #72
New Contributors
- @edmondop made their first contribution in #67
- @nakanaori made their first contribution in #71
- @afasari made their first contribution in #72
Full Changelog: v1.4.2...v1.5.0
v1.4.2 Release
What's Changed
- Fix iwftest.MockCommunication and add example by @longquanzheng in #63
Full Changelog: v1.4.1...v1.4.2
v1.4.1 Release
What's Changed
- Add iwf.WorkflowStateDefaultsNoWaitUntil by @longquanzheng in #62
Full Changelog: v1.4.0...v1.4.1
v1.4.0 Release
Feature & Improvement:
- New stop workflow types: terminate and fail
- Start workflow without any starting state or any state
- 💥 Breaking changes for renaming
- state APIs: start-->waitUntil, decide --> execute
- Workflow --> ObjectWorkflow
- interStateChannel --> internalChannel
- dataObject --> dataAttribute
- StateLocal --> StateExecutionLocal
- WaitUntil API becomes optional by setting skipWaitUntil
- Workflow RPC: request response manner
- DeadEnd decision will just only stop the thread
Note that the new behaviors require 1.5+ version of iWF server to support.
What's Changed
- add support for proceeding on state start api failure by @duoertai in #52
- Upgrade to use SDK IDL for V2 major changes by @longquanzheng in #54
- Allow skipWaitUntil, add more stop types, and stop reason by @longquanzheng in #55
- Add workflow RPC by @longquanzheng in #57
- Add CI integ test by @longquanzheng in #46
- Fix client common to be public by @longquanzheng in #58
- Allow no state or not start state by @longquanzheng in #59
- Add dead end decision by @longquanzheng in #60
New Contributors
v1.3.1 Release
What's Changed
- Fix dataObject/search attributes bugs of overriding each others by @longquanzheng in #45
Full Changelog: v1.3.0...v1.3.1
v1.3.0 Release
Feature & Improvement:
- Support failing workflow with results
- Improve workflow uncompleted error return(canceled, failed, timeout, terminated)
Note that the new behaviors require 1.3+ version of iWF server to support.
What's Changed
- Improve and add more handling workflow uncompleted by @longquanzheng in #40
Full Changelog: v1.2.1...v1.3.0
v1.2.1 Release
Improvements
- Add unit test API supports for mocking
- Fix some internal APIs that not exported which caused not testable/mockable
What's Changed
- Add unit test mocking APIs by @longquanzheng in #38
- Fix iwftest pkg by exposing private interfaces in persistence and communications by @longquanzheng in #39
Full Changelog: v1.2.0...v1.2.1
v1.2.0 Release
💥 Breaking changes in SDK API:
- Error handling in workflowState implementation
- All the APIs including Object, Persistence, Communication now all panic on error instead of returning.
- Mostly you don't need to. But the error can still be accessible if really need to do some customized handling:
- capturing panic yourself
- get the error from WorkerService API, because WorkerService will use captureStateExecutionError to capture the error
- When upgrading, simply remove the boilerplate code of returning error. See example in samples PR.
- default WorkflowType is now changed to eliminate the leading
*
character if the struct is from a pointer- If you have old workflows using this, you have to use
SetLegacyUseStarPrefixInWorkflowTypeForPointerStruct
API to tell the SDK to keep compatibilities for the old workflows:
- If you have old workflows using this, you have to use
SetLegacyUseStarPrefixInWorkflowTypeForPointerStruct(oldWf1, OldWf2, OldWf3)
- GetDefaultWorkflowType --> GetFinalWorkflowType to be more accurate.
API improvements
- Workflow definition provides new API and deprecated the old ones. The old ones are marked as deprecated. See example in samples PR for how to upgrade.
- NewStartingState --> StartStateDef
- NewNonStartingState --> NonStartStateDef
- NewDataObjectDef --> DataObjectDef
- NewSearchAttributeDef --> SearchAttributeDef
- NewSignalChannelDef --> SignalChannelDef
- NewInterstateChannelDef --> InterstateChannelDef
- Workflow now provides default struct to save the boilerplate code of returning default values.See example in samples PR.
- DefaultWorkflowType
- EmptyPersistenceSchema
- EmptyCommunicationSchema
- WorkflowState now provides default struct to save the boilerplate code of returning default value.See example in samples PR.
- DefaultStateIdAndOptions
- DefaultStateId
- DefaultStateOptions
What's Changed
- Add test for init search attributes and fix error message by @longquanzheng in #31
- Improve APIs to save boilerplate code by @longquanzheng in #35
- Fix default struct for workflow definition by @longquanzheng in #36
Full Changelog: v1.1.0...v1.2.0