none
why persistence doesn't occur in call orchestration? RRS feed

Answers

  • Am new to biz talk here my question is:  persistence not occurred through the call orchestration why? is there any particular reasons? plz clarify

    Biztalk orchestration  persistence operation occurs at below point.

     At the execution of other orchestrations through the Start Orchestration shape.

    why not at call orchestration.



    Okay! let me explain in much more detail.

    Like you have read "Persistence point occur At the execution of other orchestrations through the Start Orchestration shape."

    This is because when Start orchestration shape is hit at runtime a separate thread is assigned for the started orchestration from the engine's thread pool and the calling orchestration continues execution on previous thread. Now because a new thread is assigned to started orchestration BizTalk engine forces calling orchestration instance's state to be persisted at this point.

    Whereas, in case of Call orchestration shape no new thread is assigned to the called orchestration. The caller orchestration is blocked until the called orchestration terminates. The called orchestration as well as the caller can consume a maximum of on thread from the engine's thread pool. So BizTalk engine does not force calling orchestration instance's state to be persisted at this point.

    However, if there are any persistence points in the called orchestration like 'End of a transactional scope', 'At the Send shape', etc then state of calling orchestration is persisted.



    Rachit Sikroria (Microsoft Azure MVP)

    Tuesday, February 23, 2016 11:00 AM
    Moderator
  • For clarity, if there is a Persistence Point in a Called Orchestration, only the calling Orchestration is Persisted, you will never see an instance of the Called Orchestration so technically, there is nothing to Persist.  It all happens withing the context of the Activated Orchestration.
    • Marked as answer by Angie Xu Thursday, March 3, 2016 2:19 AM
    Tuesday, February 23, 2016 1:12 PM
    Moderator

All replies

  • It does.

    A Call Orchestration Shape does not create a Persistence Point, however, if there are Persistence Points in the called Orchestration, anything in the calling Orchestration will persist. 

    Calling an Orchestration will use the same thread to run another orchestration while using Start Orchestration will create new thread to run the started orchestration. Calling an Orchestration will be synchronous operation where the caller waits for a response,while Start Orchestration is asynchronous operation

    Start orchestration goes by messagebox hence persistence occurs while call orchestration doesn’t go via messagebox.


    Rachit Sikroria (Microsoft Azure MVP)

    Monday, February 22, 2016 3:59 PM
    Moderator
  • Well, what do you mean 'doesn't work'?

    Called Orchestration will have Persistence Points just like any other Orchestration.

    Calling an Orchestration is not a Persistence Point in itself because it's little more than a method call.  You can force it by putting the Call Orchestration Shape in an Atomic Scope.

    Monday, February 22, 2016 4:11 PM
    Moderator
  • Hi,

    Call Orchestration uses the same thread to execute the child orchestration and waits for the response as it is synchronous operation. Start Orchestration creates a new thread to run the child orchestration.


    JB

    Monday, February 22, 2016 9:31 PM
  • Am new to biz talk here my question is:  persistence not occurred through the call orchestration why? is there any particular reasons? plz clarify

    Biztalk orchestration  persistence operation occurs at below point.

     At the execution of other orchestrations through the Start Orchestration shape.

    why not at call orchestration.



    Tuesday, February 23, 2016 10:38 AM
  • Am new to biz talk here my question is:  persistence not occurred through the call orchestration why? is there any particular reasons? plz clarify

    Biztalk orchestration  persistence operation occurs at below point.

     At the execution of other orchestrations through the Start Orchestration shape.

    why not at call orchestration.



    Okay! let me explain in much more detail.

    Like you have read "Persistence point occur At the execution of other orchestrations through the Start Orchestration shape."

    This is because when Start orchestration shape is hit at runtime a separate thread is assigned for the started orchestration from the engine's thread pool and the calling orchestration continues execution on previous thread. Now because a new thread is assigned to started orchestration BizTalk engine forces calling orchestration instance's state to be persisted at this point.

    Whereas, in case of Call orchestration shape no new thread is assigned to the called orchestration. The caller orchestration is blocked until the called orchestration terminates. The called orchestration as well as the caller can consume a maximum of on thread from the engine's thread pool. So BizTalk engine does not force calling orchestration instance's state to be persisted at this point.

    However, if there are any persistence points in the called orchestration like 'End of a transactional scope', 'At the Send shape', etc then state of calling orchestration is persisted.



    Rachit Sikroria (Microsoft Azure MVP)

    Tuesday, February 23, 2016 11:00 AM
    Moderator
  • Very nice Thanks a lot..

    Tuesday, February 23, 2016 11:22 AM
  • For clarity, if there is a Persistence Point in a Called Orchestration, only the calling Orchestration is Persisted, you will never see an instance of the Called Orchestration so technically, there is nothing to Persist.  It all happens withing the context of the Activated Orchestration.
    • Marked as answer by Angie Xu Thursday, March 3, 2016 2:19 AM
    Tuesday, February 23, 2016 1:12 PM
    Moderator