EntryStatesEventHandler

The EntryStatesEventHandler handles the EntryUowStateChange event.

EXEC specification: com.ibm.paydir.ima.txsvr.event.appbridge.EntryStatesEventHandler

This event handler issues a Messaging API message on the JMS send queue when the EntryUowStateChange event occurs and the state of all of the batches (ICLs) contained in the entry has changed to match the states specified in the entryStates parameter. The message issued to the target contains the ID of the entry that has been either created or changed. Because entry numbers are not unique, an entry ID is used to uniquely identify the entry number created. For example, an entry number of 1234 may be used multiple times and span different business days. The target application uses the entry ID to ensure it processes the correct entry number.

Event parameters

This event handler uses the general Messaging API event handler parameters and parameters that are specific to the event. Event parameters are specified in the Scheduler.xml file.

Table 1 shows the additional event parameter for the entry states event handler.
Table 1. EntryStatesEventHandler parameters
Parameter name Trigger Type Value Description
entryStates1 ... entryStatesN Yes String One or more of the batch (ICL) states that can be used for triggers. A comma delimited list of batch (ICL) state column names. For more information about using this parameter, see Specifying Triggers.
Note: The entryStates1 parameter must be specified to process a EntryUowStateChange event.
Note: The following list describes what the value in the trigger column means:
Yes
When the value in this column in the database changes to one of the values that are allowed by the event stanza, the handler places a message on the specified queue.
No
When the value in this column in the database changes, it does not cause a message to be placed on a queue. This parameter can be added to provide more criteria that must be met to send a Messaging API message.
N/A
The parameter is not considered when it is being determined whether a message is sent.

Message contents

When the message is delivered to the target application, it contains the information that is shown in Table 2.
Table 2. Message content for EntryStatesEventHandler
Message part Value Description
Unit of Work Entry ID as a long This value is used to locate the entry number that has been created or changed.
Payload None No additional payload data is provided within the message other than the unit of work information.
Note: The contents of this message must match what the receiver is expecting.

Response processing

Any response from the target application is ignored.

Example handler XML

This example shows how to initiate the Services Framework CIFFExtractTask task when an entry is loaded.

The example XML shows a TaskInitiation Messaging API message sent to the FXH.SERVICESFRAMEWORK.INPUT.QUEUE on localhost when an entry is created for a batch (ICL):
<EVENT>
   <NAME>Entry Loaded Event</NAME>
   <TYPE>EntryUowStateChange</TYPE>
   <EXEC>
      com.ibm.paydir.ima.txsvr.event.appbridge.EntryStatesEventHandler
   </EXEC>
   <PARAMETER name="msgType">TaskInitiation</PARAMETER>
   <PARAMETER name="entryStates">LOADED</PARAMETER>
   <PARAMETER name="destinationID">CIFFExtractTask</PARAMETER>
   <PARAMETER name="jmsQmgrHostname">localhost</PARAMETER>
   <PARAMETER name="jmsQmgrChannel">SYSTEM.DEF.SVRCONN</PARAMETER>
   <PARAMETER name="jmsQmgrPort">1414</PARAMETER>
   <PARAMETER name="jmsClient">true</PARAMETER>
   <PARAMETER name="jmsQmgrName">FTM.QMANAGER</PARAMETER>
   <PARAMETER name="jmsSendQueue">FXH.SERVICESFRAMEWORK.INPUT.QUEUE</PARAMETER>
   <PARAMETER name="jmsReplyQueue">FXH.TRANSSERVER.INPUT.QUEUE</PARAMETER>
</EVENT>