Skip to main content
Skip table of contents

OFSConverter

OFSConverter microservice is used to transform data from XML format to Open Financial Service (OFS) message format and vice-versa. The microservice is generally used along with T24Outbound adapter which can be used to send the messages to T24 systems.

Configuration and Testing

Component Configurations

The following attributes can be configured in the Configuration panel as shown below.


Figure 1: OFSConverter Configuration Properties

Attributes

Pre Processing XSL Configuration

Pre Processing XSL configuration can be used to transform request message before processing it. Click the small button against the property to configure the properties.

Refer to the Pre/Post Processing XSL Configuration section under Common Configurations topic for details regarding XSL configuration. The properties comprising this XSL configuration are:

  • Provide XSL
  • XSLT Engine
  • Transformation source data
  • Set transformation result as
Post Processing XSL Configuration

Post Processing XSL configuration can be used to transform response message before sending it to the output port.

As mentioned in the above section, refer to the Pre/Post Processing XSL Configuration section under the Common Configurations topic for details regarding XSL configuration.

Process Message Based on Property

The property helps components to skip certain messages from processing.

Refer the Process Message Based On a Property section under the Common Configurations topic.

Validate Input

If this attribute is enabled, the service tries to validate the input received. If disabled, service will not validate the input. For more details, refer Validate Input section under Interaction Configurations in Common Configurations page.

Performance increases Validate Input option is disabled, but it may cause undesired results in case the input XML is not valid.

Error handling configuration

The remedial actions to be taken when a particular error occurs can be configured using this attribute. 

Click the ellipsis button against this property to configure Error Handling properties for different types of Errors. By default, the options Log to error logs, Stop service and Send to error port are enabled.

Refer Error Handling section in Common Configurations for detailed information.

Converter


Figure 2: Properties to convert OFS to XML and viceversa

  • OFS to XML: Select this option to convert messages in OFS format to XML format.
  • XML to OFS: Select this option to convert messages in XML format to OFS format.
XML Root Name

Provide Root element name to be used in generating structure of the input/output ports in case of XML to OFS and OFS to XML modes respectively. The same name will be used for parsing/generating the XML message received/sent.

XML Target Name

Provide Target Namespace to be used in the generating schema and parsing/generating the XML message.

Required Fields in Output

Provide the list of fields to be used in generating the schema. These fields will be added as children to the root element.

Is Message Header type

Enable this property to generate the schema for header type( messages start with "HEADER=") messages. The generated schema will have record elements as children under the root element and record element will have fields configured above as children. Refer to the example below:

Input OFS message sample

GROOVY
HEADER="Customer Information",Cus.No::Customer.No/Mnem::Mnemonic/Short.Name::Short Name/Natlty::Nationality/Res::Residence/Ac.Ofcr::Account Officer/Ind::Industry/Sect::Sector,"Customer Information","66052     "	"NOKIAUS   "	"NOKIA US                      "	"US"	"US"	"2002"	"2850"	"2001","Customer Information","100100    "	"CRISP     "	"Harry Crisp                   "	"US"	"US"	"  26"	"1000"	"1001"

Converted XML

XML
<?xml version="1.0" encoding="UTF-8"?>
<Customer_Information>
   <Record>
      <Customer.No>66052</Customer.No>
      <Mnemonic>NOKIAUS</Mnemonic>
      <Short_Name>NOKIA US</Short_Name>
      <Nationality>US</Nationality>
      <Residence>US</Residence>
      <Account_Officer>2002</Account_Officer>
      <Industry>2850</Industry>
      <Sector>2001</Sector>
   </Record>
   <Record>
      <Customer.No>100100</Customer.No>
      <Mnemonic>CRISP</Mnemonic>
      <Short_Name>Harry Crisp</Short_Name>
      <Nationality>US</Nationality>
      <Residence>US</Residence>
      <Account_Officer>26</Account_Officer>
      <Industry>1000</Industry>
      <Sector>1001</Sector>
   </Record>
</Customer_Information>
Threadpool Configuration

This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective. 

  • This needs to be used only in such circumstances.
  • If sequential processing is not required, please use sessions on the input port.

Click the Threadpool Configuration ellipsis 

 button to configure the Threadpool Configuration properties.


Figure 3: Threadpool configuration properties

Enable Thread Pool

Enable this option to configure the properties that appear as below.

Pool Size

Number of requests to be processed in parallel within the component. Default value is '1'.

Batch Eviction Interval (in ms)

Time in milliseconds after which the threads are evicted in case of inactivity. New threads are created in place of evicted threads when new requests are received. Default value is '1000'.

Functional Demonstration

Scenario 1 - OFS to XML

Create a flow by connecting OFSConverter to Feeder and Display components.


Figure 4: Scenario 1 sample event process

Configure OFSConverter as configured in Figure 1, send an OFS message to the OFSConverter from the Feeder; the corresponding XML output can be seen in Display. This scenario explains the basic functionality of the OFSConverter component.

OFS Sample Input 1

CODE
,DISP.CUSTID::DISP.CUSTID/DISP.ORIGSTAT::DISP.ORIGSTAT/DISP.CUSTSTAT::DISP.CUSTSTAT/DISP.ACCT::DISP.ACCT/DISP.ARRANGE::DISP.ARRANGE/DISP.NAME::DISP.NAME/ST.INDEX::ST.INDEX/USSD.INDEX::USSD.INDEX,"100080"	"FALSE"	"TRUE"	""	""	"Liliane UMUNYANA"	"1"	"1"

Output


Figure 5: XML Output for the OFS Sample Input 1

