made changes to pass down the taskToDomain map to child workflow in case of events #250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to pass down taskToDomain map from parent workflow to child workflow in case EVENTS similar to what is already done for SUB_WORKFLOWS
Pull Request type
NOTE: Please remember to run
./gradlew spotlessApply
to fix any format violations.Changes in this PR
Describe the new behavior from this PR, and why it's needed
Whenever an event is fired to trigger a workflow, the taskToDomain map of the parent workflow is not passed as a part of the event payload which leads to triggered child workflow not run in isolation. The only way to run the child workflow in isolation is not hard code the taskToDomain map in event handler definition.
This PR introduce then change where taskToDomain map is passed as part of event payload and if event handler definition does not have the taskToDomain map then the parent taskToDomain map is applied to child workflow. Similar change is already in place with subworkflows
Payload taskToDomain will be overwritten by the taskToDomain map coded as part of event handler definition.
Alternatives considered
Describe alternative implementation you have considered