BizTalk Orchestration Persistence Points

The orchestration engine saves the state of a running orchestration instance at various points. If it needs to rehydrate the orchestration instance, start up from a controlled shutdown, or recover from an unexpected shutdown, it will run the orchestration instance from the last persistence point, as though nothing else had occurred. For example, if a message is received but there is an unexpected shutdown before state can be saved, the engine will not record that it has received the message, and will receive it again upon restarting. The engine will save the state of an orchestration in the following circumstances:

  • The end of a transactional scope is reached.
    • The engine saves state at the end of a transactional scope so that the point at which the orchestration should resume is defined unambiguously, and so that compensation can be carried out correctly if necessary.
    • The orchestration will continue to run from the end of the scope if persistence was successful; otherwise, the appropriate exception handler will be invoked.
    • If the scope is transactional and atomic, the engine will save state at the end of the atomic scope when it commits.
    • If the scope is transactional and long-running, the engine will generate a new transaction and persist the complete state of the runtime when the scope completes.
  • A debugging breakpoint is reached.
  • A message is sent. The only exception to this is when a message is sent from within an atomic transaction scope.
  • The orchestration starts another orchestration asynchronously, as with the Start Orchestration shape.
  • The orchestration instance is suspended.
  • When the orchestration engine is asked to shut down, it will try to save control information as well as the current state of all running orchestration instances, so that it can resume running them when it is started again. If the engine is unsuccessful in saving the current state, the engine will resume the orchestration instance from the last persistence point that occurred before the shutdown. This applies to the system shutdown in controlled condition as well as abnormal termination.
  • The engine determines that the instance should be dehydrated.
  • The orchestration instance is finished.

 

From BizTalk Online book

posted @ 2008-12-05 10:36  upzone  阅读(285)  评论(0编辑  收藏  举报