public void insert(ExecutionEntity execution) { CommandContext commandContext = Context.getCommandContext(); DbSqlSession dbSqlSession = commandContext.getDbSqlSession(); dbSqlSession.insert(this); if (execution != null) { execution.addTask(this); } commandContext.getHistoryManager().recordTaskCreated(this, execution); }