/** creates and initializes a new persistent task. */ public static TaskEntity createAndInsert(VariableScope execution) { TaskEntity task = create(); if (execution instanceof ExecutionEntity) { ExecutionEntity executionEntity = (ExecutionEntity) execution; task.setExecution(executionEntity); task.skipCustomListeners = executionEntity.isSkipCustomListeners(); task.insert(executionEntity); return task; } else if (execution instanceof CaseExecutionEntity) { task.setCaseExecution((DelegateCaseExecution) execution); } task.insert(null); return task; }
/** creates and initializes a new persistent task. */ public static TaskEntity createAndInsert(VariableScope execution) { TaskEntity task = create(); if (execution instanceof ExecutionEntity) { ExecutionEntity executionEntity = (ExecutionEntity) execution; task.setExecution(executionEntity); task.skipCustomListeners = executionEntity.isSkipCustomListeners(); task.insert(executionEntity); return task; } else if (execution instanceof CaseExecutionEntity) { task.setCaseExecution((DelegateCaseExecution) execution); } task.insert(null); return task; }
public Void execute(CommandContext commandContext) { ensureNotNull("task", task); String operation; if (task.getRevision() == 0) { try { checkCreateTask(task, commandContext); task.insert(null); commandContext.getHistoricTaskInstanceManager().createHistoricTask(task); operation = UserOperationLogEntry.OPERATION_TYPE_CREATE; task.executeMetrics(Metrics.ACTIVTY_INSTANCE_START); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } } else { checkTaskAssign(task, commandContext); task.update(); operation = UserOperationLogEntry.OPERATION_TYPE_UPDATE; } task.fireAuthorizationProvider(); task.fireEvents(); task.createHistoricTaskDetails(operation); return null; }
public Void execute(CommandContext commandContext) { ensureNotNull("task", task); String operation; if (task.getRevision() == 0) { try { checkCreateTask(task, commandContext); task.insert(null); commandContext.getHistoricTaskInstanceManager().createHistoricTask(task); operation = UserOperationLogEntry.OPERATION_TYPE_CREATE; task.executeMetrics(Metrics.ACTIVTY_INSTANCE_START); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } } else { checkTaskAssign(task, commandContext); task.update(); operation = UserOperationLogEntry.OPERATION_TYPE_UPDATE; } task.fireAuthorizationProvider(); task.fireEvents(); task.createHistoricTaskDetails(operation); return null; }
/** creates and initializes a new persistent task. */ public static TaskEntity createAndInsert(VariableScope execution) { TaskEntity task = create(); if (execution instanceof ExecutionEntity) { ExecutionEntity executionEntity = (ExecutionEntity) execution; task.setExecution(executionEntity); task.skipCustomListeners = executionEntity.isSkipCustomListeners(); task.insert(executionEntity); return task; } else if (execution instanceof CaseExecutionEntity) { task.setCaseExecution((DelegateCaseExecution) execution); } task.insert(null); return task; }
public Void execute(CommandContext commandContext) { ensureNotNull("task", task); String operation; if (task.getRevision() == 0) { try { checkCreateTask(task, commandContext); task.insert(null); commandContext.getHistoricTaskInstanceManager().createHistoricTask(task); operation = UserOperationLogEntry.OPERATION_TYPE_CREATE; task.executeMetrics(Metrics.ACTIVTY_INSTANCE_START); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } } else { checkTaskAssign(task, commandContext); task.update(); operation = UserOperationLogEntry.OPERATION_TYPE_UPDATE; } task.fireAuthorizationProvider(); task.fireEvents(); task.createHistoricTaskDetails(operation); return null; }