for (int i = 0; i < length; i++ ) {
vars[i] = context.getVariable( unit.getOtherIdentifiers()[i] );
}
}
VariableResolverFactory factory = unit.getFactory( context, null, null, null, vars, null, (GlobalResolver) context.getKnowledgeRuntime().getGlobals() );
// do we have any functions for this namespace?
KnowledgePackage pkg = context.getKnowledgeRuntime().getKnowledgeBase().getKnowledgePackage( "MAIN" );
if ( pkg != null && pkg instanceof KnowledgePackageImp) {
MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) ((KnowledgePackageImp) pkg).pkg.getDialectRuntimeRegistry().getDialectData( id );
factory.setNextFactory( data.getFunctionFactory() );
}
Object value = MVEL.executeExpression( this.expr,
null,
factory );