Orquesta - Is there way to publish Inquiries ID(Execution ID) and use it in another action?


I use core.ask action in Orquesta and
I want to send mail with Inquiries ID when inquiry is not approved.

<% ctx(st2).action_execution_id %> is overall workflow execution id
I am trying to get task(get_approval) execution_id.

    action: core.ask
        type: object
            type: boolean
            description: "approve?"
            required: True
      - when: <% succeeded() and task("get_approval").result.response.approved %>
        do: approved
      - when: <% succeeded() and task("get_approval").result.response.approved=false %>
          - msg1: <% ctx(st2).action_execution_id %>
        do: not_approved
      - when: <% failed() %>
        do: stop

    action: core.sendmail body="not approved id=*****************"

Thank you


I’m not sure this is supported yet in Orquesta.

@m4dcoder Can I get you to confirm one way or the other?

(Lindsay Hill) #3

You might be able to do something with rules - see Inquiries — StackStorm 2.10.2 documentation

It might be worth checking if a trigger instance is created when an inquiry is denied.


@blag Thanks for your reply.
Although this problem is resolved by using rules, I think it would be better to be able to obtain the execution ID in the workflow.
Because if a lot of kind of inquiery are requested, I am concerned that condition becomes complicated to create criterias in rules.

Thanks so much for your time.


@lhill Thanks for your reply.

I solve it just now by using rules.

I watch “#st2 trigger-instance list” and respond the inquiry, I found core.st2.generic.actiontrigger is created.

Then I create rule and it work well.

    name: "rule_when_inquiry_not_approved"
    pack: "test"
    description: "action when inquiry is not approved"
    enabled: true

        type: "core.st2.generic.actiontrigger"

            pattern: "core.ask"
            type: "equals"
            pattern: false
            type: "equals"

        ref: "core.echo"
            message: "Not approved. {{trigger.execution_id}}"

Thank you so much.

(W Chan) #6

I’m glad you found a workaround. Currently, the inquiries ID is not accessible from within the workflow context. I do think this is an excellent idea and something we should include in a future release.