[rules-users] Dynamic changes to drl file

Mark Proctor mproctor at codehaus.org
Thu Aug 23 10:06:37 EDT 2007


yes you have to add the changed DRL yourself manually, we do not monitor 
hte DRL resources on the disk.

Mark
Arsalan S. Zaidi wrote:
> Hi.
>
> I'm no expert, but I think you have to 'recompile' the drl file using
> PackageBuilder if you change it on disk and wish to use the new version.
>
> --Arsalan
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of pns77
> Sent: 23 August 2007 18:48
> To: rules-users at lists.jboss.org
> Subject: [rules-users] Dynamic changes to drl file
>
>
> Have been stuck with this for quite some time now. Would appreciate if
> anyone
> could help me out.
>
> I was checking if changes could be made to the rule file at runtime and
> the
> following is the block of code that i tried
>
>             RuleBase ruleBase = readRule();
>             WorkingMemory workingMemory =
> ruleBase.newStatefulSession(false); // to keep reference
>             // Create a message object
>             workingMemory.insert( message );
>             workingMemory.fireAllRules();
>
> When i try chaning the "drl" file at run time the change doesnt get
> reflected. Is there anything else i need to be doing here?  Any
> additional
> jar files ?
>
> To have this change take effect at runtime - do i need to create a new
> session for each run or do i need to retain the session - i tried both
> "newStatefulSession(false)" and "newStatefulSession()" - get the same
> result
> with both. 
>   




More information about the rules-users mailing list