StringBuffer theFromActivityIds = new StringBuffer("");
for (int i = 0; i < targetTaskInstancesList.size(); i++) {
TaskInstance taskInstTemp = (TaskInstance) targetTaskInstancesList
.get(i);
persistenceService.abortTaskInstance(taskInstTemp);
if (!targetActivityIdList
.contains(taskInstTemp.getActivityId())) {
targetActivityIdList.add(taskInstTemp.getActivityId());
if (theFromActivityIds.length() == 0) {