JBoss Community

Removing Human Tasks

created by Fernando Ribeiro in jBPM - View the full discussion

I'm currently getting "java.lang.RuntimeException: Couldn't remove user krisv since it isn't a notification recipient" when trying to remove a task created with the following code:

 

{code}final BlockingAddTaskResponseHandler handler = new BlockingAddTaskResponseHandler();

 

final Task task = new Task();

 

final PeopleAssignments peopleAssignments = new PeopleAssignments();

 

final List<OrganizationalEntity> potentialOwners = new ArrayList<OrganizationalEntity>();

 

potentialOwners.add(new User("krisv"));

 

peopleAssignments.setPotentialOwners(potentialOwners);

 

task.setPeopleAssignments(peopleAssignments);

 

task.setTaskData(new TaskData());

 

client.addTask(task, null, handler);

 

System.out.println(handler.getTaskId());

 

client.disconnect();{code}

 

Does a task need to be in a certain status for being removed with TaskClient.remove?

Reply to this message by going to Community

Start a new discussion in jBPM at Community