Expand to see the output in text format for reference
CODE
<?xml version="1.0" encoding="UTF-8"?>
<test>
   <Record>
      <DISP.CUSTID>100080</DISP.CUSTID>
      <DISP.ORIGSTAT>FALSE</DISP.ORIGSTAT>
      <DISP.CUSTSTAT>TRUE</DISP.CUSTSTAT>
      <DISP.ACCT/>
      <DISP.ARRANGE/>
      <DISP.NAME>Liliane UMUNYANA</DISP.NAME>
      <ST.INDEX>1</ST.INDEX>
      <USSD.INDEX>1</USSD.INDEX>
   </Record>
</test> 

OFS Sample Input 2

CODE
HEADER="Customer Information",Cus.No::Customer.No/Mnem::Mnemonic/Short.Name::Short Name/Natlty::Nationality/Res::Residence/Ac.Ofcr::Account Officer/Ind::Industry/Sect::Sector,"Customer Information","66052     "	"NOKIAUS   "	"NOKIA US                      "	"US"	"US"	"2002"	"2850"	"2001"

Output


Figure 6: XML Output for the OFS Sample Input 2

Expand to see the output in text format for reference
CODE
<?xml version="1.0" encoding="UTF-8"?>
<Customer_Information>
   <Record>
      <Customer.No>66052</Customer.No>
      <Mnemonic>NOKIAUS</Mnemonic>
      <Short_Name>NOKIA US</Short_Name>
      <Nationality>US</Nationality>
      <Residence>US</Residence>
      <Account_Officer>2002</Account_Officer>
      <Industry>2850</Industry>
      <Sector>2001</Sector>
   </Record>
</Customer_Information>

OFS Sample Input 3

CODE
AA.ARRANGEMENT.ACTIVITY,BK.AUTONEW/I/PROCESS//,INPUTT/654321,,ARRANGEMENT:1:1=NEW,ACTIVITY:1:1=DEPOSITS-NEW-ARRANGEMENT,EFFECTIVE.DATE:1:1=20170321,CUSTOMER:1:1=100058,PRODUCT:1:1=BK.AUTO.SAV,CURRENCY:1:1=RWF

Output


Figure 7: XML Output for the OFS Sample Input 3

Expand to see the output in text format for reference
CODE
<?xml version="1.0" encoding="UTF-8"?>
<ns1:test xmlns:ns1="test">
   <ns1:header>AA.ARRANGEMENT.ACTIVITY,BK.AUTONEW/I/PROCESS//,INPUTT/654321,,</ns1:header>
   <ns1:ARRANGEMENT>
      <ns1:value ns1:position="1" ns1:subPosition="1">NEW</ns1:value>
   </ns1:ARRANGEMENT>
   <ns1:ACTIVITY>
      <ns1:value ns1:position="1" ns1:subPosition="1">DEPOSITS-NEW-ARRANGEMENT</ns1:value>
   </ns1:ACTIVITY>
   <ns1:EFFECTIVE.DATE>
      <ns1:value ns1:position="1" ns1:subPosition="1">20170321</ns1:value>
   </ns1:EFFECTIVE.DATE>
   <ns1:CUSTOMER>
      <ns1:value ns1:position="1" ns1:subPosition="1">100058</ns1:value>
   </ns1:CUSTOMER>
   <ns1:PRODUCT>
      <ns1:value ns1:position="1" ns1:subPosition="1">BK.AUTO.SAV</ns1:value>
   </ns1:PRODUCT>
   <ns1:CURRENCY>
      <ns1:value ns1:position="1" ns1:subPosition="1">RWF</ns1:value>
   </ns1:CURRENCY>
</ns1:test>

Scenario 2 - XML to OFS

Scenario 2 illustrates conversion of XML data to OFS. Create Scenaro 2 by making changes in Scenario 1 — change the Converter property in the OFSCOnverter CPS from "OFS to XML" to "XML to OFS".

XML Sample Input

Output of the OFS Sample Input 3 is used here:

CODE
<?xml version="1.0" encoding="UTF-8"?>
<ns1:test xmlns:ns1="test">
   <ns1:header>AA.ARRANGEMENT.ACTIVITY,BK.AUTONEW/I/PROCESS//,INPUTT/654321,,</ns1:header>
   <ns1:ARRANGEMENT>
      <ns1:value ns1:position="1" ns1:subPosition="1">NEW</ns1:value>
   </ns1:ARRANGEMENT>
   <ns1:ACTIVITY>
      <ns1:value ns1:position="1" ns1:subPosition="1">DEPOSITS-NEW-ARRANGEMENT</ns1:value>
   </ns1:ACTIVITY>
   <ns1:EFFECTIVE.DATE>
      <ns1:value ns1:position="1" ns1:subPosition="1">20170321</ns1:value>
   </ns1:EFFECTIVE.DATE>
   <ns1:CUSTOMER>
      <ns1:value ns1:position="1" ns1:subPosition="1">100058</ns1:value>
   </ns1:CUSTOMER>
   <ns1:PRODUCT>
      <ns1:value ns1:position="1" ns1:subPosition="1">BK.AUTO.SAV</ns1:value>
   </ns1:PRODUCT>
   <ns1:CURRENCY>
      <ns1:value ns1:position="1" ns1:subPosition="1">RWF</ns1:value>
   </ns1:CURRENCY>
</ns1:test>

Output


Figure 7: OFS Output for the XMLSample Input

Output in text format for reference

CODE
AA.ARRANGEMENT.ACTIVITY,BK.AUTONEW/I/PROCESS//,INPUTT/654321,,ARRANGEMENT:1:1=NEW,ACTIVITY:1:1=DEPOSITS-NEW-ARRANGEMENT,EFFECTIVE.DATE:1:1=20170321,CUSTOMER:1:1=100058,PRODUCT:1:1=BK.AUTO.SAV,CURRENCY:1:1=RWF


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.