Internal Event Driven Notification

You can create business processes that are invoked by certain events. This is useful for administrators to be informed when certain events happen within Sterling B2B Integrator.

About this task

The triggering of the business process is based on a combination of the event type and the evaluation of an Xpath expression written against the contents of the event itself.

To configure the optional event listener, XpathBPLauncherEventListener:

Procedure

  1. Edit the listenerStartup.properties and listenerStartup.properties.in files to include the line:
    Listener.Class.xx=com.sterlingcommerce.server1.
     dmi.visibility.event.XpathBPLauncherEventListener

    Where xx is the next available number according to how many listeners are already enabled in the file.

  2. Edit the visibility.properties and visibility.properties.in files to add the necessary information to configure the listener to launch the proper business processes based on the correct events. The pattern for registering the events with the listener is:
    bp_event_trigger.X=eventPreFilter,xPathExpression,bpname,userId
    where:
    • X is a numerical index into each unique event-bp combination being registered. (1, 2, 3, and so on).
    • eventPreFilter is the prefix for the event type of the events to be evaluated (aft.visibility.xxx). The event can be any valid Sterling B2B Integrator event, not just visibility events. The eventPreFilter is comprised of scope (Aft), subsystem (Visibility), name (for example, CommAuthentication), and numTag (for example, 1). The numTag is optional.

      The values for name and numTag are provided in Values for eventPreFilter Fields on page 7.

    • xPathExpression is any valid Xpath expression that can be evaluated to a boolean result.
    • bpname is the name of the business process to be launched.
    • userId is the name of a valid Sterling B2B Integrator user used by the launched business process to determine any authorizations required by the business process.

Example

For example, to launch an e-mail business process (aft_email_notifier) with user credentials ‘admin' every time there is a failed authentication for the user account ‘acme':

bp_event_trigger.1=Aft.Visibility.CommAuthentication,
//Event/isSuccessful='false' and 
//Event/principal = ‘acme', aft_email_notifier,admin

Or, an example to launch an e-mail business process (EmailNotifXferEvent) with user credentials ‘admin' when there is a completed file transfer on the FTP server:

bp_event_trigger.1=Aft.Visibility.CommFileXferComplete.1,
//Event/isPut='false' and
//Event/isSuccessful='true',EmailNotifXferEvent,admin

Or, an example to launch an e-mail business process (EmailNotifXferEvent) with user credentials ‘admin' when there is a non-file transfer event such as delete or move on the FTP server:

bp_event_trigger.2=Aft.Visibility.CommNonTransfer.1,
//Event/type='delete' or 
//Event/type='move',EmailNotifNonXferEvent,admin