AnsweredAssumed Answered

Query WorkflowTasks by Owner (Java API) [Solved]

Question asked by antoin on Feb 25, 2013
Latest reply on Feb 26, 2013 by antoin
Hello there…

I'm trying to query tasks for a given owner with the following approach:

NodeRef person = personService.getPerson("username");

WorkflowTaskQuery query = new WorkflowTaskQuery();
query.setTaskName(QName.createQName("", "myTask"));      
Map<QName, Object> queryTaskCustomProps = new HashMap<QName, Object>();
queryTaskCustomProps.put(ContentModel.PROP_OWNER, "HELP HERE");
List<WorkflowTask> results = workflowService.queryTasks(query, false);

In "HELP HERE" I tried to pass to person NodeRef or just the username… but in both cases the query did not retrieved data. If I remove the query.setTaskCustomProps it works ok, thus I assume the rest is correct.

So… what's the correct value/object in customProps associated to the owner key?

thanks in advance