Spinning with action_context in action

Try to check action_context per doc Actions — StackStorm 3.0.1 documentation. I have a mistral workflow with action like below but it will spinning on it forever. Any thought why?

  report:
       action: core.local cmd="echo Action context {{ action_context.parent }}"
       publish:
         context: <% task(report).result.result %>

That syntax is for accessing those values in the action metadata, not in a workflow.

See Mistral + YAQL — StackStorm 3.0.1 documentation for accessing some of that content in a workflow.

Thanks a lot. I like to get details of previous run task with the following code and still spinning with following action:

  report:
    action: core.local cmd="echo Get previous task info {{ task(my-last-task) }}"

Hard to say what you’re trying to do with that small snippet and not the workflow. It seems very unusual to have just {{ task(my-last-task) }}.

Normally you would get a specific result item, e.g. {{ task('task1').result.stdout }}. Note the quotes around the task name.

yep, the quote makes difference here, but do not know why only needed with simple task(‘task-name’). It works for task(task-name).result.result.

thanks

Hi Lindsay,

Can you pls suggest a way in task to get parent workflow information? In my task I need send some workflow statistics data to external integrator, like workflow starts time, etc.

thanks