performRiskCheck

When the Risk Management engine receives the performRiskCheck message, it tests all of the applicable batch (ICL) limits for the batch (ICL), and all of the transaction limits and exposure limit monitors for all of the transactions. In addition, if any of the transactions involve pre-funded accounts, the pre-funded user exit is called to ensure that sufficient funds are available. The performRiskCheck message is designed to be sent after a batch (ICL) has been checked for authorization, its condition is accepted, and it is not in a pending state. Risk checking is only appropriate for forward batches (ICLs) or dishonored return batches (ICLs). The Risk Management engine expects the batch (ICL) identifier to be passed. The PresentmentStatesEventHandler class found in the Transaction Server ensures that all of these criteria are met and passes the batch (ICL) identifier to the Risk Management engine. It is configured to be invoked when the following events occur:
  • PresentmentStateChange
  • PresentmentColumnChange
  • PresentmentGroupColumnChange
The PresentmentStateChange event occurs when the state of the batch (ICL) changes. It detects when the AUTH_CHECKED state is set and LOCKED is no longer set. The PresentmentColumnChange event handles when the condition of the batch (ICL) changes or the pending flag changes. The PresentmentGroupColumnChange event handles when the condition of the transmission changes.
Configure the scheduler XML file so the PresentmentStatesEventHandler class is called when one of these criteria changes. The class name is:
com.ibm.paydir.ima.txsvr.event.appbridge.PresentmentStatesEventHandler
This is an example of using the PresentmentStatesEventHandler to perform risk checks:
<EVENT>
   <NAME>Risk Management - States Reached</NAME>
   <TYPE>PresentmentStateChange</TYPE>
   <TYPE>PresentmentColumnChange</TYPE>
   <TYPE>PresentmentGroupColumnChange</TYPE>
   <EXEC>
      com.ibm.paydir.ima.txsvr.event.appbridge.PresentmentStatesEventHandler
   </EXEC>
   <PARAMETER name="msgType">performRiskCheck</PARAMETER>
   <PARAMETER name="presStates1">!LOCKED,AUTH_CHECKED</PARAMETER>
   <PARAMETER name="condition">accepted</PARAMETER>
   <PARAMETER name="group.condition">accepted</PARAMETER>
   <PARAMETER name="pending">N</PARAMETER>
   <PARAMETER name="forwardReturn">F,D</PARAMETER>
   <PARAMETERREF>schedulerReferenceProperties</PARAMETERREF>
   <PARAMETERREF>sendToRiskManagement</PARAMETERREF>
</EVENT>

In this example, the !LOCKED state is added so that the Risk Management engine ensures that the batch (ICL) is not locked by another application prior to performing the risk checks. In addition, by adding it into the event stanza, the message is not sent if the batch (ICL) is already locked. The msgType parameter defines the type of message to send. The forwardReturn parameter defines which type, or types, of batches (ICLs) are risk checked. Use F to check forward batches (ICLs) and D to check dishonored return batches (ICLs). Return batches (ICLs) and contested dishonored return batches (ICLs) should use the performRiskReturn. The PARAMETERREF elements refer to parameter sets defined elsewhere in the scheduler XML file that define the properties necessary for sending a message to the Risk Management engine. For more information about using parameter sets, see Parameter sets in the scheduler.