Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleTaskCreated Script
Code Block
languagegroovy
//Carry out any custom action you wish for this event. Check out the snippets for reference or ideas.
def listenerName = "TaskCreated";
LOG.info("Running listener: ${listenerName}");

def channel = 'testing';

//Slack account code defined in Topology->Integration->Messaging
def account = 'SLACK';

//Create and post a FlexDeploy Slack Message object with interactive buttons to approve/reject
def message = SLACK.makeTaskCreatedMessage(EVENT.payload,true);
def tsId = SLACK.postMessage(account,channel,message);

LOG.setMessage('"Posted task ${EVENT.payload.taskId} to Slack'");
Expand
titleTaskCreated Filter
Code Block
languagegroovy
return EVENT.payload.taskType == "APPROVAL";

...