@Override public RequestContext createContext() { return owner.createContext(); } }
if (service == null) { TaskEventSupport taskEventSupport = new TaskEventSupport(); this.commandExecutor = new TaskCommandExecutorImpl(this.environment, taskEventSupport); if (userGroupCallback == null) { userGroupCallback = new MvelUserGroupCallbackImpl(true); addErrorHandlingInterceptor(); for (PriorityInterceptor pInterceptor : interceptors) { this.commandExecutor.addInterceptor(pInterceptor.getInterceptor());
CommandService executor = new TaskCommandExecutorImpl(EnvironmentFactory.newEnvironment(), taskEventSupport); jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(TaskService.class.getName(), new CommandBasedTaskService(executor, taskEventSupport));
@Override public RequestContext execute(Executable executable, RequestContext context) { for (Batch batch : ( (InternalExecutable) executable ).getBatches()) { for (Command command : batch.getCommands()) { if (command instanceof TaskCommand) { TaskContext ctx = new TaskContext(context, environment, taskEventSupport); addUserIdToContext((TaskCommand<?>) command, ctx); Object result = ((ExecutableCommand) command).execute( ctx ); context.set("Result", result); } else { throw new IllegalArgumentException("Task service can only execute task commands"); } } } return context; }
CommandService executor = new TaskCommandExecutorImpl(EnvironmentFactory.newEnvironment(), taskEventSupport); jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(TaskService.class.getName(), new CommandBasedTaskService(executor, taskEventSupport));