I have a process that has two tasks that is a simple 'approval' process. I need to be able to programmatically choose either 'Approved' or 'Rejected' for a task so that the process goes to the next task assignment or exits the process and the process ends.
From code how do you get the current task of a process, and action one of the user actions?
Hi, try this for ES3
ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
long processId = YOUR_PROCESS_ID;
ProcessManagementQueryService queryService = ProcessManagementClientFactory.getProcessManagementQueryService(myFactory);
List<Task> lst= queryService.getTasksForProcessInstance(processId);
String taskId = lst.get(0).getTaskId() + ""; // i think, the current task is first at collection
String route ="YOUR ROUTE NAME";