PresentmentStatesEventHandler

The PresentmentStatesEventHandler handles the PresentmentStateChange, PresentmentColumnChange, and PresentmentGroupColumnChange events.

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

This event handler issues a Messaging API message on the JMS send queue when a batch (ICL) reaches a specified set of states and column values. Column names that correspond to an inbound transmission have group. before the column name.

When a PresentmentStateChange event is being processed, a message is sent for each batch (ICL) within the inbound transmission that reaches the specified set of states and column values. For the PresentmentColumnChange and PresentmentGroupColumnChange events, a message is only sent when the value of the condition or group.condition column changes. Parameters that do not correspond to a column in a database table do not affect whether a message is sent.

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.

The following table shows the additional event parameters for the presentment states event handler.
Table 1. PresentmentStatesEventHandler parameters
Parameter name Trigger Type Value Description
presStates1 … presStatesN Yes String One or more of the batch (ICL) states that can be used for triggers. Comma-delimited list of batch (ICL) state column names. For more information about using this parameter, see Specifying Triggers.
Note: The presStates1 parameter must be specified to process a PresentmentStateChange event.
setOutboundReady N/A Boolean
  • FALSE
  • TRUE
Indicates whether to set the outboundready indicator of the batch (ICL) to true before the Messaging API message is placed on the JMS send queue.
actions N/A String User defined A user specified value that is sent in the payload of the Messaging API message.
condition Yes String
  • Accepted
  • Rejected
  • Suspended
  • Deleted
  • Canceled
  • Validating
  • Reversed
A comma-delimited list of condition settings, any one of which is required for the Messaging API message to be sent.

If this parameter is used, also specify the PresentmentColumnChange event type to ensure that the event is handled whenever the value of the condition column changes.

Note: This parameter defaults to accepted. To ignore the condition parameter, specify it as an empty value set.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

pending Yes Boolean
  • FALSE
  • TRUE
If this parameter is specified, the value of the pending column must match this value for the Messaging API message to be sent.
overrideable Yes Boolean
  • FALSE
  • TRUE
A comma-delimited list of overrideable flag settings. If this parameter is specified, the value of the overrideable column must match one of these values for the Messaging API message to be sent.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

overriddenBy No String User defined A comma-delimited list of overridden by IDs, any one of which is required for the Messaging API message to be sent.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

This parameter is optional.

userField No String User defined A comma-delimited list of user field values, any one of which is required for the Messaging API message to be sent.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

This parameter is optional.

group.states1 … group.statesN Yes String One or more of the transmission states that can be used for triggers. Comma-delimited list of transmission state column names. For more information about using this parameter, see Specifying Triggers.
group.condition Yes String
  • Accepted
  • Rejected
  • Suspended
  • Deleted
  • Canceled
  • Validating
A comma-delimited list of condition settings for the inbound transmission that contains the batch (ICL) being processed. Any one of the values that are specified is required for the Messaging API message to be sent.

If this parameter is used, also specify the PresentmentGroupColumnChange event type to help ensure that an event occurs whenever the value of the group condition column changes.

Note: This parameter defaults to accepted. To ignore the group condition parameter, specify it as an empty value set.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

inbound.condition No String
  • Accepted
  • Rejected
  • Suspended
  • Deleted
  • Canceled
  • Validating
  • Reversed
A comma-delimited list of condition settings for the inbound batch that is associated with the batch (ICL) being processed. Any one of the values that are specified is required for the Messaging API message to be sent.
Note: This parameter applies only to batches that are currently processing. These batches are batches that are at level P.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

inbound.pending No Boolean
  • FALSE
  • TRUE
The pending flag for the inbound batch that is associated with the batch (ICL) being processed. If this parameter is specified, the value of the pending column for the inbound batch must match this value for the Messaging API message to be sent.
Note: This parameter applies only to batches that are currently processing. These batches are batches that are at level P.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

inbound.overrideable No Boolean
  • FALSE
  • TRUE
