Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

Merging Map Pages

One of the questions I was recently asked in the seminar we gave in NY a few weeks ago is whether it is possible to merge links and functoids from multiple pages into one page in the BizTalk mapper (without having to delete and redefine). I never came across such a request but my first reaction was to edit the xml source of the .btm file and it was really easy to get around. The schema is pretty simple defining source and destination schemas, pages, links and functoids.  Moving the links and functoids around is just a matter of copying them under the target page.

In summary, all you have to do is Right-Click the map in your solution explorer and select “open with…”, select the standard VS XML editor and you’re all set.

My source xml looks like:

  <Pages>
    <Page Name=Page 1>
      <Links>
        <Link LinkID=1LinkFrom=/*[local-name()=’&lt;Schema&gt;‘]/*[local-name()=’Customer’]/*[local-name()=’CustomerId’]LinkTo=/*[local-name()=’&lt;Schema&gt;‘]/*[local-name()=’Order’]/*[local-name()=’Header’]/*[local-name()=’Customer’]/*[local-name()=’CustomerId’]Label=“” />

      </Links>
              <Functoids/>
    </Page>
       <Page Name=Page 2>
              <Link LinkID=6LinkFrom=1LinkTo=/*[local-name()=’&lt;Schema&gt;‘]/*[local-name()=’Order’]/*[local-name()=’Header’]/*[local-name()=’OrderDate’]Label=“” />
              <Functoi
ds
>
                       <Functoid FunctoidID=1X-Cell=57Y-Cell=213Functoid-FID=125Functoid-Name=Date and TimeLabel=“”>
                             <Input-Parameters />
                       </Functoid>
              </Functoids>
       </Page>

  </Pages>

And changing it to the following merges the additional links and functoids on the same page:

  <Pages>
    <Page Name=Page 1>
      <Links>
        <Link LinkID=1LinkFrom=/*[local-name()=’&lt;Schema&gt;‘]/*[local-name()=’Customer’]/*[local-name()=’CustomerId’]LinkTo=/*[local-name()=’&lt;Schema&gt;‘]/*[local-name()=’Order’]/*[local-name()=’Header’]/*[local-name()=’Customer’]/*[local-name()=’CustomerId’]Label=“” />

        <Link LinkID=“6” LinkFrom=1LinkTo=/*[local-name()=’&lt;Schema&gt;‘]/*[local-name()=’Order’]/*[local-name()=’Header’]/*[local-name()=’OrderDate’]Label=“” />
      </Links>
              <Functoids>
                       <Functoid FunctoidID=1X-Cell=57Y-Cell=213Functoid-FID=125Functoid-Name=Date and TimeLabel=“”>
                             <Input-Parameters />
                       </Functoid>
              </Functoids>
    </Page>
  </Pages>

I already started writing a visual studio 05 add-in that gives the ability to move links and functoids between map pages as well as merge pages and will post it when done.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>