Notifications

2 views

Description

Source field is empty on "notify_message" table for a custom workflow which uses "send SMS" workflow activity.

Cause

In the Send SMS API, we basically use "isValidRecord()" check to set the source on the notify_message record. 

If a workflow is triggered based on Conditions defined and 'If condition matches' as 'Run the workflow always',
current.isValidRecord() is returning false.

 

Resolution

As Workflow engine runs before the insert/update operations, the current.isValidRecord() is returned false as the record is not created by then.

As a workaround, We can make the workflow to run after the business rules on the table have run. For this, there is a field called 'Run after bus. rules run' field on the "Workflow Version" table (You might need to configure form layout to display this field). If this field is set to true for the "custom" workflow, then the workflow would run after all the BEFORE and AFTER business rules on the table are run. In this case "isValidRecord()" is true which will populate the source field.

Article Information

Last Updated:2019-11-24 08:49:05
Published:2019-11-24