How to run the example

This mx-mt translation will use the sample files to demonstrate the generation of SWIFT MT940 message output from a CBPR+ camt.053.001.08 XML message.

The cbprJnodesConfigIBM.tar.gz file is available either in IBM_financialpaymentsplus_vn.n.n.n.zip or in UIProjectImports directory.

Extract from cbprJnodesConfigIBM.tar.gz file.
  • jnodes0.jar
The following jars needs to be copied from <TX_install_dir>/jars:
  • jackson-core-n.n.n.jar
  • jackson-annotations-n.n.n.jar
  • jackson-databind-n.n.n.jar
Or visit https://repo1.maven.org/maven2/com/fasterxml/jackson/core/ for download.
Note: Recommend using the latest version.
For the non Docker environments,
  • Copy jars to <TX_install_dir>/extjar.

For TX V11.0.1 and up, native based Design Server installation,

Copy the following into the directory defined in config.yaml server.persistence.libs, by default, this is set to /opt/txlibs:
  • jvcwrap.jar
  • jvalccyy.jar

Restart the running application ./ITX stop and then ./ITX start.

For the Docker environments,
  • docker cp jnodes0.jar <brand>-server:/opt/<company>/<brand>/libs/.
  • Restart the design server, i.e., docker restart <brand>-server.
Note: For RHEL, Docker is not supported, Podman can be used as a substitute since it provides a command line interface similar to Docker. Below is an example of using podman.
  • podman cp jnodes0.jar <brand>-server:/opt/<company>/<brand>/libs/.
  • Restart the design server, i.e., podman restart <brand>-server.

This example may generate audit.log.json log file to report the translation failure due to the pre-conversion checks:

<ElctrncSeqNb> must be present in <BkToCstmrStmt><Stmt><ElctrncSeqNb> and its length must be less than or equal to 5.

OR

<LglSeqNb> must be present in <BkToCstmrStmt><Stmt><LglSeqNb> and its length must be less than or equal to 5.

If <PgNb> in <BkToCstmrStmt><Stmt><StmtPgntn><PgNb> is equal to 1 then there must be only 1 occurrence of <Cd> with value OPBD in

<BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd> and if <Cd> is present in <BkToCstmrStmt><Stmt><Bal><Tp><SubTp><Cd>, then the value must be different from INTM.

If <PgNb> in <BkToCstmrStmt><Stmt><StmtPgntn><PgNb> is greater than 1 then there must be only 1 occurrence of <Cd> with value OPBD in

<BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd> and <Cd> must be present in <BkToCstmrStmt><Stmt><Bal><Tp><SubTp><Cd>, value must be INTM.

If <LastPgInd> in <BkToCstmrStmt><Stmt><StmtPgntn><LastPgInd> is equal to true then there must be only 1 occurrence of <Cd> with value CLBD in

<BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd> and if <Cd> is present in <BkToCstmrStmt><Stmt><Bal><Tp><SubTp><Cd>, then the value must be different from INTM.

If <LastPgInd> in <BkToCstmrStmt><Stmt><StmtPgntn><LastPgInd> is equal to false then there must be only 1 occurrence of <Cd> with value CLBD in

<BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd> and <Cd> must be present in <BkToCstmrStmt><Stmt><Bal><Tp><SubTp><Cd>, value must be INTM.

There must be only 1 occurrence of <Cd> with value CLAV in <BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd>.

There must be a maximum 190 occurrence of <Ntry> in <BkToCstmrStmt><Stmt><Ntry>.

For all occurrence of <BkToCstmrStmt><Stmt><Ntry>, value of <Ccy> in @<BkToCstmrStmt><Stmt><Ntry><Amt><Ccy> must be equal to value of <Ccy> in <BkToCstmrStmt><Stmt><Acct><Ccy>, TotalNumberOfDigits <BkToCstmrStmt><Stmt><Ntry><Amt> must be less than or equal to 14.

For the occurrence of <BkToCstmrStmt><Stmt><Bal>, if <Cd> is present with value OPBD in

<BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd> then first two char of currency code must be the same for other occurrence of <BkToCstmrStmt><Stmt><Bal> in <BkToCstmrStmt><Stmt><Bal><Tp><CdOrPrtry><Cd> with value CLBD OR CLAV.
  1. Import the cbpr_translation.zip project into the Design Server.
  2. Open the cbpr_translation project in Design Server and view the flow cbpr_camt053_mt940.
    1. The Flow Description points to all the maps to be executed during the flow process, which will be called from within some of the map nodes in the flow. The following is a list of maps invoked using RUN built-in function during the flow process:
      • @packagemap=cbpr_plus/translation/mx-mt/maps/cbpr_t9n_mx_camt053_translate/cbpr2531_camt053_translate
      • @packagemap=cbpr_plus/translation/mx-mt/maps/cbpr_t9n_mx_camt053_mt940/cbpr2534_camt053_mt940
      • @packagemap=cbpr_plus/translation/mx-mt/maps/cbpr_t9n_mx_setvarlog/cbpr2501_mxmt_setvarlog
    2. It utilizes the following nodes:
      1. Source Node
        • camt_053

          This node identifies the input data to be translated in the flow. It uses the INPUT_FILE variable to set the location of the data.

      2. Map Node
        • mx_translate

          Runs framework map cbpr2530_camt053_framework, checks pre-translation conditions and translates the input file (mx or xml) into required output (mt).

      3. Target Node
        • mt940

          This node contains the resulting translation in MT format and creates the output as defined by the variable OUTPUT_RESULT_MT.

      4. Log Node
        • audit_log

          This node creates a log file specified by the flow variable AUDIT_LOG.

    3. It utilizes the following flow variables:
      • INPUT_FILE

        Default value for the flow variable INPUT_FILE is ../cbpr_plus/translation/mx-mt/data/env_camt_053_mt940_valid.xml. This is the data file to be used for translation and can be customized. It is used in the Source node camt_053.

      • OUTPUT_RESULT_MT

        Default value for the flow variable OUTPUT_RESULT_MT is mt940.out. This is the location of the output file in mt format. It is used in the Target node mt940. It can be customized.

      • AUDIT_LOG

        Default value for the flow variable AUDIT_LOG is audit.log.json. This is the location of the audit log. It is used in the Log node audit_log. It can be customized.

      • CONFIG_FILE

        Default value for the flow variable CONFIG_FILE is ../cbpr_plus/translation/mx-mt/data/trx_config.xml. This is the location of the file containing the configuration settings. It can be customized.

  3. Open the flow cbpr_camt053_mt940 in the Design Server. It utilizes one source node, one map node, one log node, and one target node.
  4. In Design Server, create a package that contains the input files and one flow. The maps will automatically be included during deployment of the package onto the runtime server.