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