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

Context variables are being overwritten on join #112

Closed
m4dcoder opened this issue Jan 10, 2019 · 0 comments
Closed

Context variables are being overwritten on join #112

m4dcoder opened this issue Jan 10, 2019 · 0 comments

Comments

@m4dcoder
Copy link
Collaborator

Given the following workflow where task1, task2, and task3 running in parallel and joining on task99

version: 1.0

description: A basic parallel workflow.

input:
  - x: false
  - y: false
  - z: false

output:
  - data:
      x: <% ctx().x %>
      y: <% ctx().y %>
      z: <% ctx().z %>

tasks:
  init:
    action: core.noop
    next:
      - do: task1, task2, task3

  task1:
    action: core.noop
    next:
      - publish: x=true
        do: task99

  task2:
    action: core.noop
    next:
      - publish: y=true
        do: task99

  task3:
    action: core.noop
    next:
      - publish: z=true
        do: task99

  task99:
    join: all
    action: core.noop

The expected output should be the following.

data:
  x: true
  y: true
  z: true

However, the actual output is this.

data:
  x: false
  y: false
  z: true

When executing task99, orquesta takes the final context from task1, task2, and task3 and merge them together to form the initial context for task99. The final context for task1 has x=true but y and z as false. The final context for task2 has y=true but x and z as false. And so forth for task3. When the context is merged sequentially, the final context for task3 overwrites those from task1 and task2 resulting in x and y being false.

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

No branches or pull requests

1 participant