performRiskReturn

When the Risk Management engine receives the performRiskReturn message, it finds all the monitors that were affected by the original forward transaction and decrements the appropriate monitors to reflect that the original forward transaction is no longer honored. In addition, if any of the original forward transactions involve pre-funded accounts, the pre-funded user exit is called so that the user exit is aware that the transaction has been returned. The performRiskReturn 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 return batches (ICLs) or contested 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 returns:
<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">performRiskReturn</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">R,C</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 return. 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 processed for risk returns. Use R to process return batches (ICLs) and C to process contested dishonored return batches (ICLs). Forward batches (ICLs) and dishonored return batches (ICLs) should use the performRiskCheck. 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.