Configuring messaging service trigger for subscribing messages
You can use the Messaging Service Trigger in workflows to subscribe to messages, eliminating the need to configure Messaging separately. When a message is published to the specified destination, the workflow is automatically triggered. It is the same as linking a Messaging subscriber to a workflow under Default invocation. This setup creates and attaches a Messaging Service Trigger to the workflow automatically.
Before you begin
Procedure
Results
Subscribers that are created either from workflows or directly from Messaging are all listed in the Subscribers list table on the page. If you modify or add more routing rules to a subscriber from the Subscribers details page in Messaging, the corresponding Messaging Service Trigger is automatically updated with these changes. The newly added routing rules are listed under Filters for a Messaging Service Trigger. Similarly, if you modify any values or add more filters to a Messaging Service Trigger, then those details are automatically updated and listed in the Subscriber details page. Since only the filters that trigger this workflow are listed here, the message evaluation might not always follow the order that you see here. To know the actual order, check the Routing rules section in the Subscriber details page.
For instance, a subscriber S1 associated to a workflow. You added filter F1 from workflow, then add routing rule R1 from the Subscriber details page for S1. Upon viewing the Routing rules section, F1 is followed by R1 as the rules. Later, you added another filter, F2. Now, if you look at the Routing rules section, you see that there are three rules that are listed: F1, R1, and F2. But, in workflows under Add Filters, the order is shown as F1 and F2. Subscribers evaluate the routing rules as listed under the Routing rules section. Hence, the message evaluation might not always follow the order in which the rules are listed for a workflow.
- If the Messaging Service Trigger is used in a workflow, the maximum runtime limit is 6 minutes. Messaging Trigger workflows and any sync workflows time out if execution exceeds 6 minutes. In such cases, options that are specified under the Transient Error Handling in msg_configuring_error_handling_for_subscribers.html#task_yr4_2wh_jfc setting take effect, and the workflow execution can be retried depending on the maximum retry count value. Therefore, you need to add a Return Data on Sync Webhook action in your workflow immediately after the Start action if the workflow is expected to take more than 6 minutes to run. However, if you do so, then error handling options cannot be used.
- This limit does not apply to the flow services.