Passing data to tasks in orquestra

Hi! I seem to be doing something wrong in this orquestra workflow but can’t figure out what! I’m publishing a var in the first task, then trying to use it in the second, but the second task sees the var as None:

version: 1.0

description: Updates desktop owner and other metadata in spacewalk

input:

  • username
  • desktop

vars:

  • email: None
  • office: None

tasks:
task1:
action: spacewalk.get_ldap_user_by_username username="<% ctx().username %>"
next:
- when: <% succeeded() %>
publish:
- email: <% result().result.mail[0] %>

task2:
action: spacewalk.get_pingboard_user_by_email email="<% ctx().email %>"
next:
- when: <% succeeded() %>
publish:
- office: <% result().result.custom_fields.f1076050 %>

output:

  • username: <% ctx().username %>
  • email: <% ctx().email %>
  • desktop: <% ctx().desktop %>

BUT I do see the correct value in the output section when the run completes. Any advice? Thanks!!

From task1 you need to transition to task2, otherwise both task1 and task2 will be identified as starting tasks and will execute simultaneously. Please read docs for task transition model on how to transition from one task to the next.

Oh! That’s sooooooooooo much better. Thanks!!