[ Generic Notification system using the UWL ]
The purpose of this guide is to show how you can create a generic notification system for all users that can be implemented independently as well as being integrated into new and existing solutions. The solution has an added bonus as it does not incur a cost to the business.
First we must create the notification workflow.
The Split Text task will take as an input the text that you require to be in the notification and split it across (in this case) 3 lines of 72 characters in length.
This is required as workflow work items within the UWL have a limitation of 72 character line lengths.
Details are below:
Below are the details of the “Split_text” method that is used.
Now we will create the notification with the text we previously split.
It should be noted that the subject of the notification is also dynamic and linked to variable &EMAILSUBJECT&
Here are the bindings showing the split text being passed:
We also need to clean up the notifications so that they do not clutter the UWL. In this example we have set an expiry of 1 week from notification creation. This can be changed to suit customer’s needs.
Now you are probably asking, now that I have built the workflow how do I use it?
Below I will show an example of how to use the generic workflow notification within another workflow.
The below workflow extract shows 3 steps prior to calling the generic notification workflow. I will now go through these 3 steps and explain each one.
The update notification message step will update the notification subject. In this case we are setting the subject to “Approved”.
The Add Data to Text step allows us to add more dynamic data to the notification subject line.
Reads in begin date, end date and update operation.
Call the “ADD_DATA_TO_TEXT” method.
The resultant subject line would be similar to the below:
New Leave 25.01.2012 to 26.01.2012 Approved
The Read Text Step allows you to read in standard text which will allow you to change notification content without making any changes to the workflow which is ideal for a generic notification system.
Pass in the standard text name (this can be a default variable in the workflow container)
The final step is to call the generic notification workflow.
All that has to be passed in is:
- Body text