[rules-users] Error using drools.net for web application
rulesengine.eval
steve.mark.barash at gmail.com
Tue Dec 13 11:20:26 EST 2011
I have seen a few posts on this, but nothing that seems to solve it.
I have used drools.net working successfully locally in a windows app with
the following code:
PackageBuilder builder = new PackageBuilder();
Stream stream =
Assembly.GetExecutingAssembly().GetManifestResourceStream("MinimalDroolsForm.SimpleRules.drl");
builder.AddPackageFromDrl("MinimalDroolsForm.SimpleRules.drl",
stream);
Package pkg = builder.GetPackage();
ruleBase = RuleBaseFactory.NewRuleBase();
ruleBase.AddPackage(pkg);
workingMemory = ruleBase.NewWorkingMemory();
workingObj = new CustomerRecord();
etc.
However, when I try something similar in a web app, I get the following
error at builder.AddPackageFromDrl("DroolsApp.SimpleRules.drl", stream); :
"The invoked member is not supported in a dynamic assembly"
I am using all of the following assemblies:
1) drools-3.0
2) drools-dep
3) drools.dotnet
4) IKVM.GNU.Classpath
5) IKVM.Runtime
Additionally, My rule is very simple:
package DroolsApp
rule "OldCustomer"
when
cust : CustomerRecord( DaysSinceLastOrder > 90, Status !=
"Re-Active" )
then
true;
end
I am targeting the .NET Framework 4, and running on Windows7, under IIS7.
Please let me know if you need any additional information.
Thank you.
--
View this message in context: http://drools.46999.n3.nabble.com/Error-using-drools-net-for-web-application-tp3582769p3582769.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list