Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

BizTalk 2010 Recipes : Orchestrations - Creating Branching Logic in an Orchestration

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
4/9/2011 4:45:55 PM

1. Problem

From within an orchestration, you would like to execute different processing based on the evaluation of available information.

2. Solution

A Decide shape is the equivalent of an If...Then...Else statement in standard programming. It allows you to direct different processing at runtime based on the evaluation of information. The following steps outline how to add a Decide shape to an orchestration and configure it.

  1. Open the project containing the orchestration.

  2. Open the orchestration.

  3. Select the Decide shape from the toolbox, and drag it to the appropriate location within the orchestration.

  4. Select the Decide shape, and update its properties.

    • Change the default name if desired.

    • Add a description if desired.

    • Set theReport To Analyst property. Leave the property as True if you would like the shape to be visible to the Visual Business Analyst tool.

  5. Select the rule branch named Rule_1, and update its properties (click it, and set its properties in the Properties window).

    • Change the default name if desired.

    • Add a description if desired.

    • Set the Report To Analyst property. Leave the property as True if you would like the shape to be visible to the Visual Business Analyst Tool.

    • Right-click the ellipsis next to the Expression property, and enter a valid Boolean expression for the rule.

  6. To add an additional rule, right-click the Decide shape, and select New Rule Branch.

NOTE

To delete a branch, right-click the branch, and select Delete. To delete the Decide shape, right-click the shape, and select Delete.

3. How It Works

Decide shapes can be used to complete different processing based on information available at runtime. The following is a simple example of using and configuring the Decide shape from within an orchestration. Assume you have a document as follows:

<Employee>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
<SSN>111-22-3333</SSN>
<State>Washington</State>
<HireDate>1999-05-31</HireDate>
</Employee>

From within an orchestration, you would like to complete different processing under the following scenarios:

  • The State is "Washington", and an SSN is provided.

  • The State is "Washington", and no SSN is provided.

  • The State is not "Washington".

To set up this different processing based on these three scenarios, you add a Decide shape to the orchestration and configure two rule branches and the else branch. For the first rule branch, define the expression to ensure the state is Washington and that a Social Security number was provided, as shown in Figure 1.

NOTE

To access schema nodes from within an orchestration, you must set the nodes as distinguished fields from within the schema editor.

Figure 1. First rule branch

For the second rule branch, configure the expression to ensure the state is Washington and that no Social Security number was provided, as shown in Figure 2.

Figure 2. Second rule branch

NOTE

Refer to the BizTalk help file for a complete list of valid operators in orchestration expressions. It uses what many refer to as ".NET Lite," which means only a subset of libraries are available for use.

The else branch will accommodate all other inbound documents where the state is not Washington. Figure 3 shows a completed orchestration with a Decide shape configured as described in this example. In this example, a document will be sent to different locations depending on whether the State is "Washington" and whether or not the document contains an SSN. If the State is not "Washington", no document will be sent. It is not required that the branch of a Decide shape contain any actions.

Figure 3. Decide shape orchestration example
Other -----------------
- SharePoint 2010 PerformancePoint Services : Examining Show Details Reports
- SharePoint 2010 PerformancePoint Services : Examining Decomposition Tree Reports
- SharePoint 2010 PerformancePoint Services : Reports - Strategy Map
- Windows Server 2008 R2 : Installing DFS (part 2) - Creating a DFS Folder and Replication Group & Configuring DFS Read-Only Replication
- Windows Server 2008 R2 : Installing DFS (part 1) - Creating the DFS Namespace and Root & Adding an Additional Namespace Server to a Domain-Based Namespace
- Windows Server 2008 R2 : File System Management and Fault Tolerance - Planning a DFS Deployment
- Windows Server 2008 R2 : File System Management and Fault Tolerance - The Distributed File System
- Windows Server 2003 : Creating Role-Specific Server Configurations (part 2) - Securing Infrastructure Servers & Securing File and Print Servers
- Windows Server 2003 : Creating Role-Specific Server Configurations (part 1) - Securing Domain Controllers
- Exchange Server 2010 Management and Maintenance Practices : The Exchange Control Panel
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer