States and State Transitions in Consumers

OLE DB Programmer's Reference

The following diagram shows the actions that can take place within a consumer that supports notifications through IRowsetNotify.

Consumer state/state transition diagram

States

  • Initial is a conceptual state denoting the initial state of any IRowsetNotify method before any phase starts. At this point, full-phased events such as DBREASON_COLUMN_SET can receive an OKTODO or FAILEDTODO notification. Any other phase at this point is unexpected, causing the method to undergo a transition to the Undo Work2 state that returns S_FALSE.
  • OKTODO, ABOUTTODO, SYNCHAFTER, and DIDEVENT are method-transition states that occur when the method receives the phase having the same name as the respective state. All these states can involve some internal work by the consumer. All states, except DIDEVENT, can receive a FAILEDTODO notification, which causes the method to undergo a transition to the Undo Work1 state.
  • Undo Work1 is an internal state to which the listener undergoes a transition from any state (except DIDEVENT) on reception of a FAILEDTODO notification. In this state, any work done by the consumer is undone. After the work is undone, the method reverts back to the Initial state and returns S_OK.
  • Undo Work2 is an internal state that captures any unexpected phase. In this state, any work done by the consumer is undone. Once the work is undone, the method reverts back to the Initial state and returns S_FALSE.

Transitions

  • Arrows with a continuous heavy line represent transitions within states upon reception of some expected phase.
  • Arrows with a continuous light line represent transitions resulting from receiving an unexpected phase.
  • Arrows with a dashed line represent an internal transition by the consumer.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net