public void claim(String containerId, Number taskId, String userId) { userId = getUser(userId); logger.debug("About to claim task with id '{}' as user '{}'", taskId, userId); userTaskService.claim(taskId.longValue(), userId); }
@Override protected void configureServices(KieServerImpl kieServer, KieServerRegistry registry) { // all services are injected from JBPMAutoConfigure this.kieContainerCommandService = new JBPMKieContainerCommandServiceImpl(context, deploymentService, new DefinitionServiceBase(definitionService, context), new ProcessServiceBase(processService, definitionService, runtimeDataService, context), new UserTaskServiceBase(userTaskService, context), new RuntimeDataServiceBase(runtimeDataService, context), new ExecutorServiceBase(executorService, context), new QueryDataServiceBase(queryService, context), new DocumentServiceBase(context), new ProcessAdminServiceBase(processInstanceMigrationService, processInstanceAdminService, context), new UserTaskAdminServiceBase(userTaskAdminService, context)); }
.formName(((InternalTask) task).getFormName()) .status(task.getTaskData().getStatus().name()) .actualOwner(getOrgEntityIfNotNull(task.getTaskData().getActualOwner())) .createdBy(getOrgEntityIfNotNull(task.getTaskData().getCreatedBy())) .createdOn(task.getTaskData().getCreatedOn()) .activationTime(task.getTaskData().getActivationTime()) builder.potentialOwners(orgEntityAsList(task.getPeopleAssignments().getPotentialOwners())); builder.excludedOwners(orgEntityAsList(((InternalPeopleAssignments) task.getPeopleAssignments()).getExcludedOwners())); builder.businessAdmins(orgEntityAsList(task.getPeopleAssignments().getBusinessAdministrators()));
new ProcessServiceBase(processService, definitionService, runtimeDataService, context), new UserTaskServiceBase(userTaskService, context), new RuntimeDataServiceBase(runtimeDataService, context), new ExecutorServiceBase(executorService, context), new QueryDataServiceBase(queryService, context), new DocumentServiceBase(context), new ProcessAdminServiceBase(processInstanceMigrationService, processInstanceAdminService, context),
public void release(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to release task with id '{}' as user '{}'", taskId, userId); userTaskService.release(containerId, taskId.longValue(), userId); }
public void exit(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to exit task with id '{}' as user '{}'", taskId, userId); userTaskService.exit(containerId, taskId.longValue(), userId); }
public void skip(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to skip task with id '{}' as user '{}'", taskId, userId); userTaskService.skip(containerId, taskId.longValue(), userId); }
public void start(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to start task with id '{}' as user '{}'", taskId, userId); userTaskService.start(containerId, taskId.longValue(), userId); }
public void activate(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to activate task with id '{}' as user '{}'", taskId, userId); userTaskService.activate(containerId, taskId.longValue(), userId); }
public void delegate(String containerId, Number taskId, String userId, String targetUserId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to delegate task with id '{}' as user '{}' to user '{}'", taskId, userId, targetUserId); userTaskService.delegate(containerId, taskId.longValue(), userId, targetUserId); }
public void forward(String containerId, Number taskId, String userId, String targetUserId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to forward task with id '{}' as user '{}' to user '{}'", taskId, userId, targetUserId); userTaskService.forward(containerId, taskId.longValue(), userId, targetUserId); }
public void resume(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to resume task with id '{}' as user '{}'", taskId, userId); userTaskService.resume(containerId, taskId.longValue(), userId); }
public void stop(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to stop task with id '{}' as user '{}'", taskId, userId); userTaskService.stop(containerId, taskId.longValue(), userId); }
public void suspend(String containerId, Number taskId, String userId) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to suspend task with id '{}' as user '{}'", taskId, userId); userTaskService.suspend(containerId, taskId.longValue(), userId); }
public void complete(String containerId, Number taskId, String userId, String payload, String marshallerType) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to unmarshal task outcome parameters from payload: '{}'", payload); Map<String, Object> parameters = marshallerHelper.unmarshal(containerId, payload, marshallerType, Map.class); logger.debug("About to complete task with id '{}' as user '{}' with data {}", taskId, userId, parameters); userTaskService.complete(containerId, taskId.longValue(), userId, parameters); }
public void fail(String containerId, Number taskId, String userId, String payload, String marshallerType) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to unmarshal task failure data from payload: '{}'", payload); Map<String, Object> parameters = marshallerHelper.unmarshal(containerId, payload, marshallerType, Map.class); logger.debug("About to fail task with id '{}' as user '{}' with data {}", taskId, userId, parameters); userTaskService.fail(containerId, taskId.longValue(), userId, parameters); }
public void completeAutoProgress(String containerId, Number taskId, String userId, String payload, String marshallerType) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to unmarshal task outcome parameters from payload: '{}'", payload); Map<String, Object> parameters = marshallerHelper.unmarshal(containerId, payload, marshallerType, Map.class); logger.debug("About to complete task with id '{}' as user '{}' with data {}", taskId, userId, parameters); userTaskService.completeAutoProgress(containerId, taskId.longValue(), userId, parameters); }
public void nominate(String containerId, Number taskId, String userId, List<String> potentialOwners) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to nominate task with id '{}' as user '{}' to potential owners", taskId, userId, potentialOwners); List<OrganizationalEntity> potOwnerEntities = new ArrayList<OrganizationalEntity>(); for (String potOwnerId : potentialOwners) { potOwnerEntities.add(TaskModelProvider.getFactory().newUser(potOwnerId)); } userTaskService.nominate(containerId, taskId.longValue(), userId, potOwnerEntities); }
public String addAttachment(String containerId, Number taskId, String userId, String name, String attachmentPayload, String marshallingType) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); logger.debug("About to unmarshal task attachment from payload: '{}'", attachmentPayload); Object attachment = marshallerHelper.unmarshal(containerId, attachmentPayload, marshallingType, Object.class); logger.debug("About to add attachment on a task with id '{}' with data {}", taskId, attachment); Long attachmentId = userTaskService.addAttachment(containerId, taskId.longValue(), getUser(userId), name, attachment); String response = marshallerHelper.marshal(containerId, marshallingType, attachmentId); return response; }
public void update(String containerId, Number taskId, String userId, String payload, String marshallerType) { containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userId = getUser(userId); logger.debug("About to unmarshal task instances from payload: '{}'", payload); TaskInstance updatedTask = marshallerHelper.unmarshal(containerId, payload, marshallerType, TaskInstance.class); logger.debug("About to update task with id '{}' as user '{}' with data {}", taskId, userId, updatedTask); UserTaskInstanceDesc task = new UserTaskInstanceDesc(taskId.longValue(), updatedTask.getName(), updatedTask.getDescription(), updatedTask.getPriority(), updatedTask.getExpirationDate(), updatedTask.getFormName()); userTaskService.updateTask(containerId, taskId.longValue(), userId, task, updatedTask.getInputData(), updatedTask.getOutputData()); }