The overrideable flag for the inbound batch that is associated with the batch (ICL) being processed. If this parameter is specified, the value of the overrideable column for the inbound batch must match this value for the Messaging API message to be sent.
Note: This parameter applies only to inbound batches that are related to a processing batch (ICL) that is actively being processed.
paymentStandard No String or short NACHA The name of the payment standard that is needed for the Messaging API message to be sent. The corresponding numeric value can be used instead of the name.
paymentMessageType No String or short COR The name of the payment message type that is needed for the Messaging API message to be sent. The corresponding numeric value can be used instead of the name.
extendedContext No String
BDayActivateUpdated
Detects when the state of the batch was updated to a state other than loaded during business day activation.
Extended context value for this event that is required for the Messaging API message to be sent.

For more options available with this parameter, see Specifying Value Modifiers and Special Values.

This parameter is optional.

responseRequired No Boolean
  • FALSE
  • TRUE
This parameter indicates whether the event handler requires the target application to return a response to complete the WIP record in the service manager. When this parameter is true, the event handler uses the response required flag in the message to notify the target application that it must respond. This parameter defaults to true.

This parameter is optional.

errorCode No String Any valid error code that is defined in Common Services. If this parameter is specified, the event handler uses the reject level and override fields of the specified error code to change the state of an accepted batch (ICL).

If the reject level of the error code is transaction, segment, batch (ICL), or transmission, the accepted batch (ICL) is changed to the rejected state. If the override field of the error code is set to yes, the state of the batch (ICL) is also set to overrideable.

If the reject level of the error code is either suspend batch (ICL) or suspend transmission, the accepted batch (ICL) is changed to the suspended and overrideable states.

The error code in this parameter must be a valid error code that is defined in Common Services. If the error code is not valid when the scheduler is loaded, an error message is logged and the scheduler does not load. If the error code is not valid when the event handler runs, the handler logs a warning message that the error code can't be used and then continues processing the event.

progressState1 … progressStateN No String The name of the column for the state in the PRESENTMENT database table. For more information, see Configuring batch (ICL) progress indicators. Specify the name of the state that is to be monitored by using the batch (ICL) progress indicators. This parameter is the state that is expected to be set to complete when the processing of the event that is defined in this stanza completes. For events that can set more than one state, use multiple progressState parameters to monitor the different states.

A progress state parameter must be matched to its corresponding expiration interval parameter for the state by using the explicit numbering method for sequenced parameters.

progressExpiry1 … progressExpiryN No String An interval of time. For more information, see Configuring batch (ICL) progress indicators. To display a visual notification when the progress is taking longer than expected, configure an expiration time interval for a state. The expiration interval must be specified by using the same values and formats that are used to specify the intervals for scheduler tasks. When the state doesn't reach the complete status after the amount of time that is specified in this parameter passes, a warning icon is displayed on the batch (ICL) pages.

An expiration interval parameter must be matched to the corresponding progress state parameter for the state by using the explicit numbering method for sequenced parameters.

rejectedTxns No Boolean
  • True
  • False
  • Y
  • N
Indicates whether a batch (ICL) contains rejected transactions. A value of true or Y indicates that a batch (ICL) contains one or more rejected transactions. If this parameter is specified, the value of the rejectedTxns column must correspond to this value for the Messaging API message to be sent.
riskRequired No Boolean
  • True
  • False
  • Y
  • N
Indicates whether a batch (ICL) requires risk review. If this parameter is specified, the value of the riskRequired column must correspond to this value for the Messaging API message to be sent.
prefund No Boolean
  • True
  • False
  • Y
  • N
Indicates whether a batch (ICL) requires prefund screening. If this parameter is specified, the value of the prefund column must correspond to this value for the Messaging API message to be sent.
suspendedTxns No Boolean
  • True
  • False
  • Y
  • N
Indicates whether a batch (ICL) contains suspended transactions. A value of true or Y indicates that a batch (ICL) contains one or more suspended transactions. If this parameter is specified, the value of the suspendedTxns column must correspond to this value for the Messaging API message to be sent.
txnsToInclude No Boolean
  • Accepted
  • Exception
  • UnhandledException
