StackStorm / StackStorm/orquesta

How to use notify with orquesta workflow and jinja expression support?

Open
#138 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
111
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Issue: Not able to notify in slack channel with workflow output/stdout. How to use workflow context and variable in notify parameter, without writing for each of the task in the workflow

Workflow-meta.yaml

---
description: A Nessus scanner reporter validator workflow
enabled: true
runner_type: orquesta
entry_point: workflows/nessus_report_validation_workflow.yaml
name: nessus_report_validation_workflow
pack: st2pack_poc
notify:
  on-complete:
    routes:
      - slack
    message: "Action has finished"
  on-success:
    routes:
      - slack
    message: "Succeeded: {{action_results.stdout}}"
  on-failure:
    routes:
      - slack
    message: |
     Yikes!! It failed. {{ stdout }} {{ result().stdout }} <% ctx() %> <% result().issue_key %>  <% stdout %>!!
parameters:
...

Slack channel output:

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Workflow-meta.yaml and workflows/nessus_report_validation_workflow.yaml, then trace how the notify messages render expressions for the Slack route. Reproduce the workflow and compare action_results, stdout, result(), and ctx() in the notification output; done requires a documented or tested way to expose the workflow result in on-success and on-failure messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.