Recognise Two messagetype in receive port
Hey all ,
I have a situation here where I have two different schemas and two orchestration.There is only one receive port where both the Input message are being put.How I need to recognize the right message for right orchestration.Kindly help me out
September 11th, 2015 12:05pm
If the Orchestrations are not directly bound to the Port and expects a message from MessageBox then you can have a single Receive Port that accepts message and then submits it to the Message Box from where based on the correct subscription Orchestration
can pick up the message.
Rahul
September 11th, 2015 12:14pm
Let me explain you below ,
1.Example there is two xml , Customer and Vendor
2.Two different schemas it is
3.Two different orchestration for both
4.One receive location where both customer and vendor are dropped
How will BizTalk recognize the message and send to the right orchestration.
September 11th, 2015 12:21pm
Hi Ashwanth,
I Assume you have your orchestrtaion direct binded to MessageBox. It is then Orchestration can create subscription based only on MessageType. Else if it binded to Physical port then subscription will be combination of Port + MessageType.
If direct binding is used then the first receive shape of your Orchestration is where the recognization (subscription for the message which it binded to) takes place.
Say, you create CustomerMessage in orchestration1 based on Customer schema, and when you assign this CustomerMessage to the first Receive shape of Orchestration1 and Activate property to true, you tell BizTalk to create an instance of this
Orchestration1 whenever CustomerMessage comes in MessageBox.
Same way for vendorMessage in Orchestration2.
______________________
Maheshkumar
S Tiwari|User
Page|Blog|Primary
location cannot be deleted
-
Edited by
Maheshkumar S TiwariMVP
14 hours 11 minutes ago
September 11th, 2015 12:48pm
If you Orchestration Ports are Specify Later, and thus are bound in BizTalk Administrator, then MessageType is part of the Activation Subscription for the Orchestration.
So, just make sure you are using a Pipeline with the XmlDisassembler and it will work.
Have you tried? Are you getting a different result?
September 11th, 2015 1:56pm
Hi Ashwin,
As already stated it purely depends on the design of your BizTalk Flow. If the Orchestration is designed in such a way that it expects the message from Message Box (Directly bind) then it will accept any message that matches its subscription (MessageType
- Namespace + Root)
So you can use a single Receive Port that accepts both the messages. The Port will submit the message in the Message Box with MessageType Promoted and the subscribed orchestration will pick it up.
Rahul
September 11th, 2015 2:15pm
Hi Ashwanth,
I Assume you have your orchestrtaion direct binded to MessageBox. It is then Orchestration can create subscription based only on MessageType. Else if it binded to Physical port then subscription will be combination of Port + MessageType.
If direct binding is used then the first receive shape of your Orchestration is where the recognization (subscription for the message which it binded to) takes place.
Say, you create CustomerMessage in orchestration1 based on Customer schema, and when you assign this CustomerMessage to the first Receive shape of Orchestration1 and Activate property to true, you tell BizTalk to create an instance of this
Orchestration1 whenever CustomerMessage comes in MessageBox.
Same way for vendorMessage in Orchestration2.
______________________
Maheshkumar
S Tiwari|User
Page|Blog|Primary
location cannot be deleted
-
Edited by
Maheshkumar S TiwariMVP
Friday, September 11, 2015 4:50 PM
September 11th, 2015 4:46pm
Hi Ashwanth,
I Assume you have your orchestrtaion direct binded to MessageBox. It is then Orchestration can create subscription based only on MessageType. Else if it binded to Physical port then subscription will be combination of Port + MessageType.
If direct binding is used then the first receive shape of your Orchestration is where the recognization (subscription for the message which it binded to) takes place.
Say, you create CustomerMessage in orchestration1 based on Customer schema, and when you assign this CustomerMessage to the first Receive shape of Orchestration1 and Activate property to true, you tell BizTalk to create an instance of this
Orchestration1 whenever CustomerMessage comes in MessageBox.
Same way for vendorMessage in Orchestration2.
______________________
Maheshkumar
S Tiwari|User
Page|Blog|Primary
location cannot be deleted
-
Edited by
Maheshkumar S TiwariMVP
Friday, September 11, 2015 4:50 PM
September 11th, 2015 4:46pm
Hi Ashwanth,
I Assume you have your orchestrtaion direct binded to MessageBox. It is then Orchestration can create subscription based only on MessageType. Else if it binded to Physical port then subscription will be combination of Port + MessageType.
If direct binding is used then the first receive shape of your Orchestration is where the recognization (subscription for the message which it binded to) takes place.
Say, you create CustomerMessage in orchestration1 based on Customer schema, and when you assign this CustomerMessage to the first Receive shape of Orchestration1 and Activate property to true, you tell BizTalk to create an instance of this
Orchestration1 whenever CustomerMessage comes in MessageBox.
Same way for vendorMessage in Orchestration2.
______________________
Maheshkumar
S Tiwari|User
Page|Blog|Primary
location cannot be deleted
-
Edited by
Maheshkumar S TiwariMVP
Friday, September 11, 2015 4:50 PM
September 11th, 2015 4:46pm
Hi Ashwin,
When you use XMLReceive pipeline in the receive port, by default it matches with the corresponding schema from GAC based on namespace and root node so you dont need to worry about identifying two message types for two different xml formats.
And the second thing is instead of binding your orchestration to physical ports, please use a direct binding which will get the message from MessageBox based on the message type you bind to the receive shape in orchestrations.
Cheers
September 11th, 2015 5:37pm
If you Orchestration Ports are Specify Later, and thus are bound in BizTalk Administrator, then MessageType is part of the Activation Subscription for the Orchestration.
So, just make sure you are using a Pipeline with the XmlDisassembler and it will work.
Have you tried? Are you getting a different result?
-
Marked as answer by
Ashwanth14
16 hours 36 minutes ago
September 11th, 2015 5:55pm
Hi Ashwanth,
What i understand from your question is that you are applying late binding (specify later ) while creating your logical port .
What i would suggest is to have a direct bound to messagebox logical port inside your Orchestration and put a filter condition on your first receive shape with message type . BTS.MessageType= "" ;
Use a xmlreceive pipeline instead of pass through. By this way a single receive location can work for multiple orchestration . It will also give you advantage of loose coupling between biztalk artifacts.
You can also validate the Orchestration subscription through BizTalk admin console by querying .
Thanks
Abhishek
September 13th, 2015 3:05am