Compound DSL statements
by Chris Selwyn
I tried creating a DSL something like the following:-
[when] there is a QQ with attr equal to {YYY} = there is a Q - with attr
equal to {YYY}
[when]there is a Q = Question()
[when] - with attr equal to {YYY} = attr == "{YYY}"
but I find that the expansion does not seem to work right.
When I use this like
when
there is a QQ with attr equal to abc
then
...
What this expands to is
Question() attr == "abc"
I was hoping that the condition would be put inside the pattern.
Is it not possible to make "compound" DSL statements that use inline "-"
clauses?
Chris Selwyn
13 years, 11 months
rulebase configuration Options
by Kumar, Ravendra
Hi Guys,
I am trying to find out more information about rulebase configuration
options written in "drools.default.rulebase.conf"
Do any of you guys know any blog or material written on these options,
If someone has written any blog on these options, and could I know the
location, it will a great help.
Thanks,
Rav.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of
rules-users-request(a)lists.jboss.org
Sent: 17 December 2010 08:57
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 49, Issue 44
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: "Negative" Rules (Ansgar Konermann)
2. Re: Using GlobalArea in Guvnor (Jervis Liu)
3. Re: Guvnor with JBoss AS on Ubuntu (alim)
4. Re: Deploying Guvnor 5.1 on Glassfish v3 (alim)
5. DroolsFlow 5.1.1 ForEach + XOR/OR Gateway = Impossible?
(Dirk Hermanns)
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Dec 2010 00:34:11 +0100
From: Ansgar Konermann <ansgar.konermann(a)googlemail.com>
Subject: Re: [rules-users] "Negative" Rules
To: rules-users(a)lists.jboss.org
Message-ID: <4D0AA1F3.20307(a)googlemail.com>
Content-Type: text/plain; charset="iso-8859-1"
On 15.12.2010 10:01, Diego San Esteban wrote:
> Greetings,
>
> How is itpossible to implement a "rollback"in theKB?
>
> Suppose that when retracting a fact,I want toundo the changes
made.
>
A very simple, yet effective solution would be to exclusively use
insertLogical(). No updates to facts which are already asserted, no
normal "insert".
Best regards
Ansgar
13 years, 11 months
activation-group issue
by Yaniv Itzhaki
Hi,
I have a group of rules with salience which I would like that only the first
activated rule will fire.
I cant use the activation-group attribute because each rule can fire number
of times, and i want only this rule to be fired in that group:
rule "A1"
salience 100
ruleflow-group "A"
activation-group "A"
when
xxx1
then
yyy1
end
rule "A2"
salience 90
ruleflow-group "A"
activation-group "A"
when
xxx2
then
yyy2
end
If Rule A1 run (activated number of times), rule A2 should not run.
Is there a way to do that? (no global flags etc.)
Thanks
Yaniv
13 years, 11 months
"Negative" Rules
by Diego San Esteban
Greetings,
How is it possible to implement a "rollback" in the KB?
Suppose that when retracting a fact, I want to undo the changes made.
Writing a negative (opposite) rule isn't efficient, it means declaring the
rule twice effectively. Also the negative rule is usually using lots of OR's
and NOT's which isn't fast.
Any help?
Thanks
13 years, 11 months
return value restriction: not all expressions supported?
by Wolfgang Laun
Using 5.1.1 and knowing that "a Return Value restriction is a parenthesized
expression composed from literals, any valid Java primitive or object,
previously bound variables, function calls, and operators" I wrote
OperatorOrder( $code: code, $id1: elId1, $id2: elId2 )
CommandCode( code == $code, operands != ( $id1!=null ? ($id2!=null ? 2 :
1) : 0 ) )
and got the erroneous error message:
Rule Compilation error : [Rule name='operator command: invalid number of
elements']
appl/domain/element/Rule_operator_command__invalid_number_of_elements_0.java
(9:714) : $id2 cannot be resolved
Variations in the return value restriction show that it is the nesting of
-?-:- which causes the bug; a similar (but not equivalent) expression
operands != ( ($id1!=null ? 1:0) + ($id2!=null ? 1:0) )
is accepted.
-W
13 years, 11 months
Case Studies and Success Stories
by Stephen Garvey
Hi everyone,
I hope someone can help me or point me in the right direction. I'm looking
for some case studies on how organisations successfully used Drools.
Organisations like those mentioned on the "Sightings" page. I've been
digging around the site(s) for the past couple of days and have found Red
Hat success stories for jBPM etc.->
http://customers.redhat.com/category/red-hat-jboss-solutions/jboss-enterp...
I was wondering if there was anything like these for Drools, maybe
explaining how people have successfully used Expert and Flow together. I was
at a conference earlier this summer where Mark Proctor gave an overview of
all things Drools and he mentioned some very interesting work going on with
US Navy Healthcare. Are there any of these types of case studies online?
Thanks in advance,
Stephen
13 years, 11 months
Can I create sub packages in Guvnor
by Harshit Bapna
Hello All,
I have gone through the Guvnor UI and I couldn't find a way to create sub
packages under parent package.
for ex: Under package Mortgage, I want to create subMortgage.
*Also I found a method createSubPackage in RepositoryService but not able to
get the UI way to create a subpackage.*
/**
* This creates a package of the given name, and checks it in.
* @return UUID of the created item.
*/
public String createSubPackage(String name,
String description,
String parentPackage) throws
SerializationException;
13 years, 11 months
Re: [rules-users] Guvnor 5.1: Can't open assets - "Unable to validate package configuration"
by Scott Mayne
My apologies, I should have looked a little deeper. The Guvnor Event Log showed I was missing a class in my POJO Model JAR; I fixed that and now everything is working fine.
--- On Wed, 12/15/10, Scott Mayne <smayne(a)webfinancialsolutions.com> wrote:
From: Scott Mayne <smayne(a)webfinancialsolutions.com>
Subject: Guvnor 5.1: Can't open assets - "Unable to validate package configuration"
To: rules-users(a)lists.jboss.org
Date: Wednesday, December 15, 2010, 1:50 PM
Hi all,
Using Guvnor 5.1, I'm unable to open assets and get this message:
"* Unable to validate package configuration (eg, DSLs, models) for [CA.FH.BETACAU]. Suggestion completions may not operate correctly for graphical editors for this package.
* Unable to get content assistance for this rule."
I've searched around and it seemed like it might be related to
https://issues.jboss.org/browse/BRMS-425
so I gave the user admin, package.admin and package.developer permission for everything, but it still pops up the same error. Is there any workaround/explanation/quick fix for this behavior?
13 years, 11 months
Guvnor 5.1: Can't open assets - "Unable to validate package configuration"
by Scott Mayne
Hi all,
Using Guvnor 5.1, I'm unable to open assets and get this message:
"* Unable to validate package configuration (eg, DSLs, models) for [CA.FH.BETACAU]. Suggestion completions may not operate correctly for graphical editors for this package.
* Unable to get content assistance for this rule."
I've searched around and it seemed like it might be related to
https://issues.jboss.org/browse/BRMS-425
so I gave the user admin, package.admin and package.developer permission for everything, but it still pops up the same error. Is there any workaround/explanation/quick fix for this behavior?
13 years, 11 months
Drools - Repeated Events and Temporal Relations
by rodih
Hi, In general I am writing rules for events which equal(by attributes
values) events can occur any time in consecutive manner(every second). I
want to fire rules for matched events only on an hourly bases.
In more details: I want to fire a rule when an event is inserted for the
first time (not exist yet) OR when an event is inserted and if and only if
equal events are already inserted to the working memory BUT the newest of
them is at least one hour ago old.
What is a reasonable way of writing a rule of that kind, taking events
duration will be 24H
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Repeated-Event...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 11 months