Add a new field called Version to indicate the version of the current orchestration instance. Version will be set when the orchestration instance is created.
TaskOrchestrationExecutor
Get the instance version from version field on the ExecutionStartedEvent and save it to TaskOrchestrationContext.Version so that it can be used in the orchestration code.
Code updates:
OrchestrationContext
Add a new field called Version to indicate the version of the current orchestration instance. Version will be set when the orchestration instance is created.
TaskOrchestrationExecutor
Get the instance version from version field on the ExecutionStartedEvent and save it to TaskOrchestrationContext.Version so that it can be used in the orchestration code.