When Business Process Server change states, that event can be used to perform appropriate actions. For example, when a state change such as "BP Server suspended" occurs, an adapter can be invoked to send a pager message to the Business Process Server administrator. The Callback Adapter in Business Process Server performs this function.
By default, the Callback Adapter mechanism is disabled and no action is taken by the Business Process Server components on any change of state. The administrator has the option of enabling the Callback Adapter for both servers; or using the Callback Adapters only for the BP Server or BPM Events server without affecting the other component server.
Note: The Callback Adapter is invoked only after the server changes its state.
In the case of BP Server, callback support is also provided for state changes of process template, process instance and workstep instance. The supported states are:
Process template — Activated, Suspended, Resumed, Removed
Process instance — Removed, Completed
Workstep instance — Activated, Completed
For the workstep events, you can access a reference to com.savvion.sbm.bizlogic.server.JSTools object from the ProcessContext object by calling the getWorkFlowService() method on ProcessContext.
You can use the JSTools object to access the workflow operations like getting dataslot values, and updating dataslot values.