Skip to content

v1.2.0 Release

Compare
Choose a tag to compare
@longquanzheng longquanzheng released this 24 Jan 03:46
· 21 commits to main since this release
78619ba

💥 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:
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

Full Changelog: v1.1.0...v1.2.0