@Override public void performExecution(ActivityExecution execution) throws Exception { TaskEntity task = TaskEntity.createAndInsert(execution); taskDecorator.decorate(task, execution); Context.getCommandContext() .getHistoricTaskInstanceManager() .createHistoricTask(task); // All properties set, now firing 'create' event task.fireEvent(TaskListener.EVENTNAME_CREATE); }
@Override public void performExecution(ActivityExecution execution) throws Exception { TaskEntity task = TaskEntity.createAndInsert(execution); taskDecorator.decorate(task, execution); Context.getCommandContext() .getHistoricTaskInstanceManager() .createHistoricTask(task); // All properties set, now firing 'create' event task.fireEvent(TaskListener.EVENTNAME_CREATE); }
public TaskEntity createTask(TaskDecorator taskDecorator) { TaskEntity task = TaskEntity.createAndInsert(this); setTask(task); taskDecorator.decorate(task, this); Context.getCommandContext() .getHistoricTaskInstanceManager() .createHistoricTask(task); // All properties set, now firing 'create' event task.fireEvent(TaskListener.EVENTNAME_CREATE); return task; }
public TaskEntity createTask(TaskDecorator taskDecorator) { TaskEntity task = TaskEntity.createAndInsert(this); setTask(task); taskDecorator.decorate(task, this); Context.getCommandContext() .getHistoricTaskInstanceManager() .createHistoricTask(task); // All properties set, now firing 'create' event task.fireEvent(TaskListener.EVENTNAME_CREATE); 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; }
@Override public void performExecution(ActivityExecution execution) throws Exception { TaskEntity task = TaskEntity.createAndInsert(execution); taskDecorator.decorate(task, execution); Context.getCommandContext() .getHistoricTaskInstanceManager() .createHistoricTask(task); // All properties set, now firing 'create' event task.fireEvent(TaskListener.EVENTNAME_CREATE); }
public TaskEntity createTask(TaskDecorator taskDecorator) { TaskEntity task = TaskEntity.createAndInsert(this); setTask(task); taskDecorator.decorate(task, this); Context.getCommandContext() .getHistoricTaskInstanceManager() .createHistoricTask(task); // All properties set, now firing 'create' event task.fireEvent(TaskListener.EVENTNAME_CREATE); 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; }