How to send email through SAIL on load?

Certified Lead Developer

We have a scenario where we are calling a web service on load of SAIL rule. In case error occurs, we display an error message and in saveInto parameter of EXIT button we call our error handling process using a!startprocess. This process contains send email smart service which sends email containing error details to the Support group. However, if the end user doesn't click on EXIT button (i.e. closes the window) then the email will never be sent. We wish to send an email notification on load of SAIL rule when web service returns error. Kindly let us know if there is any way of doing this. Thanks in advance.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    You can write a webapi which will have the code for a!startProcess(), a integration to call the webapi, and the same integration can be called on load() function having a dummy local variable like local!invokeWebApiStartProcee: rule!integrationName(), and this will be called on interface load. You can 1st call the service and then this call can be under a if condition checking the status of 1st service call. Hope this helps. If this helps then please do a thumbs up.
    Cheers...
    Bibhuti.
Reply
  • 0
    Certified Lead Developer
    You can write a webapi which will have the code for a!startProcess(), a integration to call the webapi, and the same integration can be called on load() function having a dummy local variable like local!invokeWebApiStartProcee: rule!integrationName(), and this will be called on interface load. You can 1st call the service and then this call can be under a if condition checking the status of 1st service call. Hope this helps. If this helps then please do a thumbs up.
    Cheers...
    Bibhuti.
Children
No Data