[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]


Persistent Storage

All workflow components are persistent objects; that is, they implement the java.io.Serializable interface through the WFComponent class. Persistent storage is responsible for storing the state of workflows, which are indexed by their IDs. Every workflow is assigned an ID in instantiation time. The workflow engine decides—based on the progress of the workflow—when a workflow should be sent to persistent storage and when it should be retrieved.

The progress of the workflow is determined by the progress of its component work items. The regular work item is the type of work item that may take an arbitrary time to complete; thus it is the one that reports the progress. Although this mechanism is hidden inside the WorkItem class, you should be aware of its existence to understand what causes a workflow to be paused.

The workflow engine sends a pause message to any workflow that takes longer than a specified time to report its progress. The time can be configured through the sleep threshold parameter in the control tab of the local configuration tool. When a workflow is paused, it is safe to store the state of the workflow. The workflow will be resumed after an interval specified by the activation threshold parameter in the control tab of the local configuration tool. After its state is restored, the workflow engine sends a resume message to the workflow so that it can resume execution. The arrival of an external event can also trigger the resumption of a paused workflow. If a workflow is sleeping because all ongoing work items are waiting for an event, only the arrival of an event can cause it to resume.


[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]