public ExecutionResults execute(Context context) { for ( GenericCommand<?> command : commands ) { ((GenericCommand<?>)command).execute( context ); } return null; }
public ExecutionResults execute(Context context) { for ( GenericCommand<?> command : commands ) { ((GenericCommand<?>)command).execute( context ); } return null; }
public Object execute(GenericCommand command, Context context) { return command.execute( context ); } }
public <T> T execute(Command<T> command) { return ((GenericCommand<T>)command).execute(context); }
public Void execute(Context context) { if ( this.contextName == null ) { context.getContextManager().getContext( World.ROOT ).set( this.identifier, ((GenericCommand) this.cmd).execute( context ) ); } else { context.getContextManager().getContext( this.contextName ).set( this.identifier, ((GenericCommand) this.cmd).execute( context ) ); } return null; }
public Void execute(Context context) { Object actualObject = ((GenericCommand) command).execute( context ); if ( this.mvelString != null ) { actualObject = MVEL.eval( this.mvelString, actualObject ); } if ( this.expectedIdentifier != null ) { this.expectedObject = context.get( this.expectedIdentifier ); } Map vars = new HashMap(); vars.put( "expected", expectedObject ); vars.put( "actual", actualObject ); if ( ((Boolean) MVEL.eval( "expected != actual", vars )) ) { throw new AssertionError( format( this.message, expectedObject, actualObject ) ); } // Assert.assertTrue( this.message, // (Boolean) MVEL.eval( "expected == actual", // vars ) ); return null; }
public <T> T execute(Context context, Command<T> command) { ExecutionResultImpl results = null; if ( context != null ) { results = (ExecutionResultImpl) ((KnowledgeCommandContext) context).getExecutionResults(); } if ( results == null ) { results = new ExecutionResultImpl(); } if ( !(command instanceof BatchExecutionCommandImpl) ) { return (T) ((GenericCommand) command).execute( new FixedKnowledgeCommandContext( context, null, this.kbase, this, results ) ); } try { session.startBatchExecution( results ); ((GenericCommand) command).execute( new FixedKnowledgeCommandContext( context, null, this.kbase, this, results ) ); ExecutionResults result = session.getExecutionResult(); return (T) result; } finally { session.endBatchExecution(); } }
public Object execute(Context context) { FixedKnowledgeCommandContext kcContext = new FixedKnowledgeCommandContext( context, (KnowledgeBuilder) context.get( this.kbuilderIdentifier ), (KnowledgeBase) context.get( this.kbaseIdentifier ), (StatefulKnowledgeSession) context.get( this.statefulKsessionName ), (WorkingMemoryEntryPoint) context.get(this.workingMemoryEntryPointName), (ExecutionResultImpl) context.get( this.kresults ) ); return ((GenericCommand) command).execute( kcContext ); }
cmd.execute( localSessionContext );
((StatefulKnowledgeSessionImpl) ksession).session.startBatchExecution( new ExecutionResultImpl() ); Object o = ((GenericCommand) command).execute( context );