Any support for use of Timers / Calendars in Decision table (DURATION?)
by Uday Kodukula
Hello,
I am trying to incorporate logic within my decision table where certain
rules are activated based on the Day of the week, and also time of day.
I noticed the presence of date-effective and date-expires, however that
doesn't take the timer / cron approach that I would like. I understand that
the rules can still be evaluated to true, and all that the Calendar / Timer
would do is preventing it from firing.
Also, I couldn't find much documentation on how to use the "DURATION"
attribute. Perhaps because it is now deprecated and we should be using
Calendars / Timers? (see reference below).
That being said, how can I can i use calendars / timers from a decision
table? Is that even supported yet?
Thanks,
Uday
---
"duration
default value: no default value
type: long
The duration dictates that the rule will fire after a specified
duration, if it is still true.
5.8.2. Timers and Calendars
Rule's now suport both interval and cron based timers, which replace the now
deprecated duration attribute."
(http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/tr...)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Any-support-for-use-o...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Drools server support serviceTask?
by sam.squire@paretopartners.com
I have tried using a serviceTask with Drools console but received an
error. I am guessing the gwt-console-server does not add a service task
handler like you would have to do if running locally. Is this true?
This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.
14 years, 2 months
New project is Drools Engine suitable for it ?
by Gregory Czerwinski
Question about Drools usage ?
Hello All.
I have question about using Drools in my new project. I have this kind of
scenario to fufill with rules engine.
Scenarios.
Each user has it own set of rules that determine if he should be notified
about event,
and those are fully editable by system administrators.
There are also global rules indicating that User should be notified – common
for all users.
My question is how to use Drools engine in this concert situation, as it is
not global set of rules that can be putted once in to engine, but set of
changing per User rules ?
Thanks for help : )
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/New-project-is-Drools...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
no viable alternative at input 'or'
by chrbonte
Hi
I'm struggling with the rule syntax. I took over this drools project of a
collegue who left the company and am struggling with a bug in our
application.
The following works:
rule "cbo2"
when
(or
Patient(sex == "F")
Patient(sex == "")
)
then
...
end
What doesn't work is the following:
rule "cbo"
when
(or
(or
Patient(sex == "F")
Patient(age > 2)
)
Patient(sex == "")
)
then
...
end
AND
rule "cbo"
when
(or
(or
Patient(sex == "F")
Patient(age > 2)
)
)
then
...
end
-------------------
Can someone please point me in the right direction or explain to me why I
get "no viable alternative at input 'or' with the last 2 examples?
Regards
Christophe
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/no-viable-alternative...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
xdrl, and-constraint-connective and from
by Veit Guna
Hi.
We're using Drools 5.1.0 together with the xdrl format.
Now we encounter a problem with the <from> element.
We're using it like so:
--cut here--
<dro:and-conditional-element>
<dro:pattern object-type="EMail" identifier="fctv_17263"/>
<dro:pattern object-type="String">
<dro:field-constraint field-name="this">
<dro:literal-restriction evaluator="==" value="true"/>
</dro:field-constraint>
<dro:from>
<dro:expression>fctv_17263.getHeaderValues("X-My-Header");
</dro:expression>
</dro:from>
</dro:pattern>
</dro:and-conditional-element>
--cut here--
Now we simply added an additional field-constraint within an
and-constraint-connective (for a not null check):
--cut here--
<dro:and-conditional-element>
<dro:pattern object-type="EMail" identifier="fctv_17263"/>
<dro:pattern object-type="String">
<dro:and-constraint-connective>
<dro:field-constraint field-name="this">
<dro:literal-restriction evaluator="!=" value="null"/>
</dro:field-constraint>
<dro:field-constraint field-name="this.toLowerCase">
<dro:literal-restriction evaluator="==" value="true"/>
</dro:field-constraint>
</dro:and-constraint-connective>
<dro:from>
<dro:expression>fctv_17263.getHeaderValues("X-My-Header");
</dro:expression>
</dro:from>
</dro:pattern>
</dro:and-conditional-element>
--cut here--
But that dies with a:
java.lang.RuntimeException: org.drools.compiler.DroolsParserException:
org.xml.sax.SAXParseException: <from> is after an invalid element:
org.drools.xml.Handler
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:545)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
...
...
Caused by: org.drools.compiler.DroolsParserException:
org.xml.sax.SAXParseException: <from> is after an invalid element:
org.drools.xml.Handler
at
org.drools.compiler.PackageBuilder.addPackageFromXml(PackageBuilder.java:304)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:468)
... 77 more
As I'm writing this, I encountered this is related to this:
https://jira.jboss.org/browse/JBRULES-2672
I added an updated patch that worksforme to the JIRA.
Maybe someone of the Drools team can verify it?
BTW: all drools-compiler testcases seem to work (5.1.1) after applying
the patch.
Thanks
Veit
14 years, 2 months
matrix style decision tables
by kioto mitsubisi
Hi all,
I want to use decision tables of Drools in xls format. I need tables to be matrix.
C1 C2 C3
C1 T
C2 F F
C3 T T F
My decision table should similar to something like above. It will be a symmetric matrix and the action or result will be the
corresponding cell. I mean I will give the parameters say C1 and C3 and drools will tell me that it is T.
Can I do this? in RuleMatrixSheetListener javadoc, it states something like matrix style decision tables
but I didn't understand anything from it.
14 years, 2 months
Declaring events programmatically
by Samuli Saarinen
Hello,
I'm looking for a way to declare facts as events using an API. Would
anyone happen to know if such an API exists in drools?
Cheers,
Samuli
--
Remion Oy Etävalvontajärjestelmät liiketoiminnan
Samuli Saarinen tehostamiseen
gsm +358 (0)50 3560075
fax +358 (0)3 2125064 www.remion.com
14 years, 2 months
Custom operator
by Bruno Freudensprung
Hello,
I'd like to implement a custom "lucenematches" operator that would
enable writing conditions like:
$d : Doc(text lucenematches "(foo AND bar) OR roam~0.8")
As I've taken a look at the following post on athico
(http://blog.athico.com/2009/05/imperfect-evaluations.html), and seen
that the appendix B of the "Drools JBoss Rules 5.0 Developer's Guide"
book that deals with custom operators, I am rather confident that I will
find my way in implementing my operator (if not, I'll post here again :-)).
However, I wonder if it will be possible to add my "lucenematches"
operator to the "operator" drop-down list of the Eclipse's Business Rule
Editor.
Does anyone have an idea?
Best regards,
Bruno.
14 years, 2 months
CE not
by david.bao
Hi,
I'm a newbie of Drools Fusion. I have a requirement as following:
If Event A is inserted into the working memory and in the following 5
seconds there is no Event B, some action will be performed.
Here is my rule script
import com.foo.event.Event
rule "test"
when
$event1 : Event(eventNo == "A")
Event(eventNo == "B", this not startedby [5s] $event1 )
then
System.out.println("there is no Event B in 5 seconds");
end
Java code:
session.insert( event1 );
clock.advanceTime( 6, TimeUnit.SECONDS );
session.insert(event2);
session.fireAllRules();
this works. But if i do not insert event2 and the rule will not be fired.
I also tried
not Event(eventNo == "B", this startedby [5s] $event1 )
not work also
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/CE-not-tp1771908p1771...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months