Drools API
by shyam_prakash
Hello,
I am looking for a way to expose the published rule sets programmatically
and I am trying to determine if there is a service API that can be used to
retrieve the list/or iterate through published packages.
Please let me know if there is any such API / Javadoc for the same.
Thanks,
Shyam
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-API-tp1724208p...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Can Guvnor's repository functionality be exposed as a web service? [was: Drools API]
by Wolfgang Laun
[I'm re-posting this as a new thread with an apt subject on behalf of Patricia]
This is the scenario that I am looking for:
I am using Drools Guvnor as the central rule repository. I also have
an external application, that has a custom rule editor in place, and
users can create rules. This custom rule editor will take care of
Conditional Elements and Consequence actions. I would like to be able
to save the rule back in Guvnor, as that is the rule repository.
In the docs, there says that Guvnor has 2 parts: front-end and
backend. The backend includes the repository access as well. My
question is if the Guvnor backend exposes the repository functionality
as web service, or if it can be easily exposed.
Thanks,
Patricia
14 years, 2 months
RuleAgent to KnowledgeAgent(org.drools.definition.rule.Rule to org.drools.rule.Rule)
by Kinjal Khandhar
Hi All,
I want to convert org.drools.definition.rule.Rule to
org.drools.rule.Rule,i.e i want to move RuleAgent to KnowledgeAgent.
I tried:
for( KnowledgePackage knowledgePackage:
session.getKnowledgeBase().getKnowledgePackages() )
{
for( Rule rule: knowledgePackage.getRules() )
{
org.drools.rule.Rule odrRule = (org.drools.rule.Rule)rule;
}
}
I get ClassCastException.Can anyone provide me with the solution/workaround.
Thanks in advance.
Regards,
Kinjal
14 years, 2 months
DrlParser problem with soundslike and matches
by Bruno Freudensprung
Hi,
I am using Drools 5.1.1 (but also tried with 5.2.0.SNAPSHOT) to achieve
the following scenario:
1 - use the Drools' Eclipse graphical rule editor to create a BRL file
2 - convert the BRL to DRL using the
org.drools.ide.common.server.util.BRXMLPersistence and
org.drools.ide.common.server.util.BRDRLPersistence classes
3 - parse the DRL with the org.drools.compiler.DrlParser class (in order
to do some things)
I have a problem with DrlParser class that does not seem to accept the
"matches" and "soundslike" operators.
With the following rule... :
rule "TestRule"
dialect "mvel"
when
Document( text soundslike "drink" )
then
// some
end
... I get that error message from the DrlParser:
src/main/resources/org/drools/lang/DescrBuilderTree.g: node from line
0:0 mismatched tree node: <unexpected:
[@15,55:64='soundslike',<83>,4:17], resync=soundslike> expecting <UP>
Does anyone has an idea of what's going on?
Many thanks,
Bruno.
14 years, 2 months
Re: [rules-users] GWT Console and WSHT Rendering
by sam.squire@paretopartners.com
Kris, thank you.
I have templates working now. I can extract the 'result' of a form by
specifying an dataOutput, dataOutputRefs and a dataOutputAssociation into
a process variable.
What is the best way to give data to a human task node? That way the form
can change depending on the state of the process itself.
In the sourcecode it looks like only a few parameter types are possible
(Comment, Content, Skippable, Priority etc..) and it seems to give the
content as context to Freemarker but it does not seem to 'see' it.
Sam Squire
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
Performance effect due to "eval"?
by sumatheja
Hi All,
Is it true that the performance of RETE algorithm gets
affected if we use "eval" function in the rules conditions?
Can anyone explain if this is true.
--
cheers
14 years, 2 months
FaultVariable local?
by marton.bokor
Hi All,
I have a fault handler with a fault variable which calls an event having the
fault variable of the same name (all in the same .rf file). I want it to be
local and my question is:
1) Will this variable be local or it will be fetched from the session global
to the process?
2) Is there a way to make it local in the handling event? For example by
declaring a composite node with a variable of the same name in its
namespace?
I'm asking this because I am introducing OR split nodes which run parallel
and don't want to mix the fault variable values.
Thanks,
Marton
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/FaultVariable-local-t...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Pattern aggregation
by Tim 4076
Hi,
I'm trying to use drools to do grouping of data according to patterns
defined in my rules, but I'm having issues creating something that works in
a reasonable amount of time (seconds). I've tried all sorts of permutations
without much luck and would like to hear how others would do the same thing.
To give an example: I've got a big batch of transaction records and I want
to aggregate all the records where the consumer id and product category are
the same and the purchases were made within an hour of each other.
The fact that its matching the same values between facts, rather than
against constants seems to scupper it somewhat.
I would go down the ETL route, but the idea is for non-techies to define
their own aggregations using rules.
-Cheers. Tim
14 years, 2 months
Drools source build with error
by 赵侃侃
Hi,
I'm entirely new to the Drools. I downloaded the drools source today at
http://download.jboss.org/drools/release/5.1.1.34858.FINAL/drools-5.1.1-s...
.
I unpacked it and when I tried to build it myself with maven, I got the
following error:
e:\Java\drools>mvn install
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: unknown
Reason: Could not find the model file 'E:\Java\drools\osgi-bundles'. for
project unknown
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Could not find the model
file 'E:\Java\drools\osgi-bundles'. for proje
ct unknown
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Could not find
the model file 'E:\Java\drools\osgi-bundles
'. for project unknown
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1575)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.ja
va:506)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
... 12 more
Caused by: java.io.FileNotFoundException: E:\Java\drools\osgi-bundles
(系统找不到指定的文件。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at
hidden.org.codehaus.plexus.util.xml.XmlReader.<init>(XmlReader.java:124)
at
hidden.org.codehaus.plexus.util.xml.XmlStreamReader.<init>(XmlStreamReader.java:67)
at
hidden.org.codehaus.plexus.util.ReaderFactory.newXmlReader(ReaderFactory.java:118)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1570)
... 18 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Oct 18 17:23:07 CST 2010
[INFO] Final Memory: 6M/12M
[INFO]
------------------------------------------------------------------------
It appears to me that the child module osgi-bundles doesn't exist under the
top level directory.
Can someone please advise me how I can successfully build from the source?
Best Regards,
Kevin Zhao
14 years, 2 months
Rule tasks and gwt-console
by Juan Ignacio Barisich
Hello,
I'm working with the gwt-console, and I have two questions:
1) How to get access and add facts the knowledge session ?
2) Is there only one knlowledge session for all the process instances ?
I have a process with a "Rule Task" node. Within the rule I have to access
to the process variables. So, I want to add the process instance to the
knlowledge session.
Then, the rule (in this consecuence) inserts a fact to the knowledge
session, so a later gateway can take a desicion rule-based. But, is there
only one knlowledge session for all the process, this logic will fail. In
this way, it would be better to have one knowledge session instance per
process instance.
Thanks in advance.
--
*Juan Ignacio Barisich*
juan.barisich(a)fluxit.com.ar
www.fluxit.com.ar
53 n366, piso 9
La Plata / Buenos Aires / Argentina
(54)-221-427-5781 int:308
14 years, 2 months