public String notifyWhenNotCompleted(String containerId, Number taskId, String timeExpression, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to EmailNotification (when not completed) of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); EmailNotification emailNotification = marshallerHelper.unmarshal(containerId, payload, marshallingType, EmailNotification.class, new ByTaskIdContainerLocator(taskId.longValue())); logger.debug("Email notification to be added to a task {} is {}", taskId, emailNotification); org.kie.internal.task.api.model.EmailNotification email = buildEmail(emailNotification); Long id = userTaskAdminService.notifyWhenNotCompleted(containerId, taskId.longValue(), timeExpression, email); logger.debug("Email notification (when not completed) {} added successfully to task {} to be fired after {}", emailNotification, taskId, timeExpression); String response = marshallerHelper.marshal(containerId, marshallingType, id, new ByTaskIdContainerLocator(taskId.longValue())); return response; }
public void removePotentialOwners(String containerId, Number taskId, List<String> orgEntities, boolean isUser) { logger.debug("About to remove {} from task {} as potential owners", orgEntities, taskId); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(orgEntities, isUser); userTaskAdminService.removePotentialOwners(containerId, taskId.longValue(), entities); logger.debug("Potential owners {} removed task {}", entities, taskId); }
@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)); }
new RuntimeDataServiceBase(runtimeDataService, context), new ExecutorServiceBase(executorService, context), new QueryDataServiceBase(queryService, context), new DocumentServiceBase(context), new ProcessAdminServiceBase(processInstanceMigrationService, processInstanceAdminService, context), new UserTaskAdminServiceBase(userTaskAdminService, context));
public void addBusinessAdmins(String containerId, Number taskId, boolean removeExisting, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); userTaskAdminService.addBusinessAdmins(containerId, taskId.longValue(), removeExisting, entities); logger.debug("Business admins {} added to task {}", entities, taskId); }
public String notifyWhenNotStarted(String containerId, Number taskId, String timeExpression, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to EmailNotification (when not started) of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); EmailNotification emailNotification = marshallerHelper.unmarshal(containerId, payload, marshallingType, EmailNotification.class, new ByTaskIdContainerLocator(taskId.longValue())); logger.debug("Email notification to be added to a task {} is {}", taskId, emailNotification); org.kie.internal.task.api.model.EmailNotification email = buildEmail(emailNotification); Long id = userTaskAdminService.notifyWhenNotStarted(containerId, taskId.longValue(), timeExpression, email); logger.debug("Email notification (when not started) {} added successfully to task {} to be fired after {}", emailNotification, taskId, timeExpression); String response = marshallerHelper.marshal(containerId, marshallingType, id, new ByTaskIdContainerLocator(taskId.longValue())); return response; }
public void removeBusinessAdmins(String containerId, Number taskId, List<String> orgEntities, boolean isUser) { logger.debug("About to remove {} from task {} as business admins", orgEntities, taskId); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(orgEntities, isUser); userTaskAdminService.removeBusinessAdmins(containerId, taskId.longValue(), entities); logger.debug("Business admins {} removed task {}", entities, taskId); }
public void addPotentialOwners(String containerId, Number taskId, boolean removeExisting, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); userTaskAdminService.addPotentialOwners(containerId, taskId.longValue(), removeExisting, entities); logger.debug("Potential owners {} added to task {}", entities, taskId); }
public void addExcludedOwners(String containerId, Number taskId, boolean removeExisting, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); userTaskAdminService.addExcludedOwners(containerId, taskId.longValue(), removeExisting, entities); logger.debug("Excluded owners {} added to task {}", entities, taskId); }
public void removeExcludedOwners(String containerId, Number taskId, List<String> orgEntities, boolean isUser) { logger.debug("About to remove {} from task {} as excluded owners", orgEntities, taskId); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(orgEntities, isUser); userTaskAdminService.removeExcludedOwners(containerId, taskId.longValue(), entities); logger.debug("Excluded owners {} removed task {}", entities, taskId); }
public String reassignWhenNotCompleted(String containerId, Number taskId, String timeExpression, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to list of org entities (users/groups)", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); Long id = userTaskAdminService.reassignWhenNotCompleted(containerId, taskId.longValue(), timeExpression, entities); logger.debug("Reassignment (when not completed) to {} successfully created for task {} to fire at {}", entities, taskId, timeExpression); String response = marshallerHelper.marshal(containerId, marshallingType, id, new ByTaskIdContainerLocator(taskId.longValue())); return response; }
public String reassignWhenNotStarted(String containerId, Number taskId, String timeExpression, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to list of org entities (users/groups)", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); Long id = userTaskAdminService.reassignWhenNotStarted(containerId, taskId.longValue(), timeExpression, entities); logger.debug("Reassignment (when not started) to {} successfully created for task {} to fire at {}", entities, taskId, timeExpression); String response = marshallerHelper.marshal(containerId, marshallingType, id, new ByTaskIdContainerLocator(taskId.longValue())); return response; }