Sorry, it is Mark not Mike :)
________________________________________
From: Santoshi, Vishal
Sent: Monday, May 19, 2008 10:32 AM
To: 'Rules Dev List'
Subject: RE: [rules-dev] SMF drools 4.x
Thank u for replying.
Mike I had created using drools 2.x drl that looked like the one below.
As is evident the ConditionFactory and ConsequenceFactory concept in drools2.x allowed me
to parse the conditions tag ( a sunsequent conditon tags ) as I had a good control on
parsing the drl file.
As also is evident that my condition was an expression , whose lexing , parsing and
execution could be controlled by my code. The execution was of course based on a session
object that was asserted in the working memory.
It also allowed me to identify my Consequences with enhancements.
The result of the parsing was a customized Condition object or a Consequnce Object , whose
execution ( conditional when as well a than ) was controlled through my code .
<rule-set name="qbank"
xmlns="http://drools.org/rules"
xmlns:g="g"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/rules rules.xsd
http://doctype.gallup.com/schema/g grules.xsd">
<rule name="reset_next_page_to_current_page" salience="998">
<g:conditions>
<g:condition>isBackButtoned() eq ‘true’</g:condition>
</g:conditions>
<g:actions>
<g:assign src="jndi://rules.setNextPageToCurrentPage">
</g:assign>
</g:actions>
</rule>
,
,
,
</rule-set>
My question is , whether I would be able to use templating via DSL to achieve the same
level of granular control, where the “when” and the “than” can be controlled by my code.
I am open to restructuring the code ( ditching it and rewriting it ) provided I can get
the same granular control over execution , both during parsing (RuleSet creation) and
execution ( Tuple based invoke() and isAllowed() ) .
Is that even possible?
From: rules-dev-bounces(a)lists.jboss.org [mailto:rules-dev-bounces@lists.jboss.org] On
Behalf Of Mark Proctor
Sent: Monday, May 19, 2008 10:13 AM
To: Rules Dev List
Subject: Re: [rules-dev] SMF drools 4.x
Santoshi, Vishal wrote:
I am old school drools 2.x and had created based on the HOUSE example created by own SMF
DSL based on drools 2.x.
Than had to take a sabbatical from that project.
As of today, I have been asked to resurrect that project and not a whole lot of drools 2.x
has made it to 4.x and of course would like to remain current.
You should look at the sentence templating via the DSL stuff.
My implementation had an expression engine ( SableCC ) that I had fused in with a
customized Semantic Module.
I can get more information out for u , if there is a way to resuse some code.
Any pointers as to how to go about doing this will be highly appreciated.
http://blog.athico.com/2007/12/drools-extensible-process-definition.html seems to be an
attempt to explain how the port can take place, but does not seem to have a lot of
concreteness around it.
Nope nothng more on that, and while it does work for the rules xml, I wouldn't
recommend it, try the DSL approach first. If you do need to find out more on the XML
stuff, you'll need to look at the impl itself for processes and figure out how to
apply it to rules.
________________________________
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org<mailto:rules-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-dev