After a .transaction file has been
created, IBM® WebSphere® Multichannel Bank Transformation
Toolkit tooling
automatically generates a .xml file for this
transaction file. To generate XML tags for the customized processor
object, such as state objects and transaction objects, technical
developers must create an object mapping file and register it as plug-in
extension.
Creating an object mapping file
A processor
object mapping file must contain one <mappings> tag. The <mappings>
tag must contain one or more <tag-mapping> elements. Each <tag-mapping>
element can contain <property-mapping> elements.
Figure 1 shows a sample object mapping
file.
Figure 1. A sample object mapping file<mappings xmlns="http://btt.ibm.com/MappingsSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://btt.ibm.com/MappingsSchema MappingsSchema.xsd ">
<tag-mapping from="ClientPromptState" to="htmlPromptState">
<property-mapping from="id" to="id" rule="ClientPromptRule" />
</tag-mapping>
</mappings>
Figure 2 shows the relationship
between the elements in an object mapping file.
Figure 2. The
relationship between the elements in an object mapping file.
Table 1 provides a
description of the attributes of the <tag-mapping> tag in the mappings
file of a processor object.
Table 1. The attributes
of the <tag-mapping> tag.Attribute |
Description |
from |
The tag name in the .transaction file. |
to |
The tag name in the .xml file. |
Table 2 provides
a description of the attributes of the <property-mapping> tag.
Table 2. The attributes of the <property-mapping> tag.Attribute |
Description |
from |
The tag name in .transaction file.
Required. |
to |
The tag name in .xml file.
Required. |
Rule |
The ID of the property conversion rule that
is used to convert the tag. Predefined rules are described in Table 3. |
Table 3 provides
a description of the predefined rules.
Table 3. Predefined
rulesRule ID |
Description |
HTMLFinalIdRule |
The rule of converting final state id from neutral
flow file to html channel flow file. |
HTMLOperationIdRule |
The rule of converting operation state id from
neutral flow file to html channel flow file. |
HTMLPageIdRule |
The rule of converting page state id from neutral
flow file to html channel flow file. |
HTMLSubflowIdRule |
The rule of converting subflow state id from
neutral flow file to html channel flow file. |
HTMLProcessorIdRule |
The rule of converting processor id from neutral
flow file to html channel flow file. |
TransitionIdRule |
The rule of converting transition id from neutral
flow file to html channel flow file. |
TransitionTargetRule |
The rule of converting transition target from
neutral flow file to html channel flow file. |
Registering an object mapping file
To register
an object mapping file, do the following steps:
- Open the plugin.xml file.
- Click the Extensions tab, and then click Add.
The New Extension window opens.
- In the Extension Points tab of the New
Extension window, select com.ibm.btt.tools.transaction.editor.generator.
Click Finish.
- In the All Extensions panel, right-click com.ibm.btt.tools.transaction.editor.generator,
and then click .
- In the Extension Details panel, select the
mapping file that was selected in the file field.
- In the target field, enter Default
Generator.