Using the BizTalk mapper activity in AppFabric workflows

Introduction

As described in the post of Richard Seroter, (http://seroter.wordpress.com/2010/05/24/using-the-new-biztalk-mapper-shape-in-a-windows-workflow-service/) there is a nice new feature that gets installed through the released beta of BizTalk 2010.  Two capabilities of BizTalk Server are made available to WF 4.0!  This is about the BizTalk mapper and the Line of Business adapters (like SQL, Oracle, SAP…).

These features are described in the following wiki white paper on the social technet site : http://social.technet.microsoft.com/wiki/contents/articles/biztalk-appfabric-better-together.aspx.

This is a first article in a series of three that is about these features.  Three articles will be posted in the coming days:

1.       Using the BizTalk mapper in Workflow

2.       Using the LOB Adapter functionality in Workflows

3.       Performance impact of the mapper shape, compared to code mapping.

The BizTalk mapper used in workflow services.

It happens a lot that data structures that are exposed through web services are different from the contracts and object types that need to be consumed by that service. 

During one of the demos I gave lately, I showed how an AppFabric workflow service was used to compose and consume three different other web services.  Allthough the customer really liked the pattern and the performance, he felt it was a bit too technical and too much code was involved to instantiate the web service requests and objects for the different services.  They were right (I needed to use too much assign shapes and different variables).

Luckily, we have a good answer to this at this moment, through the BizTalk mapper workflow activity.  It makes these workflows more model-driven and less code-oriented.

Installing the activities

It is important to know that the activities are only available in the Workflow designer toolbox, when installing the BizTalk LOB Adapter pack!  They are not part of the BizTalk 2010 installable and it looks like the installer of the adapter pack is checking if BizTalk 2010 is available to see if he should make the activities available.

Sample workflow service

The scenario I’ll be working out in this post is the exposing of a service that will call another web service.  This service will implement some specific logic and will also hide and abstract the actual names and contracts of the ‘backend-service’.  The functionality we provide through this service is a loanrequest, where a consumer can request a loan and gets response with a result. 

The exposed contracts

<to do : copy contracts  />

Designing and beginning the workflow service

1.       After adding a new workflow service, I changed the action and namespace on the ReceiveRequest activity. 

2.       I also defined two variables: loanRequest and loanResponse that apply to their corresponding DataContract message types.  These are linked to the ReceiveRequest and SendResponse activities.

Adding a service reference to the ‘backend service’.

1.       Right-clicking the project and selecting Add Service Reference, pops up the dialog where I am linking to the WSDL of my web service.
 

2.       After a rebuild of this project, a new custom activity is added to my toolbox that can be used to call the web service operation.  If my web service would have had multiple operations, multiple activities would have been added, one for each operation.  They totally hide the implementation of doing this web service call.

 

3.       Now, two new variables get defined that represent the request and response to the backend service.  (notice the uppercased host-like names J)
 

4.       Dragging the LOANSIM activity to the designer canvas allows us to link the variables to the Activity Parameters of this web service operation call.

 

Use the BizTalk mapper activity to map request and response variables

1.       The Mapper activity is available in the BizTalk category in the Workflow Toolbox.  I just dragged two instances of this activity to the canvas, just before and after the LOANSIM activity.

2.       Once the mapper is dragged to the canvas, the input and output data types need to be configured, using the type picker dropdown.  This will be used to define the BizTalk map inputs and outputs.

 

3.       After this, the correct variables need to be linked and configured to their corresponding parameter.

 

4.       Clicking the Edit button on the activity, allows us to automatically generate a new BizTalk map that will use these types or we can reuse an existing map.

 

 

5.       Creating a new map, results in a new Biztalk mapper being opened.  Various schemas are being generated and added to the project in a specific sub folder.  The nice new BizTalk mapper can be used to make the mapping between both objects.  If required, custom XSLT functionality can also be used for this.

 

6.       The above logic has been done for both the request and the response messages.

Resulting workflow

 

 

 

 

 

 

 

ACSUG June Meeting – BizTalk High Availability with Lloyd Lim

ACSUG June Meeting – BizTalk High Availability with Lloyd Lim

The next ACUSG meeting is confirmed for Thursday the 24th of June at 5:30pm (presentation starts at 6:00pm). Don’t forget to register if you are attending. Free drinks and pizza as always! BizTalk High Availability Location: Datacom Systems Limited, 210 Federal Street, Auckland CBD, Auckland, 1141. Parking on the street around Datacom. There is also […]

Videos & Feedback on the new features of BizTalk Server 2010

It’s been about 10 days since we have launched the Beta version of BizTalk Server 2010 together with the Windows Server AppFabric RC. The virtual launch site includes a 4 new videos of recorded demos that you can get access to only if you pick the BizTalk technology stands and bring the videos play list. to make sure you discover them here are the direct links to these videos:

  • BizTalk and AppFabric Integration – using the Mapper and LOB Adapters within Workflow Designer  
  • Using the new BizTalk Mapper to create new maps (new features: search, predictive matching, “move to page” and enhanced functoid configuration)
  • Using the new BizTalk Mapper to modify an existing map (new features: search, sibling coalescence, copy/paste of functoid, noise reduction enhancement)
  • Using the new setting dashboard to fine tune BizTalk performance (includes: examining settings, modifying setting per host, exporting and importing settings)

 

The release of BizTalk 2010 Beta version has promoted BizTalk MVPs and technical Microsoft experts to blog about their feedback and experience with it. Some of them have been test driving BizTalk CTP for a few weeks now.

They have provided quick reviews of their most favorite these features. You may want to take a look at these blog entries:

If you have not done so it is not too late to start evaluating BizTalk Server 2010 Beta.

Join the party Today!

Technorati Tags: BizTalk,BizTalk Server 2010 Beta,Videos,Demos,Feedback

Short, Self Contained, Correct (Compilable), Example

Hi all

Frequently I get emails from people looking for my help with some BizTalk challenge
they are facing. Some times I just get a zipped version of a project containing schemas
and other artifacts that don’t even have anything to do with the issue – it was just
easier to send the entire thing and hope that I can figure it all out.

So here comes a plea from me to all you people looking for help: Please, when you
send someone an email asking for help, prepare an SSCCE (See more here: http://sscce.org/).

I have plenty of things to look at, so if you take the time to prepare an SSCCE the
chances of me helping you increases by a multitude of 10 🙂

Thanks!



eliasen