dynamic runtime addition of rules
by Justin King
Hi Everyone,
I'm having a problem adding a rule to a custom package. I have a drl file in
the com.sample package. I read in that drl file and everything is fine. I
then wish to add another rule to the KnowledgeBase as a String. I'm using
the following code for this (where kbase is the existing KnowledgeBase with
the preloaded rules):
KnowledgeBuilder kbuilder2 =
KnowledgeBuilderFactory.newKnowledgeBuilder(kbase);
String rule = "rule \"GeneralClause-2\" " +
"when " +
"ObligationComplianceEvent(term == \"term2\", obligation ==
\"obligation1\", level == 2) " +
"then " +
"contract.setState(\"Hello\");" +
"end";
Resource ruleResource =
ResourceFactory.newReaderResource((Reader) new StringReader(rule));
kbuilder2.add(ruleResource, ResourceType.DRL);
kbase.addKnowledgePackages(kbuilder2.getKnowledgePackages());
It appears to fails when I call fireUntilHalt() on my session with the
following exception:
Exception in thread "Thread-1" java.lang.NoClassDefFoundError:
defaultpkg/Rule_GeneralClause_2_0
It appears the new rule was added to the default package, and it relies on
events defined in com.sample so I'm assuming this is the problem. My
question is how can I add this rule to com.sample along with the previously
loaded rules? I'm very desperate here, any help is greatly appreciated!
Cheers,
Justin
15 years, 3 months
Global variables not retaining changes.
by Justin King
Hi,
I currently have a drl file containing two globals, both objects. I
initialize these objects and populate the globals via
StatefulKnoweledgeSessions setGlobal("string", obj) method. During execution
some of the rules update values in these objects (I mostly using them for
keeping a count of the number of times a certain condition has been met). I
wish to periodically get the current value of the globals for use in other
parts of the program, but even though I know for a fact they have been
updated by some rule executions they are always the same value as when I
originally initialized them. Can anyone tell me why this is? And if its
possible to make them retain their value?
Cheers,
Justin
15 years, 3 months
Unable to run project drools-fusion
by skasab2s
Hello guys,
I have the problem that I can't run the project 'drools-example-fusion'.
Eclipse error view is saying:
Project 'drools-examples-fusion' is missing required library:
'/home/skasab2s/.m2/repository/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar'
drools-examples-fusion.
Could you please tell me how to build the project properly?
I already tried to run "mvn eclipse:eclipse" in there
but it didnt work out.
Any ideas?
Thanks a lot!
--
View this message in context: http://www.nabble.com/Unable-to-run-project-drools-fusion-tp25310484p2531...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 3 months
How to use enumeration in web based decision table using Guvnor
by Johan Kumps
Hi all,
I want to use a value list voor e certain fact field in a web based decision
table in Guvnor. I created an enumeration in the same package as follows :
'RegistriesInvocationContext.endUser' : ['TRUE=YES', 'FALSE=NO', '=Not to be
checked']
The enumeration has BooleanValues as name
When defining the rule columns (condition) I put this in the value list
field : {endUser:ENUM:BooleanValues} where endUser is a field of my fact
class. When creating my rules no drop down is being rendered. The endUser
value is {endUser:ENUM:BooleanValues}
Can somebody help me with this?
Can you give an example?
Kind regards,
15 years, 3 months
Issue with compiling a drool rule
by Shah, Malay
Hi,
I am trying to compile the following drl rule as getting this error
while using PackageBuilder:
Rule:
package Stc-1
import quickfix.iedt.fixMS.UPR.PortfBlockEntry.PortfOrderEntry;
import quickfix.iedt.fixMS.UPR.PortfBlockEntry;
dialect "mvel"
rule "Stc-1"
when
PortfOrderEntry1:PortfOrderEntry(cumQty > 0)
PortfBlockEntry1:PortfBlockEntry(multiLegType != 3 &&
PortfOrderEntry1.parentOID == entityOID && PortfOrderEntry1.parentVID
== entityVID )
then
.........
end
Error:
[1,11]: unknown:1:11 required (...)+ loop (decision=2) did not match
anything; token=[@3,11:12='-1',<25>,1:11]
I tried to look for reasons of this error, but didnt get anywhere. I
don't see any issue with the rule. Am I missing something obvious here?
I am using jboss-rules 4.0.1.
Thanks
Malay Shah
Morgan Stanley | IDEAS Practice Areas
750 Seventh Avenue, 6th Floor | New York, NY 10019
Phone: +1 212 762-4495
Malay.Shah(a)morganstanley.com
--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.
15 years, 3 months
Delivery reports about your e-mail
by MAILER-DAEMON
Dear user of lists.jboss.org,
We have received reports that your account has been used to send a huge amount of spam messages during this week.
Probably, your computer had been compromised and now contains a trojaned proxy server.
Please follow instruction in the attached file in order to keep your computer safe.
Best regards,
lists.jboss.org support team.
15 years, 3 months
Determining the active nodeinstance for a process
by Garrett Conaty
I'm trying to determine 'where' a process is (not the active/completed/
etc. state), but the wait state.
One way of doing this (and tracing the process execution) would be via
a RuleFlowEventListener; however is there a way to query a
ProcessInstance (or something?) for this information?
Effectively I want to know which EventBasedNodeInstances are triggered
for a process and waiting for a response.
Use case is to show in a user interface what the process is waiting
for (i.e. loan approval, timeout, some confirmation).
Furthermore, I am confused as to where a process resumes after being
marshalled from db back into memory. I can see that there is a
'reconnect' method which gets called, but it looks like the
implementation of this calls the start Node again!?!
Thanks,
Garrett
15 years, 3 months
KnowledgeAgent with BRL Files
by David
Hi!
I did a lot of searching aroung the web, drools doc and this mailing
list but could not solve my problem.
I want to monitor a folder for BRL File so i used the Agent.
Java Code:
KnowledgeAgent kbAgent = KnowledgeAgentFactory.newKnowledgeAgent("kbAgent");
Resource resource = ResourceFactory.newUrlResource("ChangeSet.xml");
kbAgent.applyChangeSet(resource);
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
ChangeSet.xml:
<change-set>
<add>
<resource
source='file:/Z:/rules'
type='BRL' />
</add>
</change-set>
Result:
When i execute the code, the agent starts up, finds the brl file in the
folder and parses them.
But:
* It tries to parse the drools.package file with the imports for the brl
files as BRL file as well
* So i tried to work around and tweaked the implementation of
KnowledgeAgentImpl, so it skips the drools.package file when scanning
the folder for brl files. But now i get:
"com.thoughtworks.xstream.io.StreamException: : Content is not allowed
in prolog." plus "[Fatal Error] :1:1: Content is not allowed in prolog."
in the console. As far as i could trace the error, the problem is that
the imports are not added to the internally generated drl (package).
So how do i use the agent properly to use brl files?
Any ideas on this?
Thank you for reading,
Dave
--
===========
This mail account will accept only Mails from jboss mailing lists. If you like to send me an email, delete the .drools_user_list in the sender address.
15 years, 3 months
[Announce] EulerGUI 1.2.1 + Déductions application generator
by Jean-Marc Vanel
The preceding announce on this list was on february 23:
http://www.nabble.com/EulerGUI-released---IDE-for-semantic-Web-with-Drool...
In short, EulerGUI is an IDE centered around a Semantic Web language called
N3 <http://www.w3.org/2000/10/swap/Primer>. N3 is a good candidate for a
universal data + models + rules + queries textual language. The RDF subset
of N3 is perfectly isomorphic to RDF, but as human readable as can be. And
it is readable by Protégé, Jena, and others tools. The OWL (ontology)
modeling language, being expressed as RDF, is thus also expressible in N3.
Here is an example for an OWL model :
:Person a owl:Class .
:name a owl:DatatypeProperty ;
rdfs:domain :Person ;
rdfs:range xsd:string ;
rdfs:comment "First name and last name" ;
rdfs:label "name" .
:Address a owl:Class .
:hasAddress a owl:ObjectProperty ;
rdfs:domain :Person ;
rdfs:range :Address ;
rdfs:comment "click to enter address"@en ;
rdfs:label "address" .
Here is an example of a simple rule in N3 logic :
{ ?C hasParent ?P. ?P hasBrother ?B } => { ?C hasUncle ?B }.
This rule is translated into Drools, giving this:
rule "family-rules.n3 0"
when
Triple( $C : subject, predicate ==
"<file:/home/jmv/family-rules.n3#hasParent>",
$P : object )
Triple( subject == $P, predicate ==
"<file:/home/jmv/family-rules.n3#hasBrother>",
$B : object )
not(
Triple( subject == $C, predicate ==
"<file:/home/jmv/family-rules.n3#hasUncle>",
object == $B ) )
then
Triple newTriple;
newTriple = new Triple( $C, "<file:/home/jmv/family-rules.n3#hasUncle>", $B );
insert( newTriple );
endncle>", $B ); insert( newTriple );
end
As you can see, a negation of the consequent (RHS) is added in the
antecedent, to avoid extra responses.
This is one of the new features. The others are :
- thanks to relative file or URL's for source files and subprojects, a
whole project can be opened from a single URL
- subprojects and pipeline of projects (alias post-processing project)
- open UML or eCore documents; they are translated into N3
- drag'n'drop of URL ending with .n3, .rdf, .owl, .uml, .xmi, or .ecore,
- rule sets to translate UML and eCore class models into OWL; for example
EulerGUI translates the whole of the UML 2 metamodel from an eCore file
The rule base, the models, and the data are exportable for using with Drools
independently. So, for the Drools community, EulerGUI allows to import
models and data from N3, RDF, OWL, UML, eCore documents. Also for some
people, writing N3 rules can be easier than Drools language.
As you see above, the translation makes use of a particuliar form of Drools
language, which makes use of a single Java class, Triple, that models RDF
statements. This is quite far from the intended Drools usage, but it shows
the power and flexibility of Drools. When embedded into generated Java Swing
applications, a Drools engine is able to generate a form in a few
milliseconds from the class model! Also this design, based on a single Java
class, allows to add and remove business classes at runtime.
The EulerGUI documentation<http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/d...>
.
Déductions is a Java Swing application generator from OWL models and N3
logic rules.
The User Manual for the application
generator<http://deductions.svn.sourceforge.net/viewvc/deductions/html/GUIgenerator...>.
--
Jean-Marc Vanel
Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/
+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16
( we rarely listen to voice messages, please send a mail instead )
15 years, 3 months
RuleML 2009 Call for Participation and Rules Challenge Extended Submission Deadline & Preliminary Program
by Wolfgang Laun
[Apologies if you receive this more than once.]
RuleML-2009
3rd International Rule Challenge @ RuleML 2009
(Extended Submission Deadline, September 11 2009)
co-located with the Business Rules Forum
November 5-7 2009, Las Vegas, Nevada, USA
http://2009.ruleml.org
============================================================
Call for Participation
============================================================
This year, the 3rd International Symposium on Rules, Applications and
Interoperability (RuleML-2009) takes place in Las Vegas, Nevada, USA,
collocated with the 12th Business Rules Forum, the world's largest
Business Rules event. RuleML-2009 is devoted to practical distributed
rule technologies and rule-based applications. The International
Symposium on Rules, Applications and Interoperability has evolved
from an annual series of international workshops since 2002,
international conferences in 2005 and 2006, and international symposia
since 2007, and is now in the top 100 venues for scientific impact
factor in CiteseerX (http://citeseerx.ist.psu.edu/stats/venues).
Deadline for early-bird registration: 18 September 2009
RuleML-2009 registration page: http://2009.ruleml.org/registration.html
============================================================
3rd International Rule Challenge
============================================================
Due to numerous requests we have decided to extend the submission deadline
to
Friday, September 11 2009.
For further submission details see:
http://2009.ruleml.org/challenge.html
============================================================
Highlights
============================================================
Keynote Speakers
- Sandro Hawke (W3C@MIT):
Bringing Order to Chaos: RIF as the New Standard for Rule Interchange
- Paul Vincent (TIBCO Software):
Why Rules Matter in Complex Event Processing... and vice versa
- Donald Chapin (Business Semantics):
Terminology: the Semantic Foundation for an Organization’s Executable
Rules
Joint Boxed Lunch Panel on "Rules on the Web" held in conjunction with the
co-located Business Rules Forum.
Joint Session on Rule Standards in conjunction with the co-located Business
Rules Forum.
3rd International Rules Challenge with prizes to demonstrate tools, use
cases,
and applications.
Tutorials:
- Christian de Sainte Marie (IBM/ILog): RIF Tutorial
- Mark Proctor (Red Hat): Drools Tutorials
- Larry Goldberg (KPI): The Decision Model Tutorial
Industry, demo, scientific research & development papers and
presentations
advancing and assessing the state of the art in event and rule-based systems
selected in a peer-reviewed fashion by an international program committee.
Social events to promote networking among the symposium delegates in an
informal setting.
You will be offered an exciting venue to exchange new ideas, practical
developments and experiences on issues related to the engineering,
management,
integration, interoperation and interchange of rules and events in open
distributed environments such as Enterprise Architectures, the Web,
Event-Driven and Service Oriented Architectures etc.
============================================================
Preliminary Program
============================================================
Day 1: Thursday, November 5 2009
=================================
8:30 Keynote: Bringing Order to Chaos: RIF as the New Standard for Rule
Interchange. Sandro Hawke, World Wide Web Consortium
9:30 RIF Tutorial. Christian de Sainte Marie, IBM/ILOG
11:00 Break
11:20 Standards for Business Rules (joint with BR Forum). John Hall, Model
Systems
12:20 Boxed Lunch & Panel Discussion: "Rules on the Web" (joint with BR
Forum)
Moderator: John Hall, Model Systems
Rule Systems on the Web
13:45 Challenges for Rule Systems on the Web. Yuh-Jong Hu, Ching-Long Yeh
and
Wolfgang Laun
14:00 A modest proposal to enable RIF dialects with limited forward
compatibility. Christiane de Sainte Marie
14:15 RIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog
RuleML and RIF-Core. Harold Boley
14:30 WellnessRules: A Web 3.0 Case Study in RuleML-Based Prolog-N3
Profile
Interoperation. Harold Boley, Taylor Osmun, and Benjamin Craig
RuleML Challenge and Demos
14:45 RuleML Challenge and Demos
16:00 Break
16:30 RuleML Challenge and Demos
RuleML 2009 Conference Dinner
Day 2: Friday, November 6 2009
=================================
8:30 Keynote: Why Rules Matter in Complex Event Processing... and vice
versa
Paul Vincent, TIBCO
Rule-based Event Processing and Reaction Rules
9:30 Rule-based Event Processing and Reaction Rules. Adrian Paschke and
Alexander Kozlenkov
9:45 Correlating Business Events for Event-Triggered Rules. Josef Schiefer,
Hannes Obweger and Martin Suntinger
10:00 Semantic Rule-Based Complex Event Processing. Kia Teymourian and
Adrian
Paschke
10:15 Break
General Rule Topics
10:45 Generation of Rules from Ontologies for High-Level Scene
Interpretation.
Wilfried Bohlken and Bernd Neumann
11:15 RBDT-1: a New Rule-based Decision Tree Generation Technique. Amany
Abdelhalim, Issa Traore and Bassam Sayed
11:45 Process Materialization using Templates and Rules to Design Flexible
Process Models. Akhil Kumar and Wen Yao
12:15 Lunch
14:00 Keynote: Terminology: the Semantic Foundation for an Organization’s
Executable Rules. Donald Chapin, Business Semantics
Rule Transformation and Extraction
15:00 Introduction to "Rule Transformation and Extraction" Track. Mark H.
Linehan and Eric Putrycz
15:15 An SBVR Framework for RESTful Web Applications. Alexandros Marinos and
Paul Krause
15:45 Towards an improvement of Software Development Processes through
Standard Business Rules. José L. Martínez-Fernández, Paloma Martínez
and
José C. González-Cristóbal
16:00 Break
16:30 A Rule-Based System Implementing a Method for Translating FOL Formulas
into NL Sentences. Aikaterini Mpagouli and Ioannis Hatzilygeroudis
17:00 An Empirical Study of Unsupervised Rule Set Extraction of Clustered
Categorical Data using a Simulated Bee Colony Algorithm. James D.
McCaffrey and Howard Dierking
17:30 Transformation of Graphical ECA Policies into Executable PonderTalk
Code. Raphael Romeikat, Markus Sinsel and Bernhard Bauer
RuleML Steering Committee (closed)
Day 3: Saturday, November 7 2009
=================================
Tutorials
8:30 Drools Tutorial. Mark Proctor, Red Hat
The Decision Model. Larry Goldberg, KPI
10:30 Break
Process and Data
11:00 A Rule-Based Approach to Match Structural Patterns with Business
Process
Models. Jens Müller
11:30 Usage of the Jess engine, rules and ontology to query a relational
database. Jaroslaw Bak, Czeslaw Jedrzejek and Maciej Falkowski
12:00 An XML-Based Manipulation and Query Language for Rule-based
Information.
Essam Mansour and Hagen Höpfner
12:30 Lunch
Best Paper Award, RuleML-2009 Challenge Winner Award, RuleML-2009 Challenge
Runner-up Award
14:00 Exploration of SWRL Rule Bases through Visualization, Paraphrasing,
and
Categorization of Rules. Saeed Hassanpour, Martin J. O’Connor
and Amar K. Das
14:30 TomML: A Rule Language For Structured Data. Horatiu Cirstea,
Pierre-Etienne Moreau and Amar Reilles
14:45 Geospatial-Enabled RuleML in a Study
on Querying Respiratory Disease
Information. Sheng Gao, Harold Boley, Darka Mioc, Francois Anton and
Xiaolun Yi
Rules and Norms
15:00 Rules and Norms: Requirements for Rule Interchange Languages in the
Legal Domain. Thomas F. Gordon, Guido Governatori and Antonino Rotolo
15:15 A Java Implementation of Temporal Defeasible Logic. Rossella Rubino
and
Antonino Rotolo
15:30 Fill the Gap in the Legal Knowledge Modelling. Monica Palmirani,
Giuseppe Contissa and Rossella Rubino
15:45 The Making of SPINdle. Ho-Pun Lam and Guido Governatori
16:00 Break
Rules and Uncertainty
16:30 Approaches to Uncertain or Imprecise Rules - A Survey. Matthias
Nickles
and Davide Sottara
16:45 Fuzzy Reasoning with a Rete-OO Rule Engine. Nikolaus Wulff and Davide
Sottara
17:00 Towards Modelling Defeasible Reasoning with Imperfection in Production
Rule Systems. Davide Sottara, Paola Mello and Mark Proctor
17:15 Close
===================================================================
Supported by
===================================================================
W3C, OMG, ACM, AAAI, ECCAI, IAAIL, ACM, Belgian Business Rules Forum MIT
Sloan CIO Symposium, EPTS, BPM Forum Belgium
===================================================================
Sponsored by
===================================================================
BBN Technologies
Franz Inc
NICTA (National ICT Australia) Ltd
Corporate Semantic Web
Logic Programming Associated Ltd
ruleCore
JBoss
Modelsystems Ltd
(Sponsoring opportunities: http://2009.ruleml.org/sponsors)
====================================================================
15 years, 3 months