public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed) { bool bound = false; if (params_Renamed.Length == 2) { String name = params_Renamed[0].StringValue; Object val = null; if (params_Renamed[1] is ValueParam) { val = params_Renamed[1].Value; } else if (params_Renamed[1] is FunctionParam2) { FunctionParam2 fp2 = (FunctionParam2) params_Renamed[1]; fp2.Engine = engine; fp2.lookUpFunction(); DefaultReturnVector drv = (DefaultReturnVector) fp2.Value; val = drv.firstReturnValue().Value; } engine.setBindingValue(name, val); bound = true; } DefaultReturnVector ret = new DefaultReturnVector(); DefaultReturnValue rv = new DefaultReturnValue(Constants.BOOLEAN_OBJECT, bound); ret.addReturnValue(rv); return ret; }