You can suspend collaboration task instances (also known
as human tasks in the API) or to-do task instances (also
known as participating tasks in the API).
Before you begin
The task instance can be in the ready or claimed state. It
can be escalated. The caller must be the owner, originator, or administrator
of the task instance.
About this task
You can suspend a task instance while it is running. You
might want to do this, for example, so that you can gather information
that is needed to complete the task. When the information is available,
you can resume the task instance.
Procedure
- Get a list of tasks that are claimed by the logged-on user.
FilterOptions fo = new FilterOptions();
fo.setSelectedAttributes("TKIID");
fo.setQueryCondition("STATE=STATE_CLAIMED");
EntityResultSet result = task.queryEntities("TASK", fo, null, null);
This action returns a query result set that contains
a list of the tasks that are claimed by the logged-on user.
- Suspend the task instance.
if (result.getEntities().size() > 0)
{
Entity entity = (Entity) result.getEntities().get(0);
TKIID tkiid = (TKIID) entity.getAttributeValue("TKIID");
task.suspend(tkiid);
}
This action suspends
the specified task instance. The task instance is put into the suspended
state.
- Resume the process instance.
This action puts the task instance into the state it
had before it was suspended.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15