}
this.arguments = arguments;
}
public QueryResults execute(Context context) {
KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
if ( this.arguments == null || this.arguments.isEmpty() ) {
this.arguments = Collections.emptyList();
}
for (int j = 0; j < arguments.size(); j++) {
if (arguments.get(j) instanceof Variable) {
arguments.set(j, Variable.v);
}
}
QueryResults results = ksession.getQueryResults( name, this.arguments.toArray() );
if ( this.outIdentifier != null ) {
if(((StatefulKnowledgeSessionImpl)ksession).session.getExecutionResult() != null){
((StatefulKnowledgeSessionImpl)ksession).session.getExecutionResult().getResults().put( this.outIdentifier, results );
}