Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Code Block
Event eventToBeRaised = Event.getEventFor(<EVENT_ID>); 
HashMap eventData = new HashMap(); 
EventDispatcher.getInstance().raiseEvent(eventToBeRaised , eventData);