Using Role Links
You can group together a set of ports through which you will communicate with a business partner or other party—such as a supplier, a shipper, or an internal cost center—that functions cooperatively with your orchestration to carry out a well-defined interaction. If your role link represents a supplier, and you decide to change suppliers, an administrator can use BizTalk Explorer to make the change, and your orchestration does not have to be redesigned, recompiled, and redeployed.
A role link is an abstraction for the interaction between your orchestration and the external party, and the roles that each side plays. This abstraction of endpoints frees you to do such things as routing messages to different partners based on message content, or the results of a database lookup in your orchestration.
Here are the basic tasks you will need to complete to use role links in your orchestration:
- Create parties and ports and associate them with each other.
For information about how parties work, see Managing Business Processes Using BizTalk Explorer.
- Add role links to your orchestration and add the ports to the role links.
- Associate the ports with Send and Receive shapes.
- When your role link is configured as a "using" or "consumer" role link, you will also need to set a destination ID.
A role link is an instance of a role link type, which consists of either one or two roles.
For more information, see Role Link Wizard, Using Ports in Orchestrations, and Managing Business Processes Using BizTalk Explorer
Note You can refer only once to any given port type within a single role link type.
Note Since a role link type definition includes port types, the scope of the port type must encompass that of any role link type that uses it.
Note Configured ports placed inside of Role Links do not retain their associated binding information.
Roles
Roles are collections of port types, and each role either uses a service (as a consumer) or implements a service (as a provider). A role link can include either a uses or implements role, or one of each.
A uses role consumes the services provided by an implements role. When you define a role link with one or both of these roles, it is assumed that the complementary role is being fulfilled by the partner with whom you are linking. If a role uses a service, it sends a message to a party that implements a service; conversely, if a role implements a service, it receives a message.
Role link properties
A role link has a SourceParty property, a DestinationParty property, and an initiating role.
An initiating role specifies on which role the first communication occurs, and which will therefore initiate the role link by setting the value of the DestinationParty property.
If the initiating role is a consumer or uses role, you explicitly set the DestinationParty property (once and only once) in your orchestration.
If the initiating role is an implements role, the DestinationParty property will be initialized automatically by the receive.
The SourceParty property is read-only, and will be supplied through a trusted pipeline component based on the NT identity of the sender or a certificate associated with the message.
Initializing a consumer role link
To initialize a consumer or "uses" role link for a send action, you set the value of the DestinationParty, as in the following example, where ConfirmOrder is a role link, and PartnerName and OrganizationName are parameters of a party:
ConfirmOrder(Microsoft.XLANGs.BaseTypes.DestinationParty) = new Microsoft.XLANGs.BaseTypes.Party(PartnerName, OrganizationName);
This section contains:
To download updated BizTalk Server 2004 Help from www.microsoft.com, go to http://go.microsoft.com/fwlink/?linkid=20616.Copyright © 2004 Microsoft Corporation.All rights reserved.