As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
String processId = execution.getProcessInstanceId(); TaskService tkService = execution.getEngineServices().getTaskService(); List<Task> ltasks = tkService.createTaskQuery().processInstanceId(processId).list(); Task task = ltasks.get(0); String taskId = task.getId(); TaskService taskService = execution.getEngineServices().getTaskService(); // Set local variable taskService.setVariableLocal(taskId, "mobile", execution.getVariable("mobile")); // throw Activiti Exception throw new ActivitiException(error);