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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top