09-28-04 01:15 PM
Hi,
the required xml provided is a little awkward for BizTalk to handle but
there are a number of ways of mapping it. In the original post not all
requirements are made explicit, specifically are the field "names" the only
ones? or are they merely representative of that could be there? I will assum
e
that there are a fixed set of 'name' values. I will also assume that the
source is flat, i.e. a simple list of data.
When those assumptions are valid, the simplest way of mapping this (in 2004)
is to use the Table Looping Functoid and the Table extractor functoid.
In the output (Globus) Schema - model the field as a record with a name
attribute and having content.
Add a Table looping functoid. The first input parameter should be the parent
node in the source schema (of the data). The second paramter could be 2 or 3
depending on how adventurous you are. For each source field, create 3 links
to the functoid:
1) from a logical existence functoid to the source field (if source fields
are optional)
2) create a constant with the name value (e.g. DR.ADVICE.REQD.Y.N )
3) a link from the data of the source field.
Then configure the table looping functoid, you should se three columns. The
first should be from the existence functoid, then check the box for use as a
present flag. The second should be from the constants. The third from the
data. Have as many rows as there are source data fields.
Add two table looping extractor functoids. Connect one to column 2 and link
it to the 'name' attribute. Connect the second from column 3 and connect it
to the 'fleld' element. The field element must have content or else it wont
map as the content of the field.
I will post a sample if I can.
The alternate ways are to use the scripting functoid options. I have run out
of time to show this but if there is a need for more advanced options I will
write some more.
Mark
[ Post a follow-up to this message ]
|