Information Technology Reference
In-Depth Information
WorkItemManager manager) {
this.invocationCount++;
manager.completeWorkItem(item.getId(), null);
}
public void abortWorkItem(WorkItem item, WorkItemManager
manager) {
}
public int getInvocationCount() {
return invocationCount;
}
}
The second one stores the work item that invoked it, but doesn't complete itself. So, it
leaves the process instance in a wait state, as shown in the following code:
public class TestAsyncWorkItemHandler implements
WorkItemHandler {
private WorkItem item;
public void executeWorkItem(WorkItem item,
WorkItemManager manager) {
this.item = item;
}
public void abortWorkItem(WorkItem item, WorkItemManager
manager) {
}
public WorkItem getItem() {
WorkItem retval = item;
item = null;
return retval;
}
}
Search WWH ::




Custom Search