Geeks With Blogs
ErwinAI - Enterprise Application Integration (EAI) blog on BizTalk 2004, Visual Studio, and application integration

I have noticed that many visitors of this blog have been searching for “multiple receive shapes” or something comparable. Therefore, some of the basics explained below. See also another post here:

  • For each orchestration you design, you will have to make clear how a new instance of the orchestration can be started. This can be done because it is called by another orchestration instance. The most common way of starting a new orchestration instance is by means of an activating receive shape.
  • Simple orchestrations usually have a receive shape at the start, followed by some operations, and are concluded with a send shape. Remember that you always have to specify that the only receive shape in the orchestration will be the activating receive shape? (I usually don't, until I get the error message from the build process.) When marking the receive shape as “activating“, you tell BizTalk that it should create a new instance of the orchestration (runtime) when a message is delivered to this shape.
  • It becomes a little more complex when you need to use more receive shapes in the orchestration. Simply adding them is not sufficient. Marking all receive shapes as “activating“ is no possibility. It could take quite some attempts before you realize that you need to specify the behavior of the orchestration towards messages coming in on each of the receive shapes. This is called correlation. An orchestration using multiple receive shapes (and therefore, one or more correlations) implements (one or more) convoys.
  • Basically, for an orchestration with multiple receive ports, you have to specify which receive shape(s) will fire up a new orchestration when a new message is delivered to it. For messages that will not lead to a new orchestration instance (meaning that they will be delivered to an already existing instance), how they relate to the instantiated orchestrations.

 

Posted on Thursday, February 23, 2006 5:07 PM BizTalk 2004 Hints, Tips & Tricks | Back to top


Comments on this post: BizTalk 2004 - Multiple receive shapes in an orchestration

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
Could you help me out with the following scenario.

I have an application in which i have some items which is available in the database. I have to get this data using the SQL adapter.

The problem is:
I have to first send an xml file to a receive location, which will be picked up by the orchestration. the orchestration will then call a sql procedure and send me back the results in xml format which will be read by the original application.
Left by Anup George on Apr 17, 2006 12:40 PM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
I assume that you want help on the SQL-adapter part.

In the case you describe, you require a request-response type of exchange with the database. You will need a tool called SQLXML (by Microsoft). That makes it possible to call stored procedures and perform SQL-statements on a SQL-server database.

The request (call of a stored procedure or the SQL-statement) has to be formulated as updategram. This is an XML-messge holding the call/statement. This request is sent to a request-response port. As an answer, you'll get another XML-message containing the output and information about the processing.

Most of the components of your orchestration can be generated. Using a wizard, you can generate a request-response port for a particular database. Generating an XSD that holds the right definition of an updategram for this database / table is also done using a wizard. You will have to define messages, populate them, and intepret the response.
Left by Erwin on Apr 17, 2006 4:18 PM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
Problem Solved.

Used the Static Solicit-Response Send Port
Left by Anup George on Apr 26, 2006 5:42 AM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
Here is the case! I would like to create diff recv port for each diff partner . but i would like to have the messages that come to all these recv ports be processed by same orchestration. Because i have to make some decisions inside the orch based on recv port name. So will that be possible to have multiple recv ports which can invoke same orch ?or if i can access the name of the recv location inside the orch, i will be able to make decision based on that inside.
Left by pavan on Aug 10, 2006 10:46 PM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
In case all partners send the same message type, you could consider to:
- Let messages from all partners come in via the same port, and use the partner determination features of BizTalk.
- If that is not possible, use a different port and orchestration for each partner. The partner orchestration does nothing more thatn receiving the message from the partner, and resubmitting it to the "central" orchestration.
Left by Erwin on Aug 11, 2006 5:32 AM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
can u please point me towards some practically implemented examples where multiple rec shapes are used in the same orch or one orch subscribing to multiple rec ports?that would be much better !
Left by pavan on Aug 16, 2006 10:56 PM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
Hi,

Here is my scenario, i want to publish an orchestration as web services with multiple ports/operation. So once this is published i need only ONE asmx file which should contain all the operation. Let's say if i have 2 ports each having one orchestration and each is tied with receive and send shape. Now i have 2 receive shapes out of which one would be set to Activate = true. If a client class method1 which is tied to rcv_shape1 it will create a new instance of it. What if the client calls method2 with rcv_shape2 tied to it and set activate to false, will that orch process that message.

I short how can i achieve multiple rcv shapes to be active true and each does its own job w/o using corrrelation
Left by ash on Mar 28, 2008 10:11 AM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
In your example, method2 and rcv_shape2 are not "activating". That means that they will only be used as second input to an already existing orchestration instance (activated by rcv_shape1). In other words: just calling method2 will probably lead to BizTalk reporting that a message can not be processed because there are no subscriptions to the message type.

For making two receive shapes available that are "activating", you'll need two orchestrations.

You indicate that you need a single wsdl to describe both methods in your orchestration.

For producing wsdl in BizTalk, there are two main methods
(a) By creating an orchestration and generating a web service out of it. This is relatively simple, but you have little control of the details of the wsdl.
(b) By creating a schema and generating a web service out of it. This requires more manual corrections to the generated web service definition, but gives you virtually endless possibilities.

As far as I can see, I think you will need to use method (b) to realize your objectives.
Left by Erwin on Mar 28, 2008 3:00 PM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
Hi
I am having two different sources of data and need to have them in the same orc so as to send them in a single destination
Trying to have 2 diff receive n using them in orc.
Ny xpert comments on that ?
Left by Newuser on Apr 23, 2008 1:21 AM

# re: BizTalk 2004 - Multiple receive shapes in an orchestration
Requesting Gravatar...
is there a way that i can receive multiple TYPE of XML requests on the same Receive Location ??
Left by devBTS on May 20, 2009 1:07 AM

Your comment:
 (will show your gravatar)


Copyright © Erwin Homan | Powered by: GeeksWithBlogs.net