Listen shape problem

Home Page Forums BizTalk 2004 – BizTalk 2010 Listen shape problem

Viewing 1 reply thread
  • Author
    Posts
    • #12363

      I have an orchestration I am exposing as a webservice. I have a port with multiple operations denoting multiple web methods.
      I have a listen shape with each branch having a receive and send shape. When I actually publish the webservice and deploy my orchestration, and when I call any web method, the call always goes to the first branch.
      I know we can create a filter expression in the receive shapes.

      Can someone tell me how to specify the filter expression for routing it to a different branch based on the operation?
      I have been trying to use the BTS.Operation filter, but I do not know how to specify the expression. I tried doing, for example, \”port.operation1\” then I tried \”operation1\”. None of these worked.

      Help!!

    • #12364

      This is what I did.

      I created a schema in my biztalk project. I then promoted some of the properties. In my case,

      HeaderSchema.xsd where I had promoted MessageType and EventType.

      Then I created multipart messages for each of the incoming branches’ receive shape and added this schema to be one of the parts, besides the actual message that I will be receiving in that receive shape.

      Then, in the receive shape I added filter expression, where I said MessageType==\”something1\” AND EventType==\”something2\” for receive shape in the first branch and, MessageType==\”something3\” AND EventType==\”something4\” for receive shape in the second branch and so on for each branch’s receive shape.

      You can then publish the orchestration as a web service and then while calling the webmethod add another paramter, which is of type header schema and enter your values there. For the first method (branch 1) set the property values of the header schema object to be MessageType==\”something1\” and EventType==\”something2\”, then set this value for each and every web method call. This way the listen shape will know which branch to forward it to based on the filter specified in the receive shape.

      Hope that helps. I know this is not the greatest way to do this, however with the limitations in documentation and help from microsoft on this sucker \”BizTalk\” this is all we could come up with.

      • #12365

        Stephen

        The problem with my messages are that they are of type .NET classes. Most messages look the same…….. (ie) they are aof the same type. This I needed a way to differentiate them, so I used this circumvention to distinguish them and route them to the appropriate branch in the listen shape.

        It works.

        • #12366

          Stephen

          I have a listen shape with multiple branches and each branch has a receive shape with Activate=true. I had only one port with multiple operations. Each operation denoting a web method. What was happening was that whenever I call any method it always went to the first brach.

          One other thing to note is that my messages are of type .NET classes. Most messages look the same…….. (ie) they are of the same type. Thus I needed a way to differentiate them, so I used this circumvention to distinguish them and route them to the appropriate branch in the listen shape based on which web method was called.

          It works.

          • #12367

            Let me see if I have this right, you have multiple Receive Shapes that you want to route your message to?

            If that is the case, you can not really do that. You can only have one Active Receive per Orchestration unless you have a Convoy – and I don’t think that fits here.

            Maybe a better approach would be to receive all the different messages in through a single Receive Shape and then use a decision shape to get into the right branch.

            Or, you can create separate Orchestration and route the message to the one.

            Would this work for you?

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.