Notification API and Triggers

The emxNotificationUtil JPO and emxTransactionNotificationUtil JPO expose several public methods that can be called through the Trigger Manager or directly from a bean or JPO. The emxTransactionNotificationUtil JPO is distinct in that it is invoked only after a transaction completes.

For instructions on using the Trigger Manager to define email notifications, see Trigger Reference.

You use the emxNotificationUtil JPO in conjunction with a custom JPO and the Notification object as an alternative to emxTriggerManager as the program object for an action trigger. You would use emxTransactionNotificationUtil JPO in conjunction with a transaction trigger.

The emxNotificationUtil JPO contains these methods:

Method Name Static Return Type Argument Passed Called From

objectNotification

Yes

int

(Context context, String[] args)

Trigger

objectNotification

Yes

void

(Context context, String objectid, String notificationName, Map payload)

JPO

objectNotificationFromMap

Yes

int

(Context context, String[] args)

Bean

relationshipNotification

Yes

int

(Context context, String[] args)

Trigger

relationshipNotification

Yes

void

(Context context, String relid, String notificationName, Map payload)

JPO

relationshipNotificationFromMap

Yes

int

(Context context, String[] args)

Bean

To call a method from a trigger, the args array contains two entries:


  • objectid or relid
  • name of the notification object

See Configuring Notifications and Messages for instructions on configuring notification objects.

emxTransactionNotificationUtil requires the setting, "History Bit," to be configured on the commands that are defined for those events to which users can subscribe. See "Working with Commands and Menus" in the Business Modeler Guide.

To call a method from a JPO, pass the id and notification name as separate arguments. You can also include an optional payload map argument to pass information to the JPO methods required to create and send the notification.

To call a method from a bean, pass a single map entry as the args array. The map contains:


  • objectid or relid
  • notification name
  • optional map argument to pass information to the JPO methods required to create and send the notification