I have to create process in activiti which requires the following use case.
1.The form has a people search field 2.When someone completes the form and completes the task
You can use following steps:
taskService.complete(task.getId(), taskVariables);
taskVariables should contain variable with keys for example 'userId' or 'userIds' to access submitted values in process instance<userTask id="task" name="My Task" activiti:assignee="${userId}"/>
or <userTask id="task" name="My Task" activiti:candidateUsers="${userIds}"/>
to assign tasks