Importing existing .dslr + .dsl to Guvnor
by wantastic
Hello everyone,
I am a newbie to Guvnor. I have a set of .dslr files with .dsl to translate
them.
I know I can just copy and paste .dslr file and .dsl file. However, the
problem is that
I call external function within .dsl file and when I try to validate the
dsl, it complains for not having the method.
ex)
[condition][Trade]xpathMatch "{xpath}"=trade : Trade( type ==
Trade.TRADE_TYPE ) and eval( DslHelper.xmlContentMatches(trade, "{xpath}") )
This is my condition and it has all models like Trade. However, it complains
about not having DslHelper function. This function has so many dependencies
that I cannot upload through POJO jar.
Is there any elegant way to solve this problem?
Thanks in advance :)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Importing-existing-ds...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
alert via email
by kedar vyawahare
Hi all,
I want to send an alert via e-mail through my .drl (rule) file.
Does *Drool* *engine * support for sending the *emails*.
Thanks in Advance.
Kedar
13 years, 9 months
A question about using "lane" in Drools-flow
by Wen Yao
Hi,
When I was working on a project using Drools-flow, I had some problems with
the "lane" and "laneset".
1. In eclipse, I used the Flow editor to create a process and add some
swimlanes. When I tried to run it, it always had this error:
org.xml.sax.SAXParseException: <lane> is after an invalid element:
org.drools.xml.Handler
Then I looked into the XML file and changed the following code:
<laneSet>
<lane name="Patient" >
</lane>
<lane name="Doctor" >
</lane>
</laneSet>
to:
<laneSet>
<lane name="Patient" >
</lane>
</laneSet>
<laneSet>
<lane name="Doctor" >
</lane>
</laneSet>
It worked. Could you explain why?
2. I created a process in the web-based oryx designer with a pool that
contains several lanes. Then I imported this file in Eclipse, which cannot
open it correctly because of the lane issue, since the format in oryx
exported file is like this:
<laneSet id="XXX">
<lane name="Patient" >
</lane>
<lane name="Doctor" >
</lane>
</laneSet>
3. The bpmn file I created in Eclipse, although validated to be correct,
cannot be imported in Oryx. I am wondering whether it can be done this way.
Could you kindly address my concerns?
Thank you very much!
Best regards,
----
Wen
13 years, 9 months
[Announce] EulerGUI 1.8
by Jean-Marc Vanel
Hi
Reminder
The EulerGUI Integrated Development Environment (IDE) allows one to
develop and run rules in N3 logic language, applied to data and models
in various formats converted in N3 (Notation 3).
N3 is a convergence language that allows to express data (facts),
classes and properties, and rules. It is the main language for the
Semantic Web, being much more readable and concise than RDF (Resource
Description Format). Compared to pure point-and-click tools like
Protégé, EulerGUI is centered on textual editor for N3 source.
EulerGUI is Open Source, written in Java Swing.
SWRL rules are executed by a translator into N3 rules.
One of the 4 rules engines in EulerGUI is based on a translation of N3
rules onto Drools' DRL language. So Drools in this case is used as a
pure rule engine.
The main new feature is a 2 clicks tool to add all referred ontologies
to current project.
This plays particularly well with other features.
You can refer to an ontology or vocabulary by using its common prefix
in the editor, e.g. :
:p a foaf:Person .
Then, upon saving the corresponding prefix declaration will be added
by looking up the http://prefix.cc web service :
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
Then with the new feature, you can actually add the URI of the FOAF
prefix to the project, which downloads the FOAF ontology as N3. You
can then consult the FOAF ontology in the N3 editor, to discover all
available properties and classes. These properties' label and RDF
comments are also visible in the editor as tooltips. You can also
launch the OWL reasoner, which shows a tree view of classes in FOAF
and in all N3 sources in project.
The second new feature is a button to stop the current inference
engine. This is useful when a bad rule base goes into an infinite
loop.
As a side dish, there is a rule base that acts as a helper for
documenting a rule base. That is, every non declared property
generates a skeleton declaration; the same for undeclared classes.
Here is a how-to:
http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/d...
Download from
https://sourceforge.net/projects/eulergui
EulerGUI Manual here:
http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/d...
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+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 )
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+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 )
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+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 )
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+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 )
13 years, 9 months
Drools server link to Guvnor repository
by SebRR
Hi all,
I would like to connect to drools-server with HTTPClient with the following
config:
where my changeset.xml is adding a snapshot deployed with Guvnor.
But I am not able to trig the rule with the following client:
BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();
command.setLookup("ksession1");
InsertObjectCommand insertObjectCommand = new InsertObjectCommand("TEST");
FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand();
command.getCommands().add(insertObjectCommand);
command.getCommands().add(fireAllRulesCommand);
String xml = BatchExecutionHelper.newXStreamMarshaller().toXML(command);
HttpClient httpClient = new HttpClient();
httpClient.getHostConfiguration().setHost("host", 8080);
PostMethod postMethod = new
PostMethod("/drools-5.1.1-server/kservice/rest/execute");
postMethod.setRequestEntity(new StringRequestEntity(xml, null, null));
try {
httpClient.executeMethod(postMethod);
int code = postMethod.getStatusCode();
System.out.println(code);
String rep = postMethod.getResponseBodyAsString();
System.out.println(rep);
} catch(Exception e) {...}
Do someone have any idea how to achieve this?
Thanks
Sebastien
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-server-link-to...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Test Scenario and function problem in Guvnor
by Eddy Hautot
Hi,
I have in my package 4 Pojo and i can create rules with them. if i do a
validate, it's ok.
But if i add a new function, even a simple one, i have compilation error, it
says it cannot compile because the function cannot resolve the class of the
pojo. All is well in the import in the package. When i remove the function
all is ok.
Second question i have rules but in the "then" clause, i will have query in
db, call to method through beans.. How can i do to be able to use the test
scenario only to test the when clause and not executing the then clause?
Is it possible the Validate function, validate only the when clause and not
the then clause?
Thanks
13 years, 9 months
drools-server - resource change scanner/notifier
by Ross H
There have been previous posts on this problem:
http://drools-java-rules-engine.46999.n3.nabble.com/Starting-resource-cha...
but I was unable to find a resolution, or issue in Jira.
Looking at the code in 5.1.1 (and trunk), I could not find where the polling
and notifier services are started. To overcome the problem I have modified
the following:
drools-spring-1.0.0.xsd (added a start attribute to resource-change-scanner)
xsd:attribute name="start" use="optional" type="xsd:boolean"
ResourceChangeScannerBeanFactory (started service in afterPropertiesSet())
if (isStart()) {
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
}
ResourceChangeScannerDefinitionParser (added start attribute)
factory.addPropertyValue( START,
element.getAttribute( START ) );
It seems to be working quite nicely.
Just wondering if this is the right way to go about it, or whether there is
a better method.
Regards RossH
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-server-resourc...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Drools Flow client.getTasksAssignedAsPotentialOwner API returns duplicates - bug?
by gs76pl
hi,
i've noticed that after creating two separate tasks (different names) for
the same user below query return 2x2=4 items from which two of them are
duplicates
minaClient.getTasksAssignedAsPotentialOwner("user","language",responseHandler)
List tasksOwned = responseHandler.getResults();
I've checked database and in fact there are only two rows in a Task table
but the above API calls multiple outer joins on different tables that cause
duplicates to be produced.
So, if this is an "intentional bug" and it is up to the calling method to
get rid of duplicates is there any other better/more efficient way of
working with tasks as it seems like the whole API is somehow flawed. I
suspect that with significant number of tasks the performance will be very
low
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-client-ge...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
updating a .drl file
by kedar vyawahare
Hi all,
I m trying to add rules in .drl file from User Interface. but not able to
do that.
I want to add rules from user so that it will directly add that rule to my
.drl file. and will update my .drl file.
Please help me.
Thanks in advance,
Kedar.
13 years, 9 months