Handling Login Events

It may be necessary for your application to execute certain rules when a new user logs in. For example, your application may collect the statistics of how many users are online or how many users have been using the application.

If you want to handle the login events in your application you need to define a special login notification and attach rules to this notification – see Adding/Editing Rules.

To add the login notification to the business space version:

  1. Right click on the “Notifications” node of the business space version in the Elements Tree to bring up the pop-up menu.
  2. Select the “Add Login Notification” or “Add Login Notification Attempt” command from the pop-up menu (it will be greyed out if the login notification has already been added). A new notification with the pre-defined name LoginNotification or LoginNotificationAttempt will appear in the Elements Tree. The difference between the LoginNotification and LoginNotificationAttempt is that the first is sent when a user successfully logs into the system and the second one – when the user’s attempt to login fails.

The login notification has a special structure that you cannot change:

You can add other attributes to these.

note

Notification rules operate in a similar fashion to Business Object Rules. If you require Notification rules to operate in a specific order then consider passing these to a Process. You cannot pass Notifications to Processes, so consider creating a Non Persisted Business Object to pass data to the Process
 

To turn off handling of the login events in the business space version delete the LoginNotification from the Elements Tree – see Adding/Editing Configuration Elements.

See also Handling Logout Events.