public void claimNextAvailable(String userId, String language) { List<org.jbpm.task.Status> status = new ArrayList<org.jbpm.task.Status>(); status.add(org.jbpm.task.Status.Ready); List<TaskSummary> queryTasks = taskQueryService.getTasksAssignedAsPotentialOwnerByStatus(userId, status, language); if (queryTasks.size() > 0) { lifeCycleManager.taskOperation( Operation.Claim, queryTasks.get(0).getId(), userId, null, null, null); } else { // log.log(Level.SEVERE, " No Task Available to Assign"); } }
public void suspend(long taskId, String userId) { lifeCycleManager.taskOperation(Operation.Suspend, taskId, userId, null, null, null); }
public void stop(long taskId, String userId) { lifeCycleManager.taskOperation(Operation.Stop, taskId, userId, null, null, null); }
public void resume(long taskId, String userId) { lifeCycleManager.taskOperation(Operation.Resume, taskId, userId, null, null, null); }
public void forward(long taskId, String userId, String targetEntityId) { lifeCycleManager.taskOperation(Operation.Forward, taskId, userId, targetEntityId, null, null); }
public void fail(long taskId, String userId, Map<String, Object> faultData) { lifeCycleManager.taskOperation(Operation.Fail, taskId, userId, null, faultData, null); }
public void exit(long taskId, String userId) { lifeCycleManager.taskOperation(Operation.Exit, taskId, userId, null, null, null); }
public void delegate(long taskId, String userId, String targetUserId) { lifeCycleManager.taskOperation(Operation.Delegate, taskId, userId, targetUserId, null, null); }
public void complete(long taskId, String userId, Map<String, Object> data) { lifeCycleManager.taskOperation(Operation.Complete, taskId, userId, null, data, null); }
public void claim(long taskId, String userId) { lifeCycleManager.taskOperation(Operation.Claim, taskId, userId, null, null, null); }
public void activate(long taskId, String userId) { lifeCycleManager.taskOperation(Operation.Activate, taskId, userId, null, null, null); }