Suspending and resuming a business process

You can suspend a process instance and resume it again to complete it.

Before you begin

The caller must be an administrator of the process instance or a business process administrator. To suspend a process instance, it must be in the running or failing state.

Why and when to perform this task

You can suspend a long-running, top-level process instance while it is running. You might want to do this, for example, so that you can configure access to a back-end system that is used later in the process. When the prerequisites for the process are met, you can resume the process instance.

Steps for this task

  1. Get the running process, CustomerOrder, that you want to suspend.
    ProcessInstanceData processInstance = 
                        process.getProcessInstance("CustomerOrder");
  2. Suspend the process instance.
    PIID piid = processInstance.getID(); 
    process.suspend( piid );

    This action suspends the specified top-level process instance. The process instance is put into the suspended state. Subprocesses with the autonomy attribute set to child are also suspended if they are in the running, failing, terminating, or compensating state.

  3. Resume the process instance.
    process.resume( piid );

    This action puts the process instance and its subprocesses into the states they had before they were suspended.


Terms of use |

Last updated: Tue Feb 21 17:31:27 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)