To configure Alerts for the channel of Inbox
...
, perform the following steps:
- Click Channels drop-down list and select 2001 - Inbox. You will be able to find new set of options like like Insert Key, Template Formatter, Language, Short Message/Subject, Select Header/Footer Template and Detailed Message.
...
- Click the drop-down list of Template Formatter and you can choose any one of the options from FreeMarker or Canvas – Default.
...
- Type the words of your choice in the field of Short Message/Subject. Click icon to choose header or footer template in the field of Select Header/Footer Template. If you don't wish to choose a template for Header and Footer, then you can proceed further. The Insert Key drop-down list comprises of various keys. While entering the text in Detailed Message, make sure that you use Insert Key drop-down list in accordance with the assigning of alerts. For instance, if request approval is involved, then APPROVER_NAME can be used for more significance.
...
- You can even allot multiple Insert Keys, while typing the words of your choice in Detailed Message text field. The following screen shot showcases the usage of a second Insert Key, known as APPROVER_ID.
...
- After typing the words of your choice in the text field of Detailed Message, click Add.
The newly created alert appears on the right side, in the form of channel number; which denotes the channel type, e.g. 2001 denotes Inbox.
SMTP
- To create alerts for SMTP, click Channels drop-down list and select the option of 2002-SMTP.
- Select either Canvas – Default or FreeMarker from Template Formatter drop-down list. Enter the words of your choice in the text fields of Short Message/Subject and Detailed Message. While entering the text in Detailed Message, make sure that you use Insert Key drop-down list in accordance with the assigning of alerts. Once you have completed the proceedings, click Add.
SMS
- To create alerts for SMS, click Channels drop-down list and select the option of 2003-SMS.
- Select either Canvas – Default or FreeMarker from Template Formatter drop-down list. Enter the words of your choice in the text fields of Short Message/Subject and Detailed Message. While entering the text in Detailed Message, make sure that you use Insert Key drop-down list in accordance with the assigning of alerts. After completing the proceedings, click Add.
Push Notifications
- To create alerts for Push Notifications, click Channels drop-down list and select the option of 2004-PUSHNOTIF.
- Select either Canvas – Default or FreeMarker from Template Formatter drop-down list. Enter the words of your choice in the text fields of Short Message/Subject and Detailed Message. While entering the text in Detailed Message, make sure that you use Insert Key drop-down list in accordance with the assigning of alerts. After completing the proceedings, click Add.
The created alerts appear on the right side and the numbers denote the channel types (2001 – INBOX, 2002 – SMTP, 2003 – SMS, 2004 – PUSH NOTIFICATION).
- Click Save to save the created alerts.
The newly created Alert can be viewed in Alerts section under the segment of Handler Configuration. To edit the Alert, click icon, whereas to delete it, click icon.
Custom Handler
To configure Custom Handler, perform the following steps.
- Click icon to configure Custom Handler.
Custom Handler Mapping page appears.
- Click the Handler drop-down list and select 10003-Cache Cleanup Handler.
- For other handlers, click icon, adjacent to the Handler drop-down list.
A new pop-up appears.
The relevant values of the handlers can be found in the EVENT_HANDLER_MASTER_TABLE in Canvas Schema.
- Enter the relevant values in the fields of Handler ID, Handler Class, Handler Description and Priority. For Container ID, click icon to select the form; that has been mapped to a container or enter the apt title of the Container ID. Based on the configuration of values, click the Y checkboxes of Ignore Exception and Is Synchronized? After completing the proceedings, click Create.
- If old values are required for the handler, click the Old Values Required checkbox.
- Click Save to save the changes.
The created Handler can be viewed in Custom Handler section under the segment of Handler Configuration. To edit the Custom Handler, click icon, whereas to delete it, click icon.
Audit
To configure Audit, perform the following steps.
- Click icon to configure Audit.
The Audit page appears.
- The Audit ID is assigned automatically and you can modify it. Only numbers are permitted in the field of Audit ID. Enter the value, com.intellectdesign.canvas.audit.handler.AuditDataFormatter in Audit Formatter text field. Proceed to click icon of Form ID to select a form.
- List of forms appear and you can select the form of your choice. For instance, NEW_PAYEE_FORM.
- Click Form Fields drop-down list.
- Click the form fields, which you wish to select. To perform a search, type the name of the form field in the Type to search field.
- After completing the proceedings, click Save to save the changes.
The newly created Audit can be viewed in Audit section under the segment of Handler Configuration. To edit Audit, click icon, whereas to delete it, click icon.
- In the Event page, click Submit.
A confirmation message, indicating a successful save appears.
- Click Ok.
Editing and Deleting Events
To edit and delete events, perform the following steps in Canvas Studio.
- On the home page of Canvas Studio, click Events on the left navigation pane.
The List of Events page appears.
- To edit an event, perform a right-click on the event and select Edit Event option.
The Event page appears. You can edit the fields which you want to edit, but Event ID remains as a non-editable field.
- To delete an event, perform a right-click on the event and select Delete Event option.
- Click Delete on the bottom right side of the Event Creation page.
A confirmation message appears, indicating a successful deletion.
Raising Events
After an event is configured in Canvas Studio, a simple Java handler is necessary to trigger the event. Let's assume that the event is a login activity, so when the user logs in, the event has to be raised to send an alert and an audit. Once the login event is configured in Canvas Studio, the Java Handler triggers the event, thereby facilitating the means for receiving alerts. The following code snippet is a sample Java Handler to raise an event:
Event eventToBeRaised = Event.getEventFor(<EVENT_ID>); HashMap eventData = new HashMap(); EventDispatcher.getInstance().raiseEvent(eventToBeRaised , eventData);