query in drools expert :: rule language
by bobbi_80
Hi ,
I want to know if there is any way I can evaluate a string in rule language.
Here is what I am doing
DroolsTest.java has a class as follows.
DroolsTest.java
public static class cpuTracker{
private String machinename;
private String averageCPU;
}
I want to set a rule in sample.drl such that if the averageCPU is greater
than 80 an action is taken.
Sample.drl
rule "High CPU Usage"
when
$cpuUsage : cpuTracker( Integer.parseInt(averageCPU) > 60 )
then
System.out.println("CPU usage is very high!!");
end
The compiler throws the following error " *no viable alternative at
averageCPU for rule High CPu usage*".
I am unable to convert string to int using Inetger.parseInt(). Any idea why
it is throwing me an error and any help with rule language syntax that I can
get online? Can't find all the answers from
http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html_...
Any help is highly appreciated.
--
View this message in context: http://drools.46999.n3.nabble.com/query-in-drools-expert-rule-language-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Is it a limitation in Drools, can not add PKG and ChangeSet in Webapplication
by srinivasasanda
Hi All,
Please can any one help me, or Say is it a limitation or if Possible how to
do it in web applications.
I had written a peace of code in java that works fine & perfectly in simple
java class,
when i tried to copy same piece of code into servlet program and run, then
it throws an error,
even i included same jar files to both the applications --> drool5.2 jars
when tried to uncomment the commented line and run then it throws error, (
in adding the package, and changeSet)
KnowledgeAgent ka = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent");
KnowledgeBuilder _kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
KnowledgeBase _kbase = KnowledgeBaseFactory.newKnowledgeBase();
String
urlString="http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/rest/packages/sampl...";
//String urlString =
"http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.G...";
//String
urlString="http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.G..."
URL url = new URL(urlString);
UrlResource urlResource =
(UrlResource)ResourceFactory.newUrlResource(url);
urlResource.setBasicAuthentication("enabled");
urlResource.setUsername("admin");
urlResource.setPassword("admin");
System.out.print("\n\n\n\n before adding package Sasi Sasi ");
_kbuilder.add(ResourceFactory.newUrlResource(url),ResourceType.DRL);
//_kbuilder.add(ResourceFactory.newUrlResource(url),ResourceType.PKG);
_kbase.addKnowledgePackages(_kbuilder.getKnowledgePackages());
System.out.print("\n\n\n\n added package Sasi Sasi");
// ka.applyChangeSet(urlResource);
/*KnowledgeBase kb = ka.getKnowledgeBase();
*/
FactType appType = _kbase.getFactType("sample", "person");
Object application = appType.newInstance();
appType.set(application, "age", 25);
appType.set(application, "income", 1500);
appType.set(application, "result", "");
StatelessKnowledgeSession ks = _kbase.newStatelessKnowledgeSession();
ks.execute(application);
System.out.println(application);
System.out.println("Result is "+appType.get(application, "result"));
if add resource type other than the DRL, like PKG,CHANGE_SET then it throws
error specified error
root cause
java.lang.NoSuchFieldError: DESCR
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:539)
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
RuleEngine.doGet(RuleEngine.java:85)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--
View this message in context: http://drools.46999.n3.nabble.com/Is-it-a-limitation-in-Drools-can-not-ad...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
ACM DEBS 2012 - First Call for Papers
by Adrian Paschke
=====================================================================
DEBS2012
6th ACM International Conference on Distributed Event-Based Systems
July 16-20, 2012
Freie Universitaet Berlin, Berlin, Germany
http://www.csw.inf.fu-berlin.de/debs2012
=====================================================================
The objectives of the 6th ACM International Conference on Distributed
Event-Based Systems (DEBS) are to provide a forum dedicated to the
dissemination of original research, the discussion of practical insights,
and the reporting of relevant experience relating to event-based computing
that was previously scattered across several scientific and professional
communities. The conference also aims at providing a forum for academia and
industry to exchange ideas, for example, through industry papers and demo
papers.
DEBS 2012 Tracks
================
The conference will consist of the following tracks:
- Research track featuring high quality research paper on relevant topics.
- Industry track with two sub-tracks: industry full papers and industry
experience reports.
- Tutorials geared towards either the research or the industrial
communities.
- Demos and posters.
- The DEBS 2012 Grand Challenge is a problem solving competition for
commercial and research event-based systems.
- Gong show: The gong show will consist of short presentations about
visionary and outrageous ideas towards the next generation of event-based
systems. The audience will vote for the best idea.
- Doctoral workshop
Important Dates
=======================
- Abstract submission for research and Industry papers and Industry
experience reports: February 27, 2012
- Grand Challenge participation intent (non-binding): February 27, 2012
- Research, Industry and Tutorial papers submission, and (optional) Industry
experience report submission: March 5, 2012
- Grand Challenge problem description: March 7, 2012
- Author notification for tutorials, research and Industry papers, and
Industry experience reports: April 30, 2012
- Poster and demo submission: May 2, 2012
- Grand Challenge Solutions including 4 page papers: May 2, 2012
- Doctoral Workshop submission: May 2, 2012
- Grand Challenge abstracts: May 2, 2012
- Author notification for poster, demo, Challenge, PhD papers: May 16, 2012
- Conference: July 16-20, 2012
Paper Submission
=======================
Submissions will be accepted in the following tracks:
Research track;
Industry track;
Tutorials Track;
Demos& Posters;
Grand Challenge;
Doctoral Workshop.
All submissions must be original and unpublished. Accepted papers will be
published by ACM and disseminated through the ACM Digital Library.
More information about the tracks and submission information can be found on
the DEBS 2012 website:
http://www.csw.inf.fu-berlin.de/debs2012/calls.html
Scope of the Conference
=======================
The topics addressed by the conference include (but are not
limited to):
Models, Architectures and Paradigms
- Event-driven architectures
- Basic interaction models
- Event algebras, event schemas and type systems
- Languages for event correlation and patterns, streaming and continuous
queries, data fusion
- Models for static and dynamic environments
- Complex event processing
- Design and programming methodologies
- Event-based business process management and modeling
- Experimental methodologies
- Performance modeling and prediction based on analytic approaches
- Functional Reactive Programming
Middleware Infrastructures for Event-Based Computing
- Federated event-based systems
- Middleware for actuator and sensor networks
- Algorithms and protocols
- Optimization techniques for event-based (or streaming) systems
- Event dissemination based on p2p systems
- Context and location awareness
- Fault-tolerance, reliability, availability, and recovery
- Security issues
- (Self-)Management
- Mobility and resource constrained device support
- Streaming queries, transformations, or correlation engines
- Logic-based event processing
- Semantic event processing
- Business Process Management with events
Applications, Experiences, and Requirements
- Use cases and applications of event-based systems
- Real-world application deployments using event-based middleware
- Domain-specific deployments of event-based systems
- Real-world data characterizing event-based applications
- Benchmarks, performance evaluations, and testbeds
- Application requirements for next-generation event-based solutions
- Relation to other architectures
- Enterprise application integration
- Event-driven business process management
- Information logistics
- Seamless integration of event-based mechanisms into middleware platforms
13 years
Avoid the patent encumbered "The Decision Model" like the plague
by Mark Proctor
Avoid the patent encumbered "The Decision Model" like the plague:
http://blog.athico.com/2011/12/decision-model-ip-trap-part-deux.html
The Decision Model IP Trap - Part Deux
Posted by Mark Proctor
A while back I published this article titled the "The Decision Model
Trap", http://blog.athico.com/2011/11/decision-model-ip-trap.html. In
short it highlighted the dangers of adopting a patented methodology and
my opinion on Red Hat's stance on the matter. The patent is owned by the
Knowledge Partners International (KPI) <http://www.kpiusa.com/> who push
TDM.
My article was referenced in a thread, started by Jacob Feldman from
Open Rules, in a linkedin group for "The Decision Model". It's a closed
group, A copy is provided online here
<http://www.athico.com/TDM/tdm.htm>. The original link is here
<http://www.linkedin.com/groupItem?view=&gid=3394865&type=member&item=8602...>:
I'll quote Jacob below:
"First I learned about a possible patent for The Decision Model from
Mark Proctor -- see
http://blog.athico.com/2011/11/decision-model-ip-trap.html. But it was
impossible to find any references to it on the web. Besides, neither
Larry nor Barb ever mentioned anything about the patent (at least to
me). So, I thought that was just a misunderstanding.
However, on Dec. 6, 2011 USPTO apparently granted a patent to Larry and
Barb -- see http://www.freepatentsonline.com/8073801.html. I believe it
would be only helpful if the Decision Model authors openly explain their
position regarding this patent to all of us. Otherwise, such a "holiday
present" may scare the entire decision modelling community to stay away
from TDM. "
The thread turned hostile with a KPI representative demanding I clarify
my motivations and then resorting to belittling me -- but I'll come back
to that later. The result was that eventually KPI made an announcement
on their objectives and intentions with regards to the patent and TDM.
The link for this is here
<http://www.kpiusa.com/index.php?option=com_content&view=article&id=170&It...>:
Lets look at this briefly:
Objectives of the Patent Policy:
* To ensure that we are able to evolve what we started without risking
an infringement of someone else's patent.
* To share the ideas behind The Decision Model in an orderly way.
* To protect its rigor, hence its reputation."
With the current insanity of the various patent systems, having to play
the patent game, just to protect yourself is a reality. However
restricting 3rd party use of that patent is not necessary to achieve the
later two goals. Trademark and certification is a perfectly adequate, if
not far superior and more effective way to achieve those goals. Unless
they have other objectives, not listed, I invite them to license their
patent under terms similar to that in the Apache Software License.
Then lets get onto their next statement:
"Vendors who provide Open Source Software, and who wish to incorporate
TDM can obtain a royalty-free license for Open Source software. There
will be a certification fee and process for Open Source vendors who
desire this optional software certification."
Talk about the classic hunny trap. Ring ring, ring ring..... "hello?...
Hey KPI it's 2002 calling, they want their business ideas back". For
those that don't get the joke it's a play on the "hey hunny, its the 80s
calling, they want their hair back" :) Seriously the world has moved on,
it's clued up, they don't fall for that clap trap any more. KPI, there
is an awesome website, that covered the SCO débâcle, called groklaw.net
- very recommended reading. If you are an OSS vendor and take PKI up on
their offer, you aren't not Open Source - end of story. Just don't do it
to yourself, you deserve better, your customers deserve better.
It's old news now that PKI through a partner is trying to infect the OMG
Decision Model and Notation standard effort,
http://www.omgwiki.org/dmn-rfp/doku.php. Private emails have been sent
between the various heavyweights in the OMG process. I think the general
sentiment was "not a chance in hell". So that's one nail in the coffin.
A proprietary and encumbered methodology will die when faced with an
un-encumbered official and open standard.
They may however try to argue that their patent covers the resulting DMN
standard, regardless of whether the DMG group accepts their proposal.
The result on the industry in general could be chilling. I would urge
PKI to re-read groklaw.net about what happened to SCO when they tried to
enforce bogus patents. Yes that's right, "SC...Who?" - it's doubtful
your reputations and company brand would survive if you became hostile
on an open standard and/or an open source implementation of that
standard. RIP TDM.....
So let's now get back to that linked in forum posting. As the thread was
started by quoting my initial blog, when someone asked what impact this
could have on the industry, I felt that I had every right to re-iterate
a key point from the article. That while TDM continues to be patented
the industry will move around and beyond it, and that the work we are
doing lifting from the extensive research made available in the Prologa
and XTT2 will also make it's patent irrelevant.
Michael Grohs, VP of Business Development @ KPI, jumped in demanding I
declare my motivations -- as if I was some how being underhanded. I
don't think he had taken the time to read my article. I think it makes
my stance and motivations very clear. But then I believe he was more
interested in posturing than substance. I'll show two key points from
the article, I think they show my stance and motivations pretty clearly.
"...snip...
Open Source and Patents do not mix. When you get software from Red Hat
you are guaranteed its 100% Open Source, not maybe OS or partly OS. From
top to bottom, inside and out 100% OS goodness.
...snip...
In the mean time we in the Drools team will continue to take our
inspiration from the excellent and unencumbered research projects;
Prologa and XTT2.
http://www.econ.kuleuven.be/prologa/
http://ai.ia.agh.edu.pl/wiki/hekate:xtt2"
The thread continued to regress into noise. With further indications
that I was trying to be underhanded, by demanding I declare my
motivations. It was insinuated that I don't live in the real world, that
the patents I have through Red Hat make me hypercritical for demanding
"special rights":
"but then world is full of people who believe that they are entitled to
special rights which they believe other people should not have. "
In general there seemed to be a lack of understanding on the use of
defensive patents within OSS, particularly on how they have virtually no
restrictions, beyond that defensive clause -- as specified in the Apache
Software License. There also seemed to be a lack of understanding on the
walled garden patents create, shutting off the OSS research world -
which is why I oppose this so vehemently.
Finally Michael, a VP @PKI, just decided to get full out snotty on me. I
couldn't figure out if he was trying to belittle me or indicate that I
was being underhanded by concealing that I work for Red Hat -- or maybe
both. I guess when you have nothing of substance to say, just use insults:
Michael:"Mark I understand that your and Edson's patent is assigned to
your employer Red Hat and not to the World, but correct me if I am
wrong. So it is actually Red Hat who does the gifting. "
I apologise in advance for the slightly over pompous use of "I". Those
that know me, know that while I evangelise the technology, that I will
big up the Drools community in general and it's achievements - I do not
try to add grandeur directly to my personage, that actually I'm a little
shy of direct attention. I believe Michael thought I was some peon of a
developer, scuttling along to my masters commands. So given the
circumstances, I felt that a point should be made:
Michael:"I understand that your and Edson's patent is assigned to your
employer Red Hat and not to the World, but correct me if I am wrong. So
it is actually Red Hat who does the gifting. "
mark:"I'm really not sure what point you are trying to make with this
comment. When you have to reach for semantic interpretations it makes
you sound bitter and doesn't become an industry professional. I'm not
even sure I should dignify it with a response.... but then I wouldn't be
me :)
"So it is actually Red Hat who does the gifting"
I don't make it any secret that I'm employee of Red Hat, I'm very proud
to work for the worlds number one Open Source company.
But I don't know if that is the point you are trying to make, or if you
are trying to belittle me by arguing semantics on the appropriation of
the term "we". Much as Suleiman keeps trying to talk down to me by using
terms like "real world" and "special rights". So I guess I should answer
both possibilities, neither are becoming for you.
I'm the co-founder and creator of Drools, I did this before joining
JBoss. The choice to license Drools under the Apache Software License
was mine and done before joining JBoss - JBoss was later acquired by Red
Hat. It is this license, that I chose, that grants those free and
perpetual rights. In fact it is this license that ensures that neither I
nor Red Hat nor anyone else contributing to Drools project may file a
patent that is not covered under this free and perpetual rights, when
that patent relates to Drools.
While at Red Hat it was my choice to file the patent and my choice to do
the work necessary for the patent, I could have chosen not to file a
patent. Edson also had those same personal choices and we did the work
together.
I would say considering those choices that I made I have a write to use
the term "we". We as in myself, Edson and Red Hat.
"and not to the World"
You are trying to argue the points of assignment and usage and gift? I'm
not sure which part of the following you don't get:
"a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make,
have made, use, offer to sell, sell, import, and otherwise transfer the
Work" "
It doesn't get more "gifting" than this. Well maybe it can. Having
watched a user gorge themselves on christmas pudding, mince pies and
port. I could wrap the patent in silver paper with stars on it, tie a
red bow around it, put on my Red Fedora and climb down the chimney and
ram it down their throats. Is that "gifty" enough for you? :) to clarify
the term "their" I mean "the world".
......next? "
Anyway I'm looking forward to what Jan Vanthienen, one of the decision
table godfathers, has to say on the matter in the new year. I'm guessing
that he's not pleased that someone took his work, changed the names used
in the terminology and patented it.
13 years
Integration of drools with webapplication (Servlet) Errors..
by srinivasasanda
Hi All,
when i am try to access with web application (in servlet i am getting error)
I am using drools-5.2.0
javax.servlet.ServletException: Servlet execution threw an exception
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.NoSuchFieldError: DESCR
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:539)
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
Drools.doGet(Drools.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--
View this message in context: http://drools.46999.n3.nabble.com/Integration-of-drools-with-webapplicati...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Repository import
by GPatel@tsys.com
Is it possible to push a repository import into a Guvnor instance?
What I am looking for is the ability to stand up a Guvnor instance from
predetermined artifacts, the artifacts being repository.xml (which
contains packages, rules, working sets, etc.) and model jars. If I have a
model jar and a repository.xml (that contains the rules that use the model
jar), can I configure a Guvnor instance to use them? This would help
automating QA/production deployments of updated model jars/rules.
Thanks
Ghanshyam
-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you
13 years
drl file importing problem intoGuvnor5.2
by domingo
Hi,
Thanks for your attention!!!..
I have a simple rule as follows ...
import com.sample.Message;
dialect "java"
rule "Hello World"
when
eval(true)
then
System.out.println( "Ok I know!!!!!" );
end
when I import into Guvnor, Guvnor automatically change the file into as
follows and fails to compile...
package com.sample
import com.sample.Message;
dialect "java"
rule 'Hello World'
dialect 'mvel'
when
eval(true)
then
System.out.println( "Ok I know!!!!!" );
end
My question is ...how come this Guvnor5.2 overriding my dialect?this
behavior of Guvnor is little disturbing...
can any one tell me whats going on in Guvnor5.2.....
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/drl-file-importing-problem-intoGuvnor5-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Guvnor role based authentication with JBossAS 7
by Cristiano Gavião
Hi,
I've downloaded the JBPM installer 5.2.Final. It is running ok.
I'm trying do enable role based authentication for Guvnor and I'm not
having success.
So, I found some links at google and I follow this:
1) modified the standalone.xml:
> <security-domain name="other" cache-type="default">
> <authentication>
> <login-module code="UsersRoles" flag="required">
> <module-option name="usersProperties" value="guvnor-users.properties"/>
> <module-option name="rolesProperties" value="guvnor-roles.properties"/>
> </login-module>
> </authentication>
> </security-domain>
2) unzip the drools-guvnor.war to drools-guvnor dir and removed the war
- enabled the jaas
> <security:identity authenticate-method="#{authenticator.authenticate}"
> jaas-config-name="other"/>
- and set role based to true
> <component name="org.jboss.seam.security.roleBasedPermissionResolver">
> <property name="enableRoleBasedAuthorization">true</property>
> </component>
3) created the guvnor-roles.properties and guvnor-users.properties files
at <Guvnor>/WEB-INF/classes
Strangely, there is no error in main log... at least I couldn't find
any. It seems to be ok because at the Jboss Admin Console page all is
running green.
> 0:09:11,152 INFO [org.jboss.as.server.controller]
> (DeploymentScanner-threads - 2) Deployed "jbpm-gwt-console.war"
> 20:09:11,152 INFO [org.jboss.as.server.controller]
> (DeploymentScanner-threads - 2) Deployed "jbpm-gwt-console-server.war"
> 20:09:11,170 INFO [org.jboss.as.server.controller]
> (DeploymentScanner-threads - 2) Deployed "drools-guvnor"
> 20:09:11,171 INFO [org.jboss.as.server.controller]
> (DeploymentScanner-threads - 2) Deployed "designer.war"
But I'm getting 404 (The requested resource (/drools-guvnor/) is not
available.) when trying to reach guvnor address
http://localhost:8080/drools-guvnor/
:(
What am I missing ? could anyone help me?
thanks
Cristiano
13 years