Class WebhookSlackFunctions


public class WebhookSlackFunctions extends SlackFunctions
  • Constructor Details

    • WebhookSlackFunctions

      public WebhookSlackFunctions(LogFunctions pFLOG)
  • Method Details

    • updateTask

      public void updateTask(Object pSlackPayload, Boolean pUpdateInPlace) throws FlexCheckedException
      Approves or rejects a task from an incoming Slack webhook payload. This method expects the inbound webhook payload resulting from the makeTaskCreatedMessage formatted message. Works with Approval tasks only.
      Parameters:
      pSlackPayload - Slack webhook payload resulting from makeTaskCreatedMessage post message.
      pUpdateInPlace - Should the original message be updated with this response.
      Throws:
      FlexCheckedException
      Since:
      5.4
    • makeSnapshotCompleteMessage

      public FlexSlackMessage makeSnapshotCompleteMessage(Object pPayload) throws FlexCheckedException
      Creates a SnapshotCompleted Event message that can be posted via postMessage. This function will infer the event details and format the Slack message accordingly
      Parameters:
      pPayload - Payload for the Workflow Completed Event. The EVENT.payload key should be used
      Throws:
      FlexCheckedException
      Since:
      5.4
    • makePipelineStageCompletedMessage

      public FlexSlackMessage makePipelineStageCompletedMessage(Object pPayload) throws FlexCheckedException
      Creates a PipelineStageCompleted Event message that can be posted via postMessage. This function will infer the event details and format the Slack message accordingly
      Parameters:
      pPayload - Payload for the Pipeline Stage Completed Event. The EVENT.payload key should be used
      Throws:
      FlexCheckedException
      Since:
      5.4
    • makeTaskCreatedMessage

      public FlexSlackMessage makeTaskCreatedMessage(Object pPayload, Boolean pAllowInteraction) throws FlexCheckedException
      Creates a TaskCreated Event message that can be posted via postMessage. This function will infer the event details and format the Slack message accordingly
      Parameters:
      pPayload - Payload for the Task Created Event. The EVENT.payload key should be used
      pAllowInteraction - If true, the message will contain interactive buttons to approve/reject the task via inbound webhooks. See the official Events documentation for more information.
      Throws:
      FlexCheckedException
      Since:
      5.4
    • makeWorkflowCompletedMessage

      public FlexSlackMessage makeWorkflowCompletedMessage(Object pPayload, Boolean pIncludeErrorData) throws FlexCheckedException
      Creates a WorkflowCompleted Event message that can be posted via postMessage. This function will infer the event details and format the Slack message accordingly
      Parameters:
      pPayload - Payload for the Workflow Completed Event. The EVENT.payload key should be used
      pIncludeErrorData - If the workflow is a failure, should error data be included in the message. Setting this to false can improve performance of messaging.
      Returns:
      A FlexSlackMessage which can be posted via postMessage
      Throws:
      FlexCheckedException
      Since:
      5.4