Documentation for a newer release is available. View Latest

Icon Standard Mapping

If you have designed your flow to use the Icon Standard ISO Message rules you can override the ipf.csm.icon-standard-mapping property and set the value to true. Default value of this property is set to false.

When Icon Standard Mapping is turned on, in a csm-service implementation project a developer can create an Outbound/Inbound updater for each canonical ISO message type, which will update canonical message before it is mapped to scheme format and validated. These updaters need to be defined as spring beans.

Example of OutboundCanonicalMessageUpdater for FIToFICustomerCreditTransferV08:

package com.iconsolutions.instantpayments.rt1.adapter.updater;

import com.iconsolutions.instantpayments.csm.OutboundCanonicalMessageUpdater;
import com.iconsolutions.iso20022.message.components.payment.group_header93.GroupHeader93;
import com.iconsolutions.iso20022.message.definitions.payments_clearing_and_settlement.pacs008.FIToFICustomerCreditTransferV08;

public class OutboundCCTUpdater implements OutboundCanonicalMessageUpdater<FIToFICustomerCreditTransferV08> {
    @Override
    public FIToFICustomerCreditTransferV08 update(FIToFICustomerCreditTransferV08 message) {
        return message.toBuilder()
                .grpHdr(message.getGrpHdr().toBuilder()
                        .intrBkSttlmDt(message.getCdtTrfTxInf().get(0).getIntrBkSttlmDt())
                        .build()
                )
                .build();
    }

    @Override
    public Class<FIToFICustomerCreditTransferV08> supportedType() {
        return FIToFICustomerCreditTransferV08.class;
    }
}

Example of InboundCanonicalMessageUpdater for FIToFICustomerCreditTransferV08:

package com.iconsolutions.instantpayments.rt1.adapter.updater;

import com.iconsolutions.instantpayments.csm.InboundCanonicalMessageUpdater;
import com.iconsolutions.instantpayments.csm.UpdatedContentWithSupportingContext;
import com.iconsolutions.iso20022.message.components.payment.group_header93.GroupHeader93;
import com.iconsolutions.iso20022.message.definitions.payments_clearing_and_settlement.pacs008.FIToFICustomerCreditTransferV08;

public class InboundCCTUpdater implements InboundCanonicalMessageUpdater<FIToFICustomerCreditTransferV08> {
    @Override
    public UpdatedContentWithSupportingContext<FIToFICustomerCreditTransferV08> update(FIToFICustomerCreditTransferV08 message) {
        FIToFICustomerCreditTransferV08 message = message.toBuilder()
                .cdtTrfTxInf(message.getCdtTrfTxInf().stream()
                        .map(creditTransferTransaction39 -> creditTransferTransaction39.toBuilder()
                                .intrBkSttlmDt(message.getGrpHdr().getIntrBkSttlmDt())
                                .build()
                        ).toList()
                )
                .build();
        return new UpdatedContentWithSupportingContext<>(message);
    }

    @Override
    public Class<FIToFICustomerCreditTransferV08> supportedType() {
        return FIToFICustomerCreditTransferV08.class;
    }
}