Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 133, comments - 178, trackbacks - 427

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Untyped Messages Inside An Orchestration in BizTalk 2004 – Part 2

This is follow up on a post back in August on Untyped Messages.  This also combines information from another post of mine on Promoted Properties. 

 

Ok, so what is the big deal then?  Well, I took my untyped message sample and updated it to use MessageContextProprertyBase properties.  This eliminates the need to cast the message into a specific type to get access to promoted properties.  This greatly reduces the work inside the Orchestration and greatly increases your flexibility!

 

What exactly are these properties that you are talking about?

Well, let me show you.  Here is a screen shot from a BizTalk Property Schema.
SC 

The default is MessageDataPropertyBase and those are only available through typed messages.

 

How do you know what type of Properties you have inside your Orchestration?

MessageContextProprertyBase Properties are White and look like all the other Properties. 

 

MessageDataPropertyBase Properties are Yellow.

 

SC

 

CRITICAL: The downside to working with untyped messages inside on Orchestration is they can not be mapped using a Transform Shape.

 

CRITICAL!: The MessageType property seems to be wiped out by the Send Port.  This prevents mapping in the Send Port as well since the Map uses MessageType to determine the inbound document for the map.

 

The true potential of untyped messages with MessageContextPropertyBase Properties can be seen by looking at a new, updated sample working with Untyped Messages.  It will help to download the original version as well.

 

DOWNLOAD: Updated Untyped Messages Sample

 

Why not get the information I want out of the XMLDocument using XPath?  Well, Promoted Properties allow for greater flexibility because the structure/schema of the XML message is not needed inside the Orchestration.  You define in your schema what node represents your desired properties.  Furthermore, you can set properties in a pipeline that might never exist in your message.

 

Take Away: To increase flexibility, promote reuse, and reduce message variables, try to make your Orchestration independent of your Message Type when it makes sense to do so. 

 


Here is an update to mapping in Send Ports with untyped messages from an Orchestration. 

 

Send Port Binding Type:

Specify Now – Send Port Map does not work (MessageType is lost)

 

Specify Later – Send Port Map does not work (MessageType is lost)

 

Specify Later inside Scope Shape – Send Port Map does not work (MessageType is lost)

 

Specify Later with Delivery Notification – Send Port Map does not work (MessageType is lost)

 

Direct Message Box Binding – MessageType is preserved and the correct output message is received!  But, the Orchestration Suspends and gives the following error: 

Exception occurred when persisting state to the database.      

Exception type: PersistenceException

Source: Microsoft.XLANGs.BizTalk.Engine

 

Conclusion: From my tests so far, it appears that mapping in the Send Port with untyped messages is not possible.

Print | posted on Thursday, September 16, 2004 11:02 PM |

Feedback

Gravatar

# re: Untyped Messages Inside An Orchestration in BizTalk 2004 – Part 2

Hi:

I loved your post on Untyped Messages.

Thanks for sharing.


Raj
10/25/2004 3:29 PM | rajinder singh
Gravatar

# re: Untyped Messages Inside An Orchestration in BizTalk 2004 – Part 2

I have this same problem. I want to grab all messages coming in from a queue and persist them to a database. From there, they will be put in the message box. Everything works fine. The document is put on the MsgBoxDb and is picked up by the downstream orchestrations, but I get the same event entry you discussed. Have you figured out a work-around?
11/19/2004 2:22 PM | Stanford Powers
Gravatar

# re: Untyped Messages Inside An Orchestration in BizTalk 2004 – Part 2

Hello.

No, I have not found a work around other then switching to typed messages.

I did finally read the help on Direct Binding Send Ports… They state that they should only be used to send messages to other Orchestrations. In my case, I am trying to send the messages to a Send Port. That might be part of the problem.

Maybe the Sending Orchestration is expecting another Orchestration to pick up the message so it does not know how to react when a Send Port gets the message instead. Just a theory.

Stephen W. Thomas
11/21/2004 10:14 PM | Stephen W. Thomas
Gravatar

# re: Untyped Messages Inside An Orchestration in BizTalk 2004 – Part 2

Thanks. What are the implications on the BPEL if this methodology is used?
Curious,
RP
12/26/2004 10:08 PM | R Pipkin

Post Comment

Title  
Name  
Email
Url
Comment   

Powered by: