Professional Documents
Culture Documents
Mapping
Module 2
We will be using the term “map” quite a bit in class. What we are talking about is the
relationship (the defined plan of correspondence) between your input data and desired output
data. In class, we will tell you what the relationships are between the elements of the input and
output. When you get back to your office, determining this relationship will be part of the task
before you. This is the “mapping” process.
With Application Integrator, you put all the pieces of a map together and give them to the
translator. The way you do this is with a Map Component File.
The Map Component file simply lists the components of a map environment. The translator
needs to know what files to work with, and these are typically passed as a list inside the Map
Component File.
When you start the translator, the process of the translation has attributes that are unique. We
call the activity and all the components it puts together to accomplish the task a translation
“environment”. A translation environment consists of components that control what data is to
be translated, such as the input/output files, the source and target data models, and the access
models to be used.
First, a brief word about the WorkBench GUI environment. WorkBench is based in the Eclipse
platform. One of the reasons this platform was chosen is because it makes your window highly
configurable. There are several panels you can choose to show, or hide, or, otherwise
rearrange. The window areas, or, panels, are called views.
Views are part of what makes your desktop so adaptable. You can change the working
dynamics of the views (window areas) according to your preferences, placing different panels
where you personally find them to be most useful. Then you can save this configuration in a
“Perspective”. We’ll have more details about views and layouts of views (Perspectives) in a
later module.
Mapping Area
Navigator View
View
Status Message
WorkBench Mapping 2-6
When you first open WorkBench, you will see something like this.
Area Description:
Menu and Tool Bar
Use the Menu and Tool Bar to select various features and options.
Navigator
Use the Navigator to select and open files you want to work with. You may select different editors
or use defaults. Navigator view can be converted to Fast View.
Map Editor Work Area
Use the Work Area to define the structure of your data files and create mapping instructions. Each
View open in the Map Editor Work Area can be re-docked in a different location.
Map Helpers Area
Use various Helper Views to access functions, variables, routines, and information. Each Helper
View can be converted to Fast View.
Status Area
Use the Status Area to view system messages about the actions that you perform.
Navigator
Helper
Area
The Navigator view allows you to organize and select various files, project sets with great
flexibility. (A special folder is created during installation named MyModels (default). You can
use this in any way you want. For example, to keep copies of models that haven’t been
mapped in any way.)
Seen above in the Editor Work Area is the default viewing arrangement for a map component
file in the Map Editor. The Map Component File merely lists the files for a map, and allows
WorkBench and the translator to group them together for activities. The pages provide a means
of stepping through various tasks to complete and test a simple map.
- The Map Definition Page allows you to view or modify the settings for the map component
file.
- The Mapping Page (such as shown here), is for linking source and target items, as well as
viewing and editing rules. The Source and Target Properties Pages list the attributes and
allow you to create them or edit existing ones.
- The Input Page allows you to view the input file, and the Output Page allows you to set up
and run translations, and view the results.
Notice at the bottom that there are various tabs which present various individual views
available in the Helper Area.
Navigator
Helper
Area
WorkBench Mapping 2-8
When you want to view just a model, or access special editing capabilities, the Data Model
Editor can be used. There are various sub-panels that you will likely re-arrange depending on
your task. The Data Model Editor view also has a few different tabs (pages) you may use.
Seen here is the Overview Page which allows you to edit the general model definition, structure,
individual item attributes, and the rules. The Properties Page is like the Properties Pages in the
Map Editor, listing and allowing you to edit all the item attributes. The Model Text Page allows a
full text (color-coded) view of the model, with full editing capabilities. (Note: This page should
only be used after significant experience understanding the structure of models and mapping.)
We’ll start out using the default settings of the views and the Mapping Perspective. The tasks
here are typical things a user might do to rearrange their screen according to their preference.
(Note: If you maximize a view, you may not know the other views are still open “behind” it.
This might be especially true if you re-dock a view and then maximize.)
Stack
Restricted
Fast View
Detach
WorkBench Mapping 2 - 10
You can move a single view, or a group of views (tabs) that are in a view area together. You
can drag a view to the top, left, bottom, or right of any of the other areas. You can also drag it
off the Workbench window to detach (undock) it.
Drop Cursors
If the mouse button is released when you see a:
Dock above cursor, the view appears above the view underneath the cursor.
Dock below cursor, the view appears below the view underneath the cursor.
Dock to the right cursor, the view appears to the right of the view underneath the cursor.
Dock to the left cursor, the view will appear to the left of the view underneath the cursor.
Stack cursor, the view appears as a tab in the same pane as the view underneath the cursor.
Restricted cursor, the view will not dock there. For example, a view cannot be docked in the
editor area.
Fast View cursor, the view will appear in the Fast View area toolbar.
Detach cursor, the view will appear as an undocked window.
If you change your mind while the Move command is active, you may simply hit the <Esc> key,
and the view will remain in it’s starting position.
NOTE: If you place the view somewhere you don’t want, or accidentally Detach it, or Close it,
and you want to quickly restore things back the way they were, select Window Reset
Perspective.
WorkBench Mapping 2 - 10
More About WorkBench Views (continued)
• Examine a view
(Right-click the tab):
WorkBench Mapping 2 - 11
There are dozens of features available in the Eclipse platform for working with Views and
Perspectives. Examining the Navigator view will show some unique features as well as
demonstrate quite a few of the options available with most views.
Some features generally available in views can be seen by right-clicking the view tab to access
the context menu:
Fast View - This will reduce the view to an icon at the lower left corner of the WorkBench
window. The same thing can be accomplished for most views by drag-and-dropping the view to
the Fast View area. The Fast View allows you to quickly re-open the view to make a selection.
It will automatically “hide” itself again, once you have finished.
Detached - You may undock the view and manipulate it independently of the WorkBench
window.
Move (View or Tab Group) - You may relocate the view to a different area of the WorkBench
window. The same can be accomplished by simply clicking the view header, and dragging.
Drop cursors (arrows and folder icons) appear to indicate the positioning that will result when
you release your mouse button.
Size - This option lists the sliders available, and will put a focus on whatever slider you choose
to resize the view.
Window features (Minimize, Maximize, Close) - These features allow you to change how much
of the overall WorkBench window this view will fill. Double-clicking a title bar will maximize
that view. Right-click scroll bars to quickly jump to the ends. Type in letters to jump the focus to
the first objects appearing in the list with those characters.
The color of an editor tab: Blue - Indicates that the editor is currently active (above, Navigator).
White - Indicates that the editor was the last active editor (above, Console).
WorkBench Mapping 2 - 11
More About WorkBench Views (continued)
WorkBench Mapping 2 - 12
All Views can also be minimized (including the Mapping/Editor Area). They will retreat to the
nearest border as a grouped set or single icon, along with a Restore icon. The minimized view-
bars can be relocated to any of the other borders.
WorkBench Mapping 2 - 12
• Demonstration 1
– Basic Workbench Navigation
– Data Model View
– Properties
WorkBench Mapping 2 - 13
WorkBench Mapping 2 - 13
Understanding Data Models
• Data models define your input and output data file structures.
Source
data
model
WorkBench Mapping 2 - 14
Here the Data Model Editor view is maximized, and slightly rearranged. (The other views have
been automatically converted to fast-views.) There are four data model items (DMI’s) used to
describe the structure of the input data in the source data model and the structure of the output
data in the target data model. We’ll tell you more about these DMI’s shortly.
Both the input (source) and output (target) data require data models. Usually, the input data
can be parsed (read into memory) using one source data model and the output can be
constructed using one target data model. However, in some cases, multiple source or target
data models are involved in a single transaction. These two types of data models also contain
actions (instructions) to be performed on the data to correctly map it from the source to the
target.
WorkBench Mapping 2 - 14
Open an Existing Model
WorkBench Mapping 2 - 15
There is also the option to open the model as Open With Map Editor. This allows you to
begin creating a Map Component File with an existing model. You may make edits on the Map
Definition Page.
WorkBench Mapping 2 - 15
Open an Existing Model (continued)
WorkBench Mapping 2 - 16
WorkBench Mapping 2 - 16
Understanding Data Models (continued)
Tag
Group
Container
WorkBench Mapping 2 - 17
WorkBench Mapping 2 - 17
Understanding Data Models (continued)
Group Item
Tag Item
Data Items
Tag Item
Data Items
WorkBench Mapping 2 - 18
There is a hierarchical relationship between data model items. The hierarchical relationship
determines the processing order of the data model items. You can identify the hierarchical
relationship between data model items by their level of indentation, and the lines helping
further identify the “tree-branch-leaf” relationships.
Simplistically, the above structure could be seen in a text form similar to:
Initialization {}
Document_Loop {
Record_10 {
Partner_Id {}
Next_Item {}(etc.)
} (end Record_10)
Record_15 {
SCAC_Code_Qualifier {}
Next_Item {}(etc.)
} (end Record_15)
} (end Document_Loop)
WorkBench Mapping 2 - 18
Understanding Data Models (continued)
Initialization DocumentLoop
(Group item) (Group item)
Record_10 Record_15
(Tag item) (Tag item)
WorkBench Mapping 2 - 19
WorkBench Mapping 2 - 19
Understanding Data Models (continued)
Initialization DocumentLoop
Parent_A
– Each child
may also be the Record_10 Record_15
Child_A1
Parent_B Child_A2
Parent_C
parent of other
data model
items.
WorkBench Mapping 2 - 20
Notice that a data model item can be a child of one data model item, and a parent of another
data model item. Multiple data model items organized one level below a parent item are called
siblings.
WorkBench Mapping 2 - 20
Understanding Access Models
WorkBench Mapping 2 - 21
WorkBench Mapping 2 - 21
Understanding Access Models (continued)
WorkBench Mapping 2 - 22
Understanding Access Models (continued)
• For viewing an access
model, AI provides an
editor
– Color-coded
– Cursor position
– Status
WorkBench Mapping 2 - 23
If you want to see the content of any of the system access models, you can just double-click
one in the Navigator, and an Access Model Editor will open it for your viewing in a read-only
state. The contents of a couple of commonly-used access models are worth taking a look at.
For example, OTFixed.acc is designed to handle most fixed-length data. Here is an excerpt:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Fixed Length Records
;;;
Rec_Code = ? ^(([' '..'~']) {0 .. 30}) ?
FixedLgthRecord = (%Rec_Code) ^(TAG) ?
FixedLgthDefaultRecord = (%Rec_Code) ^(RECORD) ?
LineFeedDelimRecord = (%Rec_Code) ^(TAG) (LineFeed)
;The following will write out any optional fields with spaces.
LineFeedDelimDefaultRecord = (%Rec_Code) ^(RECORD) (LineFeed)
LineFeedDelimContainer = ? ^(CONTAINER) (LineFeed)
VariableLgthRecord = (%Rec_Code) ^(TAG) (RecordDelim)
WorkBench Mapping 2 - 23
Understanding Access Models (continued)
• If you need a unique
access model, you
can use AI’s editor
– Syntax check
– Change markup
(original overlay)
– Macro Recording
– Problem reports
– Status
WorkBench Mapping 2 - 24
Nearly every data structure you need to translate will have an adequate Access model
provided in the OT*.acc files. If not, Application Integrator has an editor to help you create your
own. By studying existing access models, you can “borrow” ideas for your own. Most likely,
you would copy an existing system access model, and rename it for making your edits in the
new file.
Included in the helpful features for most of the Workbench Text Editors are markups for
changed lines, where the original values can be seen by moving your mouse over the marking.
Lines with incorrect syntax are “decorated” and reported in the Problems view. Macros can be
created for repeatable editing tasks. Right-click in white space for one context menu; right-click
on the ruler for an additional menu.
Some of the constructions for items can be quite complex. This editor should be used by
experienced mappers, and we would suggest attending an Advanced Mapping training course
prior to attempting to create complex item-type definitions.
To create a new access model with the Access Model Editor:
- Right-click in the Navigator
- Select New Other Simple File
After clicking the Next button, just name your file with a .acc extension.
WorkBench Mapping 2 - 24
Creating a New Map
WorkBench Mapping 2 - 25
We’re ready to look at how to create your own map. The map needs data models, and a map
component file to attach them together.
There are various ways to create a new data model. Here are a few:
• File menu New Data Model
• Right-click in the Navigator, New Data Model
…and, …
• Project button on the Toolbar (or menu commands), Model Files Data Model
When you already have existing models, you can tie them together in a map component file.
You can also create a new data model with the Map Component Editor.
• File menu New Map Component File
WorkBench Mapping 2 - 25
Creating a New Data Model
• Some ways to create a new
data model:
WorkBench Mapping 2 - 26
When creating models, you will see options for XPATH and XSL Stylesheet models. These
allow for special mapping with XML data. This type of mapping is covered in a separate
course. In this class, select Data Model.
WorkBench Mapping 2 - 26
Creating a New Data Model (continued)
WorkBench Mapping 2 - 27
This procedure describes how to create data models for application-formatted data.
Choose File New Data Model.
The new Data Model dialog appears.
Browse for the Parent folder directory. Enter the Data Model file name. Choose Source or
Target as appropriate. Choose EDI. Choose Next.
WorkBench Mapping 2 - 27
Creating a New Data Model (continued)
• Specify access model to be
used.
• Click on “Finish” to complete
the wizard.
WorkBench Mapping 2 - 28
WorkBench Mapping 2 - 28
Creating a New Data Model (continued)
• Workbench displays the new
data model in the Mapping
Area view.
• AI automatically creates
Initialization and Document
group data Items.
WorkBench Mapping 2 - 29
An Initialization item is an excellent example of a group-type item that doesn’t group and
doesn’t loop. It’s there as a control or “dummy” item. Most likely, by the time you finish your
maps, at least 80% of your maps will need an Initialization section. You may merely use it for
commentary or documentation for your map.
And, typically the data you are processing would be considered a document, or, group of
documents, so the main body of the model will be nested under a Document group.
Have you thought, “What if I’m editing, and I make some big mistake? Do I have to start all
over again?” Well, if you have saved, the last copy of your model will still exist, with a slightly
different extension: “*.md~”.
(There are other features and utilities that can help with file and version management. For
example, there is a History capture feature, which keeps snapshot copies of your models that
you can Compare to your current working copy, and retrieve prior content. There is also a
Concurrent Versions System (CVS) feature with which you can track and work with previous
versions of files in a Repository environment. We’ll tell you more details about these features
in the Helpful Features module.)
WorkBench Mapping 2 - 29
Understanding the Workbench Toolbar
Recalculate Go To
Offsets Insert Below
Cut Insert Above Collapse All
Copy
Expand All
Paste
Duplicate
WorkBench Mapping 2 - 30
The toolbar shown here is from the Model Editor view. Most of the icons are self-explanatory
for building structure and working within the structure’s tree.
When using Cut and Copy, you can use the Paste icon to place objects on the same model or
on different models. However, Duplicate makes an immediate copy, but does not store
anything on the clipboard, as Copy does. If working within one model, you can use the
Duplicate icon instead of Copy/Paste.
The Recalculate Offsets currently works in Model Editor, and is not yet enabled for the Map
Editor (instead, Save, Close, re-open to recalculate).
The Check Syntax and Apply changes icons shown here are for the Model Text Page (in the
Model Editor View). If you try to use them in the Overview Page, the status bar will report to
you that you only use those icons on that page.
WorkBench Mapping 2 - 30
Creating Data Model Items
WorkBench Mapping 2 - 31
Just as there are various ways to create data models, there are also a few ways to enter new
data model items. Probably the main way is working with the mouse and toolbar in the
Overview Page (in the Model Item Editor, the Model Items panel).
WorkBench Mapping 2 - 31
Creating Data Model Items (continued)
WorkBench Mapping 2 - 32
As an alternative to entering attributes using the Model Item Editor of the Overview Page,
Workbench provides an attributes editor on the Properties Page that lets you edit all DMI’s
attributes in a spreadsheet format. You may find it more efficient to create the complete
structure of your data model (leaving attributes undefined) and then define DMI attributes for all
data model items using the Properties Page. In the Properties Page, with a spreadsheet-like
look, you may use the mouse and toolbar, and keyboard strokes.
Here is some additional information to help you use the Properties editor:
• You can increase or decrease the width of the attribute columns by using the sliders between
the column labels.
• You can navigate horizontally and vertically through columns and rows by using the arrow
keys.
If using the keyboard, you can either start typing, or, use the Enter key to select the cell you
have highlighted/navigated to, make your selection/entry, and hit Enter again. As you
navigate, the Status area will indicate attributes that are not applicable.
(Note: There Map Editor view also has an attributes editor on its Properties Pages, one each
for source and target models.)
WorkBench Mapping 2 - 32
Understanding Data Model Item Attributes
WorkBench Mapping 2 - 33
You can single click to select a cell for editing. Use your mouse in this editor to navigate.
WorkBench Mapping 2 - 33
Understanding Data Model Item Attributes
(continued)
…or,
– the Properties tab editor…
WorkBench Mapping 2 - 34
This Properties Page provides attribute editing for all the items in the model structure, shows
the hierarchy, and, the Workbench Toolbar can be used on this screen as well as the Overview
screen. Here, you can also use the <Enter> key to select a cell for editing and to complete your
editing in that cell. Remember to use the arrow keys to navigate. (This screen is also
available in the Map Editor view.)
When changes have been made to the file represented on the view’s tab, an asterisk will
appear next to the filename.
WorkBench Mapping 2 - 34
Understanding Data Model Item Attributes
(continued)
WorkBench Mapping 2 - 35
WorkBench Mapping 2 - 35
Understanding Data Model Item Attributes
(continued)
WorkBench Mapping 2 - 36
WorkBench Mapping 2 - 36
Understanding Data Model Item Attributes
(continued)
• Recalculate Offsets
– In Data Model Editor
– Not In Map Editor (Save, Close, re-Open)
• Offset Coloring
WorkBench Mapping 2 - 37
WorkBench Mapping 2 - 37
• Demonstration 2
– Navigating.
– Understanding Attributes
– Insert new model items
– Create group, tag, and data items
– Promote and demote model items
– Change item attributes
– Explore item types and the Access Model
WorkBench Mapping 2 - 38
WorkBench Mapping 2 - 38
Understanding Map Components
WorkBench Mapping 2 - 39
When the translator is actively working, we call all the pieces it uses an “environment”. An
environment consists of components that control what data is to be translated, such as the
input/output files, the source and target data models, and the access models to be used.
The Map Component file simply lists the components of a map environment. The translator
needs to know what files to work with, and these are typically passed as a list inside the Map
Component File.
WorkBench Mapping 2 - 39
Understanding Map Components (continued)
• You create a Map
Component file (.att
extension) to define the
map components to use in
your translation
environment.
WorkBench Mapping 2 - 40
If your highlight in Navigator is on your default search directory (e.g., the “models” directory)
when the New Map Component File dialogue appears, it will automatically be designated in the
Parent Folder field. Otherwise, you will need to Browse to the desired directory.
The description/guide section (white area at the top of the dialogue) will give hints and
warnings throughout the creation process. So, if the Next button is not available, check the
dialogue’s description information.
WorkBench Mapping 2 - 40
Understanding Map Components (continued)
• Choose Traditional Model
(default).
WorkBench Mapping 2 - 41
There are various model types available. In this class, we will work with Traditional Models
(EDI and Application data mapping).
Creating a new Map Component File is also an alternative way of creating a new Data Model.
WorkBench Mapping 2 - 41
Understanding Map Components (continued)
• If Browsing for existing models
– Provide a pattern for
searching.
– Select the filename
– Select OK.
WorkBench Mapping 2 - 42
If the model(s) you need for your map already exist, you can Browse to find them. The Browse
dialogue allows a search of the entire workspace according to your provided pattern and the
file extension “.mdl”. The matching models are shown in the top window, and the folders found
containing models with the pattern are listed below.
NOTE: As you select a specific model in the Matching Resources window, it’s possible that
more than one directory will show in the Folders window – take heed! This is an indication you
have more than one copy of this model with the same name. This can cause problems when
you go to translate!
NOTE: You may be aware of files that exist in some of your subdirectories – you can even see
them in Navigator – that won’t show up in the Browse dialog. This would mean that
Workbench’s Model Search Order isn’t aware of your subdirectory. If you want to use one
such file, you will need to type the name in manually, and then replace the one created by the
dialog with your desired copy from your subdirectory. (Other options are, Cancel your task,
and update Model Search Order, or, move a copy of your file into a directory already known to
Model Search Order.)
WorkBench Mapping 2 - 42
Understanding Map Components (continued)
• Select the appropriate
Access models
WorkBench Mapping 2 - 43
If you started your creation process with the highlight on your default directory (e.g., “models”),
then the drop down will be populated with the system access models descriptions. Otherwise,
you will need to Browse to the appropriate folder, and select the access model by filename.
WorkBench Mapping 2 - 43
Understanding Map Components (continued)
• Provide helpful comments
• Select Finish.
WorkBench Mapping 2 - 44
The entries on this screen aren’t necessary. They could be provided later, or, not at all.
You might want to make a habit of providing comments. A time-date entry, and your initials,
followed by a brief description of the map’s purpose are usually very helpful, especially as you
accumulate environments.
If you already have a test data file and want to use this exclusively right now, you can “hard-
code” the filename into the environment. This means, every time a translation is run with this
map component file, your specific data file will be used. To arrange this, you need to know
about “Environmental Variables”.
Environmental variables are one way that AI can carry values that it will always need for a
translation, but, those values, and even their sources, can vary from one translation to another.
We will go into more detail about variables later.
AI has some reserved environmental variables. The correct Environment Variable to provide to
the translator so it can identify the data file:
INPUT_FILE (variable names are case-sensitive)
You may also provide the desired output filename as OUTPUT_FILE.
When you select Finish, Workbench will open the Map Component File editor with the focus on
the Mapping tab.
WorkBench Mapping 2 - 44
Understanding Map Components (continued)
• If you had typed in the name of a model that did not exist, Workbench
will offer to create it for you.
WorkBench Mapping 2 - 45
WorkBench Mapping 2 - 45
WorkBench Mapping 2 - 46
Here you may view or make changes to the Source Data values, Target Data values (be
selecting the Browse buttons), Environmental Variables, and Comments. You can modify any
existing values or add values. To delete values, see the next slide.
Note: When opening an existing Map Component file, Workbench will first look in the .att file’s
directory for the models listed. Then it will look in other directories, according to the priorities
set in Preferences (Application Integrator, Views Preference Page). However! This is *not*
true of the translator. The translator will look for the first instance of the model it finds
according to the Preferences search order, not the same directory as the .att file.
WorkBench Mapping 2 - 46
Understanding Map Components (continued)
• To remove a Map
Component file
entry
– Click the desired
“Clear” button
WorkBench Mapping 2 - 47
If you want to remove either the Source or Target models from the .att file, simply click the
appropriate Clear button.
You can, of course, edit the text of the Map Component file for any modifications you desire (be
sure to maintain the correct syntax), but, this method should be used by experienced mappers.
If you wish to edit (in a text editor) a map component file:
1. Highlight the map component file in the Navigator and right mouse click
2. Select Open With Text Editor
3. Map component file will be displayed in a text editor
4. Make changes (e.g., delete lines), Save (save icon), and Close
5. Highlight the map component file and right mouse click
6. Select Open With Map Editor
7. Map component file will be displayed in the Map Editor
WorkBench Mapping 2 - 47
• Demonstration 3
– View a Map Component file
– View Source and Target structures and
attributes
– Create a new Map Component file.
WorkBench Mapping 2 - 48
WorkBench Mapping 2 - 48
Naming Conventions for Map Components
WorkBench Mapping 2 - 49
*Note: When using public standard EDI messages, the Application Integrator generic
processing method is normally invoked. Basically, this means that the suffix “.att” is added to
the base filenames before attaching the map component file to the translator. Although the
translator does not require file extensions of “.att”, the generic method does. So, it is
recommended that you use the extension “.att” in all map component file filenames.
WorkBench Mapping 2 - 49
Naming Conventions for Map Components
(continued)
WorkBench Mapping 2 - 50
WorkBench Mapping 2 - 50
Mapping Data Items with MapBuilder
WorkBench Mapping 2 - 51
Note: When you maximize the Mapping View, the Navigator and Helper views are hidden. If
you want to be able to access these quickly, and not toggle the size of the Mapping View,
you should consider making these Fast Views. You may do so by either:
- Drag-and-Drop the tab to the Status Area
- Right-Click on the tab and select Fast View
Our recommendation:
1. Drag-and-drop the Navigator tab down to the left of the Status Area to quickly convert it to
Fast View. (This automatically extends the Mapping Area across the width of WorkBench.)
2. Suggested option a: Minimize the Helper View. (This will give access to all the Helper tabs
at once. An alternative is to make them all Fast Views, and we don’t think this is the most
useful arrangement.)
3. Suggested option b: Really, this would be a more helpful arrangement when inserting
special rules, rather than merely drag-and-drop mapping. Make a couple of the most useful
Helper tabs into Fast Views. Drag-and-drop the Message Variables and/or Built-In tabs
from the Helper Area to the Status Area, making them Fast Views. Or, you may prefer to
Detach one of them, such as the Built-Ins. Then maximize the Mapping View (or minimize
the Helper view).
WorkBench Mapping 2 - 51
Mapping Data Items with MapBuilder
(continued)
WorkBench Mapping 2 - 52
WorkBench Mapping 2 - 52
Mapping Data Items with MapBuilder
(continued)
WorkBench Mapping 2 - 53
WorkBench Mapping 2 - 53
Mapping Data Items with MapBuilder
(continued)
• To delete
mapping
rules:
– Select the
link line
and right-
click.
– Choose
Delete
Link.
WorkBench Mapping 2 - 54
Note: If you have trouble seeing the default link colors, or would simply like them to be
different, see the section on Preferences (following pages).
WorkBench Mapping 2 - 54
Understanding Loop Control
• As you drag-and-drop, MapBuilder may create loop control links.
Link for
loop control
Links for
defining items
WorkBench Mapping 2 - 55
MapBuilder evaluates whether or not Loop Control is needed. If so, MapBuilder will draw a link
between the looping parent items. Usually, the link lines will have two colors, depending on
how you have Preferences set. We’ll discuss Loop Control more extensively in a later section.
WorkBench Mapping 2 - 55
Removing Loop Control Rules
• To remove loop control rules:
– Select the Loop Control link and right-click.
WorkBench Mapping 2 - 56
Note: If you have trouble seeing the default link colors, or would simply like them to be
different, see the Preferences topics (following pages in this section).
WorkBench Mapping 2 - 56
Generating Report Listings
• You can
generate a
listing of
DMI's (and,
optionally,
rules) in a
data model
from
Workbench:
– Utility
Report
Data
Model
Listing
WorkBench Mapping 2 - 57
While your are in work on your mapping project, and, once you are done, you may find it
helpful to have available a “hardcopy” of what your models look like. WorkBench comes with a
Report utility for generating listings of your data models and rules. Two reports are available in
Workbench.
The Data Model Listing reports the data models items, and, optionally, the rules for a given
model.
WorkBench Mapping 2 - 57
Generating a Data Model Listing
• You can also generate a Data Model Listing using some system
report models provided.
WorkBench Mapping 2 - 58
You may also script runs of these listing reports using system models provided:
Data Model Report:
otrun -at OTRpt.att -cs %OT_QUEUEID% -DREPORT=OTmdl.att
-DA=<data model> -DB=<rules yes/no>
-DSESSION_NO=<base portion of file> -I
(When running from the command line in UNIX, use inittrans instead of otrun.)
where:
<data model> - The data model the report is to be run against.
<rules yes/no> - Whether rules are to be included in the report.
<base portion of file> - Base portion of the output filename. The extension .rpt will be appended
to the output file.
WorkBench Mapping 2 - 58
Generating Report Listings (continued)
• You can
generate a
listing of
mapped DMI's
and their
variable
assignments
between a
source and
target model of
Workbench:
– Utility
Report
Source to
Target Map
Listing
WorkBench Mapping 2 - 59
The Source to Target Map Listing reports the mapping between a source data model and a
target data model.
WorkBench Mapping 2 - 59
Generating a Source to Target Map
Listing
• You can also generate a Source to Target Map listing using the
system models provided.
WorkBench Mapping 2 - 60
WorkBench Mapping 2 - 60
• Demonstration 4
– Map data items using MapBuilder drag-
and-drop
– View Data Model listing
– View Source to Target Model map listing.
WorkBench Mapping 2 - 61
WorkBench Mapping 2 - 61
Understanding Preferences (continued)
• Workbench and MapBuilder operating parameters are defined in
Preferences.
• To view Preferences:
– Window menu Preferences
WorkBench Mapping 2 - 62
Note: Click the Apply button on each screen when you are making changes.
WorkBench Mapping 2 - 62
Understanding Preferences
• Advanced
Settings
Preference
Page
specifies
recursion
level and
undo limit.
WorkBench Mapping 2 - 63
Here we discuss Preferences settings as they relate to mapping. In the Preferences dialogue,
the Application Integrator tree contains some pages that we might use to reconfigure our tools.
(The other categories, such as General items, will not be covered in this class.)
The Maximum Schema Recursion Level is considered an advanced setting because of its
impact. The default is 2; if you specify higher recursion level, WB has to exponentially make
sure that the recursive nodes are unique. This is almost never necessary, and, this process will
temporarily consume more CPU time than you need it to take. For work with XML files (another
class).
Schema Builder - Also for work with XML files (another class)
Undo settings - The history limit and confirm settings are found on this page.
Model Indentation – Some like model text indented, some don’t.
NOTE: If working with very large traditional models, it is advisable to add “-Xmx512M” to the
wb.bat file. For example, the command:
"C:\Trandev50\WB50\WorkBench.exe -vm "C:\j2sdk1.4.1\bin\javaw.exe" -cs localhostv -bp
5551"
...would look like this:
"C:\Trandev50\WB50\WorkBench.exe -vm "C:\j2sdk1.4.1\bin\javaw.exe" -cs localhost:dv -bp
5551
-vmArgs -Xmx512M"
(512M is 512 Mb of system memory, and, may be increased depending on need and
availability.)
WorkBench Mapping 2 - 63
Understanding Preferences (continued)
• Macro
Definitions
Builder Page
specifies:
– User-defined
Macros
– Edit
– Import/Export
WorkBench Mapping 2 - 64
WorkBench Mapping 2 - 64
Understanding Preferences (continued)
• Map Builder Page
specifies:
– Link color preferences
– Right to Left Tree
option (Target only)
WorkBench Mapping 2 - 65
The Map Builder Page shows preferences for the Attachment (map component) editor, which
basically allows you to change some of the ways this view appears on the Mapping tab screen.
Preferences for Attachment editor Descriptions
Link Color Click on the button to open the color pallet. Select a color for the
MapBuilder drag-and- drop link lines.
Selected Link Color Click on the button to open the color pallet. Select a color for the
MapBuilder selected link.
Loop Control Link Color Click on the button to open the color
pallet. Select a color for the Loop
Control link lines.
Right to Left Tree for Target Yes – Target model is displayed Right
justified in the Mapping Editor. See .
No – Target model displayed left justified.
Note: Remember to Click the Apply button on each screen you make changes.
WorkBench Mapping 2 - 65
Understanding Preferences (continued)
• Map Builder
Preferences Page
specifies:
– Link type
– Variable type
– Variable name
setting
– Function
Assignment
preferences
– Loop Control
preferences.
WorkBench Mapping 2 - 66
The Map Builder Preferences Page allows you to change some of the more advanced default
settings that Map Builder uses. Most of these settings are best left in their defaults unless you
have specific data requirements or map designs that make sense to change them.
• Use the Link Type “Tag to Defining” unless you have determined that your data
structure definitions require the Defining to Defining usage. Use the “Array” Variable
Type unless you want to use a value multiple times on the target in non-looping
sections. Use the “Both” Variable Name selection unless you are using multiple copies
of the source or target for different maps.
• Use Automatic Function Assignment unless you have specifically determined that the
default rules for managing translations between fixed-length/variable length data do not
apply to your mapping situation.
• Use the “Automatic” option for Loop Control unless your looping structures are varying
and/or complex between the source and target models.
WorkBench Mapping 2 - 66
Understanding Preferences (continued)
• Map Builder Preferences Page specifies (continued):
– Link type
– Variable type
– Variable name setting
WorkBench Mapping 2 - 67
WorkBench Mapping 2 - 67
Understanding Preferences (continued)
• Map Builder Preferences
Page specifies (continued):
– Function Assignment
preferences
– Loop Control
preferences.
WorkBench Mapping 2 - 68
WorkBench Mapping 2 - 68
Understanding Preferences (continued)
• Server Connection Preference Page specifies control server
connection details.
WorkBench Mapping 2 - 69
WorkBench has the option of using a remote site for control server access and/or file storage.
Most of the time, you will specify this information during the installation of WorkBench. Here
you can set up the options, if they have changed since installation. Typically, the development
environment will use the localhost setting.
Note: The installation directory of the host is also typically the default path that AI uses for
input and output files.
Note: You may also access these settings by right-clicking on the “Connected” message on
the status bar.
WorkBench Mapping 2 - 69
• Views
Preference
Page
specifies
options for
model
editing
details.
WorkBench Mapping 2 - 70
WorkBench Mapping 2 - 71
WorkBench Mapping 2 - 71
Module Review
WorkBench Mapping 2 - 72
WorkBench Mapping 2 - 72