Class WebhookSlackFunctions
java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.SlackFunctions
flexagon.fd.services.groovy.functions.WebhookSlackFunctions
-
Field Summary
Fields inherited from class flexagon.fd.services.groovy.functions.SlackFunctions
APPROVE_STRING, REJECT_STRINGFields inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
mFLOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmakePipelineStageCompletedMessage(Object pPayload) Creates a PipelineStageCompleted Event message that can be posted via postMessage.makeSnapshotCompleteMessage(Object pPayload) Creates a SnapshotCompleted Event message that can be posted via postMessage.makeTaskCreatedMessage(Object pPayload, Boolean pAllowInteraction) Creates a TaskCreated Event message that can be posted via postMessage.makeWorkflowCompletedMessage(Object pPayload, Boolean pIncludeErrorData) Creates a WorkflowCompleted Event message that can be posted via postMessage.voidupdateTask(Object pSlackPayload, Boolean pUpdateInPlace) Approves or rejects a task from an incoming Slack webhook payload.Methods inherited from class flexagon.fd.services.groovy.functions.SlackFunctions
cleanup, getGroovyKey, getUserFromSlackId, postAttachment, postAttachment, postMessage, postMessage, postSimpleMessageMethods inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
captureSecureValues, captureSecureValuesForLogFunction, decryptIntegrationInstance, doSimpleGet, findIntegrationInstanceByCode, getBinding, getLogFunctions, getServerBaseUrl, setBinding
-
Constructor Details
-
WebhookSlackFunctions
-
-
Method Details
-
updateTask
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
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 usedpAllowInteraction- 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 usedpIncludeErrorData- 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
-