public AbstractOperation(CommandContext commandContext, ExecutionEntity execution) { this.commandContext = commandContext; this.execution = execution; this.agenda = commandContext.getAgenda(); }
public static ActivitiEngineAgenda getAgenda() { return getCommandContext().getAgenda(); }
commandContext.getAgenda().planTakeOutgoingSequenceFlowsOperation(execution, true);
@Override @SuppressWarnings("unchecked") public <T> T execute(final CommandConfig config, final Command<T> command) { final CommandContext commandContext = Context.getCommandContext(); // Execute the command. // This will produce operations that will be put on the agenda. commandContext.getAgenda().planOperation(new Runnable() { @Override public void run() { commandContext.setResult(command.execute(commandContext)); } }); // Run loop for agenda executeOperations(commandContext); // At the end, call the execution tree change listeners. // TODO: optimization: only do this when the tree has actually changed (ie check dbSqlSession). if (commandContext.hasInvolvedExecutions()) { Context.getAgenda().planExecuteInactiveBehaviorsOperation(); executeOperations(commandContext); } return (T) commandContext.getResult(); }
commandContext.getAgenda().planContinueProcessOperation(execution);
public AbstractOperation(CommandContext commandContext, ExecutionEntity execution) { this.commandContext = commandContext; this.execution = execution; this.agenda = commandContext.getAgenda(); }
public static ActivitiEngineAgenda getAgenda() { return getCommandContext().getAgenda(); }
commandContext.getAgenda().planTakeOutgoingSequenceFlowsOperation(execution, true);
@Override @SuppressWarnings("unchecked") public <T> T execute(final CommandConfig config, final Command<T> command) { final CommandContext commandContext = Context.getCommandContext(); // Execute the command. // This will produce operations that will be put on the agenda. commandContext.getAgenda().planOperation(new Runnable() { @Override public void run() { commandContext.setResult(command.execute(commandContext)); } }); // Run loop for agenda executeOperations(commandContext); // At the end, call the execution tree change listeners. // TODO: optimization: only do this when the tree has actually changed (ie check dbSqlSession). if (commandContext.hasInvolvedExecutions()) { Context.getAgenda().planExecuteInactiveBehaviorsOperation(); executeOperations(commandContext); } return (T) commandContext.getResult(); }
commandContext.getAgenda().planContinueProcessOperation(execution);