Click here to Skip to main content
Click here to Skip to main content

Tagged as

Roles, Role-Links and Parties Revisited Using a Simple MailOrder Processing System

, 6 Dec 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
A simple mail order company case solved using Roles and Parties

Introduction

I have noticed that BizTalk role-links are not used by developers due to the lack of understanding about it. This article attempts to allay the fears of using role-links in BizTalk. Role-links are not BAS and need not use BAS.

Case Study: A Mail-Order Company

Scenario

A mail order company sends several packages to different destinations. The mail order company uses several shippers for this purpose. For example FEDEX, UPS and USPS. Every shipper covers certain destination Zip codes due to proximity of the airports or special delivery processes. The Shippers destination zip code coverages keep changing during different seasons (spring/summer/fall/winter).

MailOrderCompanyCase.PNG

Conditions

The zip codes covered by the various shippers keep changing due to various conditions.

Problem to be Solved!

  1. Design a system where the Zipcode assigned to shippers can be easily changed without storing the specific shippers information.
  2. Adding a new shipper can be done easily.
  3. Adding a new delivery zipcode to an existing shipper.

What is a Role?

A Role in BizTalk parlance comprises of a port-type using which all the messages are sent out from an orchestration. Using one role, several parties can be attached to it. In the case under consideration, we have a Shipper role and several parties (FEDEX, UPS and USPS) attached to it.

Role.PNG

What is a Role-Link?

A role-link can be used to abstract a business process from an actual execution/delivery system. For example in the mail order system, the goal is to send a package to a customer, by hiring an intermediary, a shipper. Every shipper requires data to be sent in a certain format.

RoleLinks.PNG

What is a Party?

A Party is an entity or a business or an enterprise outside the boundary of BizTalk to which the data is transmitted. One must enlist a role-link with a party in order for it to work.

PartiesAndBP.PNG

Binding Party to a Role

When several Parties are bound to a Role, as in our case, the ZipCode field is compared in every party and the message is transmitted to the one which matches it.

BindPartyToRole.PNG

Understanding the ShipOrders Orchestration

The ShipOrders orchestration uses a Role-Link (ZipCodeShipper) and a Role (Shipper) to send the package ZipCode information to various Parties attached to its Role.

RoleLinkOrchestration.PNG
ZipCodeShipper(Microsoft.XLANGs.BaseTypes.DestinationParty) = 
    new Microsoft.XLANGs.BaseTypes.Party(MailOrderMsg.Body.ShippingZipCode, "ZipCode");

The party takes two parameters, the first is the name and the other is the qualifier. Notice how the destination party is set, by providing the zipcode value and the qualifier "ZipCode".

The Input XML

NOTE that the ShippingZipCode is the promoted field.

InputFile.PNG

Development Notes

Error: MailOrderProcessing: Destination party not found while attempting to send message 'MailOrderMsg' to (94553, ZipCode).

Resolution: This could happen when the shipper role does NOT have this Zipcode in its delivery list. One of the enlisted parties must have this ZipCode added, this could fix the issue.

Downloadable Code

The BizTalk Party configuration is left as an exercise to the developer.

References

Role Links Blog References

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Naveen Karamchetti
Architect AT&T Wi-Fi Services
United States United States
Naveen has done his Masters (M.S.) in Computer science, has started his career programming the mainframes and now has more than a decade of programming, development and design experience. Naveen has a sharp eye and keen observation skills. Naveen has worked for several companies and strived hard to build large scale business applications and bringing better solutions to the table.
Quite recently Naveen has built a fairly complex integration platform for a large bank. His hobbies include training, mentoring and research. Naveen spends his free time visiting National Parks nationwide.
 
Naveen has developed the BizTalk Control Center (BCC)
http://biztalkcontrolcenter.codeplex.com

Comments and Discussions

 
GeneralNeed some source for learind biztalk Pinmemberkollipara.raki29-Aug-13 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.1411023.1 | Last Updated 6 Dec 2011
Article Copyright 2011 by Naveen Karamchetti
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid