Configure Notification Delivery Methods from Object Workflow

You can send notifications from an object workflow using the notification dispatcher. Create a Groovy function in the context of an object workflow, where you can define the notification recipients and delivery channels.

You can configure these notifications for multiple business objects, all delivery channels, and multiple recipients.

  • When you configure an object workflow within Application Composer, navigate to Object Functions and create a function.

  • Set the Visibility as Callable by External Systems.

  • Within the body of the function, call a new global method, SendNotificationSimple().

    This Groovy function calls in to the notification framework, and eventually its dispatcher sends the notification.

Here's a sample Groovy script:

try { 
    def recipientPartyId = AssigneeResourceId
    def messageText = 'An SR notification for status change.'
  
    if  (recipientPartyId) {
        // Call to send notification
        adf.util.sendNotificationSimple(adf, messageText, recipientPartyId)
    }  
} catch (e) {
    // Log the failure in groovy logging. Logs can be viewed in 'Runtime Messages'.
    println("Failure to trigger notification from Groovy Script " +   e.getMessage());
}