Message Image  

WTX (Transformation Extender) Map to IBM GDM Map Conversion

 View Only
Fri July 10, 2020 11:43 AM

Standalone Tooling for creating IBM GDM Maps programatically from IBM (WebSphere) TX Maps

Standalone IBM Graphical Data Mapper generation utility to accelerate the creation of map specification language (GDM) maps based on transformation meta-data exported from WTX Maps as XML

This utility takes it’s input from the XML files exported from the IBM TX (WebSphere TX (WTX)) Studio that represent the data transformation mapping portion of WTX maps and accelerates/assists in the building of the equivalent IBM GDM Map.

Convert this:

Figure 1. Example Source WTX Map

Into this:

Figure 2. Resultant IBM GDM Map

This utility is a prototype an as such a work in progress and at this point in time it will attempt to do the following:


Create basic IBM GDM Maps with a single input and output schemas (supporting XMLNSC and DFDL)
Perform element mapping association.
Supports moves, assigns and converts (NUMBERTOTEXT / TEXTTONUMBER)
Copies the original WTX rule to the description field of the target element in the GDM.
Operates against the last card on input and output only
It Is not WTX Adapter aware.

Therefore, at this point in time the utility represents a rudimentary capability that demonstrates how to use WTX meta-data (in the form of XML export file) to define a transformation and then use that data to generate an IBM Graphical Data Map.

The ParseWTXXMLSerialMSL.java class is the executable code and provides demonstration on how to leverage JaxB Java code against JaxB Objects generated by the IIB Toolkit from the IBM GDM MSL.XSD XML schema and WTX Studio Map exports (MMS.DTD converted to an XSD) to convert WTX Maps to IBM GDM Maps. It also uses the standalone DFDL Java parser to read a Dictionary.csv that provides configuration on how the tool should execute plus substitution values for those items that the tool cannot derive from the WTX exported XML file.

Figure 3. Eclipse Projects and Files

The tooling is available on gitHub at the following location

https://github.com/DAVEXACOM/WTXMapToIBMGDMConverter

The GeneratedMapTargetApp\Documentation folder has documentation and diagrams

Possible uses for this tooling

Accelerated/assisted conversion from WTX Maps to IBM GDM Maps.
IBM GDM maps can be used with many technologies. IBM Integration Bus, IBM Datapower, zOS Connect etc. However, I have only tested this tool against IBM Integration Bus v10.

Running the tool

Figure 4. WTX to GDM Converter code logic

Execute Run As->Java Application in the Eclipse Toolkit for ParseWTXXMLSerializeMSL.java
OR
Execute run As->Java Configuration in the Eclipse Toolkit for ParseWTXXMLSerializeMSL.java
The Java class ParseWTXXMLSerializeMSL contains both the Dictionary DFDL CSV Parser code and the JaxB marshal from WTX XML plus unmarshall/serialize to MSL (XML) code. (It should be noted that as far as Java development goes…. I was a pretty average COBOL programmer back in the early 90s).

How does it work



Figure 5. WTX to GDM Conversion Process

The GDM Generator for WTX map prototype is written as a standalone Java application.

Working with the WTX Map XML export DTD

The mms.dtd file was converted to an XSD, mms.xsd. The DTD and XSD were simplified by removing the embedded adapter.dtd “sub-files” and renamed mmsNoAdpaters.xsd

Unmarshalling a WTX Map exported XML file to Java Objects – Input

JaxB Objects were generated from the WTX map export mmsNoAdapters.XSD
JaxB Java unmarshaller loads up the Java Objects using the WTX Map exported XML , SGServiceHBHCHKmeta.xml as source.

Marshalling an IBM GDM Map set of JaxB Java Objects to a .map file – Output

JaxB Objects were generated from the IIB GDM Map Specification Language published schema XSD.
JaxB Java will marshall Java Objects to XML and serialize to file.
A .map file will be created containing Map Specification Language XML

Translation from WTX Java Objects to GDM Java Objects

With the WTX Source Map and GDM target map represented as Java Objects the prototype “simply” gets from the source Objects and sets the target Objects to build out an IBM GDM Map.
The marshaller described above serializes to an XML file, which is written to a directory structure in an IIB Toolkit workspace.

Finally

Check the console to review the XML output and a successful run.
Switch to the Integration perspective and you will see the
Refresh the GeneratedMapTargetApp project and open the newly created .map file
Associated the .map file with a Mapping Node in a message flow
Deploy and test to an IIB runtime node.


#graphicaldatamapping
#DFDL