Providing state-transition handling

The database server throws a state-transition event when it changes its processing state.

To handle a transition in the processing state:

  1. Write a state-transition callback.

    Within a state-transition callback, use the mi_transition_type() function on the transition descriptor to determine the state-transition type (begin, normal end, or abort end) that caused the event. The processing required is typically different for each transition type.

  2. Register the state-transition callback in the DataBlade® API module that needs the state-transition handling.

    To provide required DataBlade processing at a state-transition point, your DataBlade API module must register state-transition callbacks with the mi_register_callback() function.

The way that your DataBlade API module handles a state-transition event depends on whether the DataBlade API module is a C UDR or a client LIBMI application.