Overriding the Service Operations Monitor Contract Status for Best Effort Delivery Transactions

The system invokes the OnAckReceive PeopleCode event when the status of a publication contract is Done, or Done NoAck.. You can then override the contract status to the following: Done, Error, or Done NoAck.

In the case where best effort delivery was used, if the PeopleCode returns the status of Retry, the Integration Broker framework overrides the status to Done NoAck. To check if the status returned by the system is Done NoAck check the ResponseStatus property on the Message object.

The following pseudo-code demonstrates overriding the publication contract status of Done NoAck using the OnAckReceive event:

import PS_PT:Integration:IReceiver;

class FLIGHTACK implements PS_PT:Integration:IReceiver
   method FLIGHTACK();
   method OnAckReceive (&MSG As Message) Returns integer;
end-class;

/* constructor */
method FLIGHTACK
end-method;

method OnAckReceive
   /+ &MSG as Message +/
   /+ Returns Integer +/
   /+ Extends/implements PS_PT:Integration:Ireceive.OnAckReceive +/
   /+ Variable Declaration +/

   Local Rowset &rs;
   Local string &strException, &data;

   If &MSG.ResponseStatus <> %IB_Status_Success Then
     /+ Done NoAck status returned from IB framework
     can get the actual exception via the IBException Object +/
     &strException = &MSG.IBException.ToString();
     Return %Operation_DoneNoAck;
   End-If

   /* process soap fault and determine what to do +/
   &data = &MSG.GetContentString();

   Return %Operation_Done;

end-method