Question

1, get all task assigned to a user

// its working.
 List<Task> tasks = taskService.createTaskQuery().taskAssignee(userId).list()

2, get all task assigned to groups

//tasks list empty, its not working
 List<Task> tasks =  taskService.createTaskQuery().taskCandidateGroupIn(roles).list()

3, clam a task

//its working
 taskService.claim(taskId, userId)

4, revoke a task

// i don't know this is the right way
 taskService.claim(taskId,null)

5, start process instance

//its working
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(pdId, variables);

6, complete a task

//its working
 taskService.complete(taskId,variables)

7, get from properties for a task

// its working

 List<FormProperty> formList = formService.getTaskFormData(taskId).getFormProperties();

I want to make sure that i am doing in right way.. please correct if i am wrong

Update for answer

7) get from properties for a task

I have to loop through formList and using getId() and getValue() i got what i want

2) get all task assigned to groups

taskCandidateGroupIn(roles) // here roles must be List

Était-ce utile?

La solution

FormProperty is an object that holds the information about the specific form property. If you look at the documentation, you will see how it is implemented.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top