Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

Disclaimer

Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/

Overview

This Universal Task sends job status notifications to a Slack channel. It also enables users to send interactive messages in Slack for Universal Controller manual task approvals.

  • Notifies users of job failure, late start/run, and other important events via a Slack channel.

  • Approval in Slack for Manual task type – users simply click on an approval button in Slack message to run manual tasks to success in Universal Controller, triggering continuation of workflow execution.

  • Quick reaction time on job failures.

  • Manual task interruptions in workflows can be handled by concerned applications/business team, while workflows in Universal Controller can be resumed simply by responding to the approval message in Slack. 

Software Requirements

This integration requires an Universal Agent and a Python runtime to execute the Universal Task against a Slack account with Incoming webbook enabled for a job notification. Also, in order to cater the approval functionality from slack for an manual task type in Universal Controller, you will need to have an Interactivity enabled in slack with the request URL which will be used to send the http POST request for interactive messages by slack.

Software Requirements for Universal Template and Universal Task

This integration requires an Universal Agent and a Python runtime to execute the Universal Task against .

  • Requires Python 3.6 or higher. Tested with the Universal Agent bundled Python distribution.

  • Python modules required:

    • requests

Software Requirements for Universal Agent

Either:

  • Universal Agent for Windows x64 Version 6.9.0.0 and later with python options installed

  • Universal Agent for Linux Version 6.9.0.0 and later with python options installed

Software Requirements for Universal Controller

  • Universal Controller Version 6.9.0.0 and later

Software Requirements for the Application to be Scheduled

The task can be used against any of your slack account or workspace that is of either free or standard or plus or enterprise grid

Technical Considerations

The request URL provided in Slack could be an end point either in AWS lambda or Azure Function, GCP function, or your custom API end point to handle the interactive message from slack and advise universal controller on approval or rejection of the manual task.

Below is the sample python code that could be invoked for the slack interactive message handling

Steps to Activate Incoming Webbooks:

  • Go to your Browser and provide the URL: https://api.slack.com/apps/.

  • Select or create an application that would be appropriate for sending Universal Controller notifications.

  • Click on Incoming webhooks on the left menu and activate Incoming webhooks as below.

The URL generated here will be used in the Universal Task for posting message to slack platform


Slack Notification Key Features

Feature

Description

Job Notification

This feature can be used to send any job notification to a slack channel; for example, a job failure, Job long running, or Job held.

Approval Notification

Typically, Manual task types in universal controller are used, when there is a user manual intervention needed in a workflow task type and the Manual Task is completed successfully in universal controller by clicking on to the manual task command “Set Completed” traditionally .

Now this task for slack can notify slack channel when the manual task reaches status: “Action Required” and User in slack can simply click on the approve/Reject Button in the slack interactive message that was sent by universal controller and then the manual task in the workflow can either go to success if approved or wait in the same status if rejected


Import Slack Notification Downloadable Universal Template

To use this downloadable Universal Template, you first must perform the following steps:

  1. This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
  2. To import the Universal Template into your Controller, follow the instructions here.
  3. When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.

Configure Slack Notification Universal Task

For the new Universal Task type, create a new task, and enter the task-specific details that were created in the Universal Template.

Field Descriptions for Slack Notification Universal Task

Field

Description

Slack Function

Approval Notification  (ideal to associate with manual tasks)

Job Name

Name of the job :${ops_task_name}

Job Status

Status of the job:${ops_status}

Slack Incoming Webhook

Incoming webhook URL for your slack account

Execution User

Execution User of the Manual Task:${ops_execution_user}

Job type

Task type of task instance: ${ops_task_type}

Examples for Slack Notification Universal Tasks

Send a Job Status Notification to slack

Calling a slack Job Status Notification through Action -->System Operations and Launch Task

(Also this could be made generic for a group of jobs or all jobs by calling the slack notification job from Task monitor job.)


Send a Approval Notification to slack

Approval Message in Slack


Document References

This document references the following documents:

Name

Description

Universal Templates

User documentation for creating Universal Templates in the Universal Controller user interface.

Universal Tasks

User documentation for creating Universal Tasks in the Universal Controller user interface.



  • No labels