Mapping procedures and functions
- rIsf
- This is a reference to the ISFMessage element of an ISF instance tree.
- rOutputTxn
- This is a reference to the integration node OutputBody. For example, the OutputRoot.MRM or OutputRoot.XMLNSC nodes.
MapTransactionHeader
This procedure maps the transaction header, if appropriate. An example mapping statement is supplied in the procedure body. You are responsible for implementing the code in this procedure.
CREATE PROCEDURE MapTransactionHeader()
BEGIN
-- Then map any header fields
SET rOutputTxn.Header.Field1 = rIsf.Header.TransactionId;
-- ...
END;
MapTransaction
This procedure maps the transaction. The procedure body contains a short and incomplete mapping sample. The sample assumes that the ISFTransaction is a PaymentOrigination. It demonstrates the mapping of one field and then calling a procedure to map the creditor information. You are responsible for implementing the code in this procedure.
CREATE PROCEDURE MapTransaction()
BEGIN
-- Initialize rIsfTxn
-- TODO change if not using PaymentOrigination
MOVE rIsfTxn TO rIsf.{isf}:PaymentOrigination;
-- now create the Output Transaction under rOutputBody
-- for example
SET rOutputTxn.Field1 = rIsfTxn.rIsfTxn.CreationDate;
CALL MapCreditor();
-- ...
END;
MapCreditor
This procedure maps the creditor details. It is provided to demonstrate how to call a mapping function from MapTransaction. You are responsible for implementing the code in this and any further procedures that are required.
CREATE PROCEDURE MapCreditor()
BEGIN
DECLARE rIsfCreditor REFERENCE TO rIsfTxn.Creditor;
SET rOutputTxn.Field2.ClientIdentification = rIsfCreditor.ClientIdentification;
-- ...
END;