Various questions about workflows

Hello.

I am currently evaluating StackStorm and quite like it so far, we are comparing it against other more generic process workflow engines like Camunda for self-remediation on a network environment,

I have been playing with workflows but I got a few questions

On this kind of workflow, how could I for example on, make the loop only run the action when a specific condition is matched (for example item().status != "closed"

version: 1.0

description: Close all the Opsgenie alerts

tasks:
  list_alerts:
    action: opsgenie.list_alerts
    next:
      - when: <% succeeded() %>
        do: close_alerts
        publish:
          - alerts: <% result().result.data %>

  close_alerts:
    with:
      items: <% ctx(alerts) %>
      concurrency: 3
    action: opsgenie.close_alert alert_id=<% item().id %>

Also there is a interesting feature on Camunda that I could not find here : https://docs.camunda.org/manual/7.12/reference/bpmn20/events/message-events/#message-intermediate-catching-event

It would allow for a workflow to pause somewhere in a step and wait for an external event (typically a webhook) to trigger to continue, I could not find a way to do the same here ?

Thanks.

1 Like

I think StackStorm Inquiries is what you’re looking for. Check out Inquiries — StackStorm 3.1.0 documentation

1 Like

On checkpoint/pause, you can take a look at inquiries at Inquiries — StackStorm 3.1.0 documentation and see if that solve your use case. You can call the inquiry API or CLI to resume the workflow if it needs to be automated.

1 Like

On making with-items only run the action when a specific condition is matched (item().status != “closed”), you can use a YAQL or Jinja expression to filter the items based on the status in your use case before passing that into with-items.

1 Like

Can you give me an example ? I though YaQL and Jinja were only in Mistral.

1 Like

@kedare start here:

https://docs.stackstorm.com/orquesta/expressions.html