[rules-users] Rule storage

Michael Anstis michael.anstis at gmail.com
Mon Mar 28 10:55:48 EDT 2011


Hi Frank,

The rules are, on the whole, stored as XML (RuleModel passed through
XStream). See a previous exchange of emails on this forum about RuleModel,
it might prove useful.

However this is how we hand Rule persistence off to JCR; which in turn
stores it in another, lets say, internal format. Unfortunately I've not ran
JCR against a database to know what the resulting tables look like.

A colleague suggested use of DSL might help as you'd only need update the
DSL and recompile all rules. Might be worth a look?

Otherwise, using the REST API, or WEBDAV (not sure if it's more limited) to
retrieve a list of rules that can then be iterated and updated before
writing back might be the best option :(

With kind regards,

Mike

On 28 March 2011 15:37, FrankVhh <frank.vanhoenshoven at agserv.eu> wrote:

> Hi,
>
> Tx agaiin for the clarification on the .xml file. It makes a lot more
> sense,
> now.
>
> Bulk update is indeed not provided, I was hoping to have a look at the way
> the rules were stored (probably plain drl, or isn't it?) to assess what
> effort a bulk update would take.
>
> If you mean by your last statement to have rules that set the initial base
> price, and afterwards add rules to modify the base price (when beverage(),
> then b.augmentBasePrice(5)), I absolutely agree it is the best solution,
> implementation-wise.
>
> Regarding rule management and governance, there are a few issues that might
> arise.
>     1) It is more difficult to get a view on your base prices
>     2) What if base prices are adapted manually to the desired level? Which
> "adaptation rules" need to be deleted or changed?
>
> I am not saying that this should be basic functionality of a brms, neither
> am I very fond of the requirement myself. As it shifts the burden of work
> from the business to the more technical people :-)
>
> Regards,
> Frank
>
>
> manstis wrote:
> >
> > mortgage-sample-repository.xml is the example repository installed into
> > Guvnor when you first deploy (and answer &quot;yes&quot; to the install
> > examples
> > prompt).
> >
> > Changing this XML will therefore have no effect, unless you re-import the
> > XML too using the Administration functions in Guvnor.
> >
> > In order to achieve what you state you'd need to (a) use the JCR API to
> > query the underlying datastore, (b) re-build your binary rule package. We
> > don't provide a bulk update facility.
> >
> > Given your example would it be not best to have Beverages themselves as
> > Facts and have rules that set their prices?
> >
> > Think of the Rules Engine as a RDBMS and the Facts as records.
> >
> > With kind regards,
> >
> > Mike
> >
> > On 28 March 2011 14:09, FrankVhh &lt;frank.vanhoenshoven at agserv.eu&gt;
> > wrote:
> >
> > &gt; Hi,
> > &gt;
> > &gt; Thanks for your quick reply, Salaboy.
> > &gt;
> > &gt; Webdav indeed allow me to browse through the packages and I was able
> > to
> > &gt; locate a file mortgage-sample-repository.xml in the folder
> > WEB-INF/classes
> > &gt; of drools-fuvnor.war.
> > &gt;
> > &gt; However, changes in the xml did not show up in Guvnor and vice
> versa.
> > So,
> > &gt; jackrabbit has to store its contents somewhere else. The folder
> > &gt; &quot;repository&quot;
> > &gt; only consists of class-files.
> > &gt;
> > &gt; The reason I am looking for this file, is because I am looking for
> > ways to
> > &gt; simultaneously update multiple rule parameters, without adding a new
> > rule
> > &gt; to
> > &gt; the ruleset. F.e. we want all base prices of our beverages to
> > increase by
> > &gt; 5%.
> > &gt;
> > &gt; It would be as if you run an sql update statement on a &quot;rule
> > database&quot;.
> > &gt; You'll probably need to parse the drl to achieve this.
> > &gt;
> > &gt; Regards,
> > &gt; Frank
> > &gt;
> > &gt; --
> > &gt; View this message in context:
> > &gt;
> >
> http://drools-java-rules-engine.46999.n3.nabble.com/Rule-storage-tp2742515p2743044.html
> > &gt; Sent from the Drools - User mailing list archive at Nabble.com.
> > &gt; _______________________________________________
> > &gt; rules-users mailing list
> > &gt; rules-users at lists.jboss.org
> > &gt; https://lists.jboss.org/mailman/listinfo/rules-users
> > &gt;
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Rule-storage-tp2742515p2743373.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110328/ce7d4b44/attachment.html 


More information about the rules-users mailing list