none
Listen shape be the first shape in an Orchestration RRS feed

  • Question

  • hi,

    Can the Listen shape be the first shape in an Orchestration ?

    Scenario : Orchestration should start when I receive data from SQL server or via a file received from a folder location. Each has a different schema.

    I put a listen shape as the first shape in the Orchestration with 2 branches, 2 receive location , activate = true.

    Is this a viable solution.

    Regards,

    Sharmishtha

    Tuesday, March 24, 2015 3:23 PM

Answers

All replies

  • Absolutely, it is possible.

    When you have possibility of receiving two or more different types of messages but can't predict which one you'll receive. You can have multiple branches in your listen shape, both with receive shape configured to accept different types of messages, the first shape on which message will arrive will 'win' and the remaining branches will be terminated.

    Listen shape will be executed from left to right, so if both the messages are present, the leftmost branch containing the receive shape will execute.

    Rachit


    Please mark as answer or vote as helpful if my reply does


    Tuesday, March 24, 2015 3:38 PM
    Moderator
  • Perfect.

    I have a send port, with a filter condition and it works.

    I have applied the same filter condition ( MessageType) at the receive shape on one of the Listen shape branches.

    The Orchestration instance is not started - no subscribers found.

    what could be the issue.

    Regards,

    Sharmishtha

    Tuesday, March 24, 2015 3:49 PM
    • Marked as answer by Sharmishtha Wednesday, March 25, 2015 4:29 AM
    Tuesday, March 24, 2015 3:53 PM
    Moderator
  • @Rachit - That description is for the Parallel Shape.  The Listen Shape is first match and only one Branch will ever execute.
    Tuesday, March 24, 2015 3:54 PM
    Moderator
  • For clarity, do you mean Started or Enlisted?

    If the Orchestration is Stopped, then the Subscriptions are not active.  The Orchestration has to be either Enlisted or Started.

    Tuesday, March 24, 2015 3:56 PM
    Moderator
  • @Rachit - That description is for the Parallel Shape.  The Listen Shape is first match and only one Branch will ever execute.

    That's what I wrote. Please read again

    "the first shape on which message will arrive will 'win' and the remaining branches will be terminated."


    Please mark as answer or vote as helpful if my reply does


    Tuesday, March 24, 2015 3:58 PM
    Moderator
  • The Orchestration is started and the send port is unenlisted.

    The Orchestration does not pick up the message - no subscribers found.

    I then start the send port and the message is picked up.

    Regards,

    Sharmishtha

    Tuesday, March 24, 2015 3:58 PM
  • This is what I was referring too.

    Listen shape will be executed from left to right, so if both the messages are present, the leftmost branch containing the receive shape will execute.

    Tuesday, March 24, 2015 4:02 PM
    Moderator
  • What exactly is the Filter on the Send Port?

    Also, if you are using Schema Types for the Messages in the Orchestration, you do not need to add MessageType yourself, it is added automatically.

    You can view the exact subscriptions for everything by doing a New Query, Search For: Subscriptions in BizTalk Administrator.

    Also, make sure you are using a Receive Pipeline with the XmlDisassembler on the Receive Location, such as XmlReceive.


    Tuesday, March 24, 2015 4:05 PM
    Moderator
  • This is what I was referring too.

    Listen shape will be executed from left to right, so if both the messages are present, the leftmost branch containing the receive shape will execute.

    I still stand with my statement. "The branches in a Listen shape are executed from left to right" Refer: https://msdn.microsoft.com/en-us/library/aa559201.aspx?f=255&MSPPError=-2147217396

    Rachit

     

    Please mark as answer or vote as helpful if my reply does

    Tuesday, March 24, 2015 4:10 PM
    Moderator
  • Ok, I see the problem.

    From MSDN: "Because the branches in a Listen shape are executed from left to right, the delay appears in the right branch. Notice that the delay is zero (0)."

    This statement is not correct.  Branches of a Listen Shape are not executed in any order.  The first Branch to fire, either by a Receive Shape or Delay Shape, is the only Branch to execute.  It is also not required that the Delay Shape be in the right most Branch, though by convention is usually is.

    Tuesday, March 24, 2015 4:49 PM
    Moderator
  • Hi Sharmishtha,

    If you want to subscribe to the message in orchestration by MessageType then you don't need to explicitly provide that condition because normally we use Typed Schema on the receive shape so the filter condition for Orchestration becomes-

    ReceivePortID={GUID of RecivePort} and MessageType={MessageTypeOfSchemaConfiguredForReceiveShapeMessage}

    First check if your receive location is configured for XML Receive pipeline because this pipeline will promote the message type property of the incoming message and normally subscriber not found error is due to selecting PassThrough pipeline.

    If pipeline is configured correctly check the subscription for your Orchestration.

    To view subscriptions in Biztalk:
    1. Open the Biztalk Administration Console  
    2. 
    Click on the Biztalk Group your application is located in (you probably just have one group)  
    3. Click on the New Query tab
    4. Select Field Name: Search For, Operator: Equals, Value: Subscriptions
    5. 
    Click Run Query

    http://geekswithblogs.net/sthomas/archive/2005/10/03/55872.aspx

    Later you can check the context properties of the suspended message and see if the required properties are promoted or not.


    Thanks,
    Prashant
    ----------------------------------------
    Please mark this post accordingly if it answers your query or is helpful.

    Tuesday, March 24, 2015 5:28 PM