Welcome to MSDN Blogs Sign in | Join | Help

The corner store

Hi and welcome! Thanks for visiting my blog. The current blog content is directed towards BizTalk Server 2006. Even there, the primary focus is on Business Activity Monitoring (BAM) feature of BizTalk Server 2006. I would love to have your comments on my articles. Thanks - Vikas

Syndication

Tags

    No tags have been created or used yet.
TPE and multiple continuations

Note: This information applies to Tracking Profile Editor in BizTalk Server 2006

For most part now, it seems that creating single continuation [say, between two orchestrations] is a breeze for most developers. The part where TPE is not explicitly clear is the case of multiple continuations. The situation is typical as a BAM activity spans multiple receive ports, orchestrations and send ports. In order to collect the Business Activity Monitoring (BAM) data in one record, one has to setup continuations between all the BizTalk schedules. This turns out to be non trivial through the TPE UI, hence this posting to illustrate the case of multiple continuations.

Let's discuss some special cases. Let me lay out the general terms first. The case of one port OR one orchestration is a special case of many port and many orchestrations scenario. Lets deal with the ramifications of many port and many orchestration scenario. The different ways in which a message can be received and processed by orchestrations presents some interesting challenges and solutions. The scenario consists of a number of receive ports (R), orchestrations (O) and send ports (S). We use interchangeID context property as the glue to bind the continuations. You can, of course, use any other context property, activityID or anything else in place of interchangeID. The choice is immaterial to the problem at hand. I exclude the discussion on the data item/milestone/context-property-value being tracked from these ports and orchestrations. You would do that part of the mapping as per your business logic. Our target is to capture all BAM data from all the ports and orchestrations in a single row in the completed activity table .

A message arrives at exactly one of the R receive ports and gets processed by exactly one of O orchestrations. In this case, you will create a continuation folder on the Left Hand Side (LHS) activity tree view and map the interchangeID context property from the context property schema via "select event source"->"select context property" menu item. Next you will right click on the newly created interchangeID node on the LHS and select the ports to map from. In the select ports dialog box that comes up, select all N receive ports. Next you will create a continuationID folder on the LHS. You will open all O orchestrations, one at a time, and map the interchangeID context property from a shape in the orchestration. The mapping will look something like this:

- OrderProcess
    |- start_milestone
    |- end_milestone
    |- order_amount
    |- order_number
    |- order_item_number
    |- continuationR2O          [the continuation folder]
        |- interchangeID        [port mapping includes all R receive ports]
    |- continuationR2O          [the continuationID folder]
        |- interchangeID        [from O1]
        |- interchangeID        [from O2]
        .    .
        .    .
        |- interchangeID        [from Oo]
           

A message arrives at exactly one of the R receive ports and gets processed by each and every one of O orchestrations. This happens as the message is simultaneously and parallely sent to each of the O orchestrations. In this case, we would need O continuations. The mapping will look something like this:

- OrderProcess
    |- start_milestone
    |- end_milestone
    |- order_amount
    |- order_number
    |- order_item_number
    |- continuationR2O1         [the continuation folder]
        |- interchangeID        [port mapping includes all R receive ports]
    |- continuationR2O1         [the continuationID folder]
        |- interchangeID        [from O1]
    |- continuationR2O2         [the continuation folder]
        |- interchangeID        [port mapping includes all R receive ports]
    |- continuationR2O2         [the continuationID folder]
        |- interchangeID        [from O2]
    .   .     .
    .   .     .
    |- continuationR2Oo         [the continuation folder]
        |- interchangeID        [port mapping includes all R receive ports]
    |- continuationR2Oo         [the continuationID folder]
        |- interchangeID        [from Oo]


Now, let's discuss a CBR scenario. A message arrives at exactly one of the R receive ports and gets sent to exactly one of S send ports. This routing happens based on a context property value in the message. In this case, we would need one continuation. The mapping will look something like this:

- OrderProcess
    |- start_milestone
    |- end_milestone
    |- order_amount
    |- order_number
    |- order_item_number
    |- continuationR2S          [the continuation folder]
        |- interchangeID        [port mapping includes all R receive ports]
    |- continuationR2S          [the continuationID folder]
        |- interchangeID        [port mapping includes all S send ports]

The above mapping will also hold true in the following case. A message arrives at exactly one of the R receive ports and gets sent to all of the S send ports.

A message is processed by exactly one of O orchestrations (we don't know which one will execute at runtime) and is then sent by that orchestration to all the S send ports. In this case, we would need one continuation. The mapping will look something like this:

- OrderProcess
    |- start_milestone
    |- end_milestone
    |- order_amount
    |- order_number
    |- order_item_number
    |- continuationO1S          [the continuation folder]
        |- interchangeID        [from O1]
        |- interchangeID        [from O2]
        .    .
        .    .
        |- interchangeID        [from Oo]
    |- continuationO1S          [the continuationID folder]
        |- interchangeID        [port mapping includes all S receive ports]


A message gets processed by all O orchestrations in sequence, one by one. The mapping will look something like this:

- OrderProcess
    |- start_milestone
    |- end_milestone
    |- order_amount
    |- order_number
    |- order_item_number
    |- continuationO12          [the continuation folder]
        |- interchangeID        [from O1]
    |- continuationO12          [the continuationID folder]
        |- interchangeID        [from O2]
    |- continuationO23          [the continuation folder]
        |- interchangeID        [from O2]
    |- continuationO23          [the continuationID folder]
        |- interchangeID        [from O3]
    .   .     .
    .   .     .
    |- continuationOxO          [the continuation folder]
        |- interchangeID        [from On]
    |- continuationOxO          [the continuationID folder]
        |- interchangeID        [from Oo]

 

Published Friday, October 06, 2006 2:30 PM by Vikas

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: TPE and multiple continuations @ Tuesday, July 31, 2007 5:10 PM

I am trying to implement a scenario where multiple orchestrations are executed one by one.

My problem is that

Orch A continues to Orch B

Orch B continues to Orch C

Orch C continues to Orch A

Orch A continues to Orch D

As you can see Orch A appears twice in my activity. I see this error in the event log

Execute event error. Error(s) occurred while executing events, see TDDS_FailedTrackingData table for more details.  SQLServer: xxxx, Database: BAMPrimaryImport.

I see the error in TDDS_FailedTrackingData

TDDS failed to execute event. Violation of PRIMARY KEY constraint 'PK__bam_NewAppInfoAc__13DCE752'. Cannot insert duplicate key in object 'dbo.bam_NewAppInfoActivity_Continuations'.

The statement has been terminated.

How can I fix this error?

Raj

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
Page view tracker