Indicates which transactions are included depending on their status.
Note: The status Exception includes the transactions that are rejected, meaning that they are an exception, but not an unhandledException.
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 the following table.
Table 2. Message content for PresentmentStatesEventHandler
Message part Value Description
Unit of Work Batch (ICL) ID as a long This value is used to locate the batch (ICL) in the database.
Payload An object of the type com.ibm.paydir.ima.txacc.app.bridge.PresentmentStatesEventPayload The PresentmentStatesEventPayload class is an example of the type of payload delivered. This payload provides the accessor methods that are used to retrieve the details of the event that occurred. These methods are shown in Table 3.
Contents XML that provides more information about the batch (ICL) and transmission. Provides more information about the batch (ICL) and its corresponding transmission. The contents part includes the following information:
  • The batch (ICL) states that caused this event handler to run.
  • The values of several database columns.
  • The object ID in the database for the batch (ICL) and for the transmission.
An example of the XML for the contents is:
<contents>
   <batch>
      <states>
         <state>!LOCKED</state>
         <state>LOADED</state>
         <state>!ACTIVITY_MONITORED</state>
      </states>
      <objId>1001</objId>
      <overrideable>false</overrideable>
      <pending>false</pending>
      <overriddenBy></overriddenBy>
      <condition>ACCEPTED</condition>
   </batch>
   <transmission>
      <objId>1000</objId>
      <overrideable>false</overrideable>
      <pending>false</pending>
      <overriddenBy></overriddenBy>
      <condition>ACCEPTED</condition>
   </transmission>
</contents>
Note: The contents of this message must match what the receiver is expecting.
Table 3. PresentmentStatesEventHandler accessor methods
Method name Return type Description
getStates ( ) String Returns the comma-delimited list of trigger states that caused the message to be sent. This list includes any special values or value modifiers. For more information, see Specifying Value Modifiers and Special Values and Specifying Triggers.
getCondition ( ) Short Returns the condition value in effect when the event occurred.
getActions ( ) String Returns the user configured actions string from the event handler parameters. Refer to Table 1.

Response processing

The PresentmentStatesEventHandler requires a response or the business day that is associated with the batch (ICL) is not allowed to complete end of day processing.

Example handler XML

The example XML shows a performAdjustment Messaging API message that is sent to AutoAdjust. The message is sent when the batch (ICL) was not yet adjusted, but the reviewed and repaired states were reached for the batch (ICL). In addition, the condition must be accepted for both the batch (ICL) and the inbound transmission that contains it.
<EVENT>
   <NAME>Adjustment - Batch</NAME>
   <TYPE>PresentmentStateChange</TYPE>
   <TYPE>PresentmentColumnChange</TYPE>
   <TYPE>PresentmentGroupColumnChange</TYPE>
   <EXEC>
      com.ibm.paydir.ima.txsvr.event.appbridge.PresentmentStatesEventHandler
   </EXEC>
   <PARAMETER name="workType">Adjust</PARAMETER>
   <PARAMETER name="msgType">performAdjustment</PARAMETER>
   <PARAMETER name="presStates1">REVIEWED,REPAIRED,!ADJUSTED</PARAMETER>
   <PARAMETER name="group.condition">ACCEPTED</PARAMETER>
   <PARAMETER name="condition">ACCEPTED</PARAMETER>
   <PARAMETER name="group.pending">N</PARAMETER>
   <PARAMETER name="group.sourceId">2</PARAMETER>
   <PARAMETER name="actions">NCI,ICLD,RBDL,DBDL,IAD,COMPLETE</PARAMETER>
   <PARAMETER name="presLevel">PROC</PARAMETER>
   <PARAMETER name="progressState1">ADJUSTED</PARAMETER>
   <PARAMETER name="progressState2">BALANCED</PARAMETER>
   <PARAMETERREF>schedulerReferenceProperties</PARAMETERREF>
   <PARAMETERREF>sendToAdjustment</PARAMETERREF>
</EVENT>