I have a requirement to dynamically set the assignee to tasks of process instance created from a process definition id.So,i get my assignee values from UI side and submitted for approval workflow.Now i will start the process and assign those assignee to the respective tasks.The problem is i get only one task on start of process as activiti gives only the current tasks/active tasks.As i don't get rest of task list i am unable to set the assignee to those tasks. I also have to find pending tasks and completed tasks for a assignee from process instance,as there is query for task which i can use but as i am not able to set the assignee for all tasks ,this query seems not much of help for me. So how can i get all tasks under a process instance and set the assignee to each user tasks and then complete the user tasks whenever needed using process instance and task query.
Below is my workflow