how to insert a custom table in a email notification on a workflow step

Hi All.

I have following requirement: when the workflow is passing over specific step, an email notification is needed. The email must containt the whole content of a custom table definied in the request managed by the workflow.

My approach: I want to use the OOTB notification capabilities available for workflows but I'm not aware how to include in the email the table component content. I'm thinking to use a custom field, rich text with no limits, where I store by sql code the html format of the table and I will include such field in the email body.

It is available a more smart approach ? Any guideline for such requirement ?

Best Regards, Silvio

  • Verified Answer

    +1  

    Hi Silvio,

    I don't think this approach will work:

    - You cannot easily set a long CLOB value in a text area from SQL Rules/code - the logic to persist the CLOB is only run when the request is saved in the Web UI.

    - For the same reason, since I assume that Notification token resolution happens in the PL/SQL of DM Notification code (which happens directly in BD), it will NOT retrieve the proper "long" Text Area value to insert it in the notification - it will read directly from DB column and will likely insert the CLOB ID instead of the CLOB Text value.

    The only way to "easily" implement your requirement would be to do as you plan but use standard Text Area field - which limits you to the 4000 max chars. 

    If you absolutely need to include very large amounts of data in notifications, the only way will be to run custom Java code that will directly send the notification with JavaMail API - but that'll require a lot of custom development.