SCT Inst Wrapper Mapper - (ISOMessageRouter)

Overview

The SCT Inst Wrapper Mappers 'ISOMessageRouterInbound' and 'ISOMessageRouterOutbound' are a pair of wrapper mappers which act as routers to message body mappers, for incoming and outgoing messages. A message that requires mapping arrives in the wrapper mapper, which initially creates and populates root elements in the mapped document. Then, it routes to an appropriate mapper to map the body of the document before returning to the wrapper mapper.

Several channels can be configured to use the same wrapper mapper, as it delegates body mapping to dedicated mappers dynamically, based on the message type and content received.

ISOMessageRouterInbound

Incoming messages that use ISOMessageRouterInbound are processed in the following manner. Message type is determined by examining the element underneath 'Document',
  • FIToFICstmrCdtTrf indicating a pacs.008.001.02 message
  • FIToFIPmtStsRpt indicating a pacs.002.001.03 message
  • FIToFIStsReq indicating a pacs.028.001.01 message
  • FIToFIPmtCxlReq indicating a camt.056.001.01 message
  • RsltnOfInvstgtn indicating a camt.029.001.03 message
  • PmtRtr indicating a pacs.004.001.02 message
  • BkToCstmrAcctRpt indicating a camt.052.001.06 message

A config value that is stored as a channel parameter, and the identified message type are used to retrieve a value table configuration entry. This entry indicates the correct mapper to be used to map the received message.

For example, the Message From CSM channel can be configured to use the ISOMessageRouterInbound mapper, with a CONFIG=IP_MAP_CFG_FROM_CSM parameter. If a pacs.008.001.02 message is received from the channel, ISOMessageRouterInbound determines that it is a pacs.008.001.02 message from the FIToFICstmrCdtTrf element, and the channel parameters provide the config value IP_MAP_CFG_FROM_CSM. Each config value table entry with category IP_MAP_CFG_FROM_CSM is examined, and when a configuration value is found with a <type> matching the pacs.008.001.02 message type identified earlier, this configuration value will also specify the correct mapper name, Pacs008ToISFMapper.

If a configuration value with a matching <type> value is not found, an exception with error "Mapper not found" is thrown.

Table 1. Sample configuration value table entries
Category Key Configuration value
IP_MAP_CFG_FROM_CSM msgTypeCfg_pacs.008
<msgTypeCfg>
	<class>PACS008</class>
	<subType>IP_FROM_CSM_INSTR</subType>
	<extendedCfg>
		<name>MASTER_FLAG</name>
		<value>Y</value>
	</extendedCfg>
	<pt>
		<class>PACS008</class>
		<subType>IP_FROM_CSM_INSTR</subType>
	</pt>
	<mapName>Pacs008ToISFMapper</mapName>
	<type>pacs.008.001.02</type>
</msgTypeCfg>
Note: <type> element matches, with <mapName> element identifying correct mapper.
IP_MAP_CFG_FROM_CSM msgTypeCfg_pacs.002
<msgTypeCfg>
	<class>PACS002</class>
	<subType>IP_FROM_CSM_PSTAT</subType>
	<extendedCfg>
		<name>MASTER_FLAG</name>
		<value>N</value>
	</extendedCfg>
	<pt>
		<class>PACS002</class>
		<subType>IP_FROM_CSM_PSTAT</subType>
	</pt>
	<mapName>Pacs002ToISFMapper</mapName>
	<type>pacs.002.001.03</type>
</msgTypeCfg>
IP_MAP_CFG_FROM_CSM msgTypeCfg_pacs.028
<msgTypeCfg>
	<class>PACS028</class>
	<subType>IP_FROM_CSM_PSTAT_REQ</subType>
	<extendedCfg>
		<name>MASTER_FLAG</name>
		<value>Y</value>
	</extendedCfg>
	<pt>
		<class>PACS028</class>
		<subType>IP_FROM_CSM_PSTAT_REQ</subType>
	</pt>
	<mapName>Pacs028ToISFMapper</mapName>
	<type>pacs.028.001.01</type>
</msgTypeCfg>
IP_MAP_CFG_REQ_FROM_CHAN msgTypeCfg_pacs.008
<msgTypeCfg>
	<class>PACS008</class>
	<subType>IP_FROM_DBTR_INSTR</subType>
	<extendedCfg>
		<name>MASTER_FLAG</name>
		<value>Y</value>
	</extendedCfg>
	<pt>
		<class>PACS008</class>
		<subType>IP_FROM_DBTR_INSTR</subType>
	</pt>
	<mapName>Pacs008ToISFMapper</mapName>
	<type>pacs.008.001.02</type>
</msgTypeCfg>

After the mapper to be used for the body of the incoming message is identified, ISOMessageRouterInbound sets environment variables used by the upcoming body mapper to determine where to begin mapping from in the incoming message.

The incoming message is then redirected to the appropriate dedicated body mapper from the Route to Label node in ISOMessageRouterInbound, and then redirected back to ISOMessageRouterInbound when the body mapper is finished.

Inbound wrapper mapper:

ISOMessageRouterInbound.subflow diagram

Example inbound ISO mapper:

Pacs008ToISFMapper.subflow diagram

ISOMessageRouterOutbound

Outgoing messages that use ISOMessageRouterOutbound are processed in the following manner, similar to that of ISOMessageRouterInbound. The ISF Business Concept of the outgoing message is identified, (example, IP_TO_CDTR_PSTAT) and the configuration value table is queried using the channel parameter config value (example, IP_MAP_CFG_STATUS_TO_CHANNEL as per Status To Channel channel) as category. From the matching results, each value is searched until an entry with a <subtype> (as opposed to <type> as in the inbound case) matching the previously identified ISF Business Concept is found, with this table entry value also providing the correct mapper name to be used to map the outgoing message. If no value is found with a <subtype> matching the outgoing ISF Business Concept, an exception with error "Mapper not found" is thrown.

Table 2. Sample configuration value table entry
Category Key Configuration value
IP_MAP_CFG_STATUS_TO_CHANNEL msgTypeCfg_IP_TO_CDTR_PSTAT
<msgTypeCfg>
	<class>PACS002</class>
	<subType>IP_TO_CDTR_PSTAT</subType>
	<extendedCfg>
		<name>MASTER_FLAG</name>
		<value>N</value>
	</extendedCfg>
	<pt>
		<class>PACS002</class>
		<subType>IP_TO_CDTR_PSTAT</subType>
	</pt>
	<mapName>ISFToPacs002Mapper</mapName>
	<type>pacs.002.001.03</type>
</msgTypeCfg>
Note: <subType> element matches, with <mapName> element identifying correct mapper.

Environment variables are set which are used by the upcoming body mapper to determine where to begin mapping from in the outgoing message.

The outgoing message is then redirected to the appropriate dedicated body mapper from the Route to Label node in ISOMessageRouterOutbound, returning by the same mechanism when the body mapper is finished.

Outbound wrapper mapper:

ISOMessageRouterOutbound.subflow diagram

Example outbound ISO mapper:

ISFToPacs002Mapper.subflow diagram