Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made changes to pass down the taskToDomain map to child workflow in case of events #250

Merged

Conversation

junaidHussain-clari
Copy link
Contributor

@junaidHussain-clari junaidHussain-clari commented Aug 27, 2024

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

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • WHOSUSING.md
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

  1. taskToDomain map is sent as a part of the event payload.
  2. If no taskToDomain is mentioned in the event handler definition then a new workflow will be triggered with the parent tasktoDomain map.
  3. Payload taskToDomain will be overwritten by the taskToDomain map coded as part of the event handler definition

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

@junaidHussain-clari junaidHussain-clari changed the title made changes to pass down the taskToDomain map to child workflow in c… made changes to pass down the taskToDomain map to child workflow in case of events Aug 27, 2024
@v1r3n v1r3n merged commit 9fef8fd into conductor-oss:main Sep 3, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants