Search in sources :

Example 1 with RemoveTaskDataCommand

use of org.jbpm.kie.services.impl.admin.commands.RemoveTaskDataCommand in project jbpm by kiegroup.

the class UserTaskAdminServiceImpl method removeTaskInputs.

@Override
public void removeTaskInputs(String deploymentId, long taskId, String... name) throws TaskNotFoundException {
    UserTaskInstanceDesc task = runtimeDataService.getTaskById(taskId);
    validateTask(deploymentId, taskId, task);
    userTaskService.execute(task.getDeploymentId(), ProcessInstanceIdContext.get(task.getProcessInstanceId()), new RemoveTaskDataCommand(identityProvider.getName(), taskId, Arrays.asList(name), true));
}
Also used : RemoveTaskDataCommand(org.jbpm.kie.services.impl.admin.commands.RemoveTaskDataCommand) UserTaskInstanceDesc(org.jbpm.services.api.model.UserTaskInstanceDesc)

Example 2 with RemoveTaskDataCommand

use of org.jbpm.kie.services.impl.admin.commands.RemoveTaskDataCommand in project jbpm by kiegroup.

the class UserTaskAdminServiceImpl method removeTaskOutputs.

@Override
public void removeTaskOutputs(String deploymentId, long taskId, String... name) throws TaskNotFoundException {
    UserTaskInstanceDesc task = runtimeDataService.getTaskById(taskId);
    validateTask(deploymentId, taskId, task);
    userTaskService.execute(task.getDeploymentId(), ProcessInstanceIdContext.get(task.getProcessInstanceId()), new RemoveTaskDataCommand(identityProvider.getName(), taskId, Arrays.asList(name), false));
}
Also used : RemoveTaskDataCommand(org.jbpm.kie.services.impl.admin.commands.RemoveTaskDataCommand) UserTaskInstanceDesc(org.jbpm.services.api.model.UserTaskInstanceDesc)

Aggregations

RemoveTaskDataCommand (org.jbpm.kie.services.impl.admin.commands.RemoveTaskDataCommand)2 UserTaskInstanceDesc (org.jbpm.services.api.model.UserTaskInstanceDesc)2