// One potential owner, should go straight to state Reserved
String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { } ), ";
str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba' ], users['darth'] ], }),";
str += "names = [ new I18NText( 'en-UK', 'This is my task name')] })";
BlockingAddTaskResponseHandler addTaskResponseHandler = new BlockingAddTaskResponseHandler();
Task task = ( Task ) eval( new StringReader( str ), vars );
client.addTask( task, null, addTaskResponseHandler );
long taskId = addTaskResponseHandler.getTaskId();
// A Task with multiple potential owners moves to "Ready" state until someone claims it.
BlockingGetTaskResponseHandler getTaskResponseHandler = new BlockingGetTaskResponseHandler();
client.getTask( taskId, getTaskResponseHandler );
Task task1 = getTaskResponseHandler.getTask();