Adding DROOLS/JBoss Rules to classpathCurrently, a JBoss Rules project is just
a Java project with two additional characteristics:
* The JBoss Rules classpath container is added to the classpath of the project
* A JBoss Rules builder automatically checks all rules for possible errors
In the
these jars differently. Do you
know how we can attach the source?
thanks
Steve
On 2/7/07, Kris Verlaenen [EMAIL PROTECTED] wrote:
Currently, a JBoss Rules project is just a Java project with two additional
characteristics:
* The JBoss Rules classpath container is added
The wiki contains an entry on how to combine JBoss Rules with tomcat:
http://wiki.jboss.org/wiki/Wiki.jsp?page=RulesTomcat
Kris
- Original Message -
From: Nagabhushanam B
To: rules-users@lists.jboss.org
Sent: Thursday, February 15, 2007 2:21 PM
Subject: [rules-users]
org.drools.ide_1.0.0.jar ? This seems to be an old version. I would expect to
see org.drools.ide_3.0.5 there. But best way to install the JBoss Rules IDE
into eclipse is by using the update site and not download the plugin manually,
as explained in
The 3.1M1 version should definitely work with eclipse 3.2.1. Higher
versions of eclipse are probably good as well, just haven't tested any of
those yet. It is possible eclipse is not using the new version of the
plugin if you installed the new version on the same eclipse as the old one.
You
;
}
};
logger.addFilter(filter);
logger.writeToDisk();
With kind regards,
Oana
Kris Verlaenen [EMAIL PROTECTED] wrote:
You just need to create a class that implements this interface and that
determines which events should
RE: 4.0.0-M2: RuleFlow CannotResolveClassException error I think the RFM
file is just a data file for the GUI display, not needed for runtime. Kris
can you confirm?
It is the other way around. The plugin generates 2 versions of your
ruleflow:
- a .rf (ruleflow file) containing the entire
The DSL support in the eclipse plugin has changed slightly:
- DSL rules are now considered as a special format. The extension of DSL
rules should thus no longer be .drl but .dslr
- A dedicated editor for .dslr files has been created, which allows you to see
a preview of the translation of
The working memory provides methods for adding different types of listeners
(workingMemory.addEventListener(...)).
The AgendaEventListener can be used to write out additional information
about which rules have fired.
The Eclipse IDE also provides an audit view which can be used to visualize a
Ronald,
Could you try not setting the compiler compliance level of your
eclipse project to 1.4 but leaving that to 5.0 and only setting the
source compatibility level and the generated .class files
compatibility to 1.4? The plugin needs a 5.0 compliant parser, but it
can generate 1.4
You shouldn't really access the ProcessBuilder directly anymore, we've added
support in the PackageBuilder for that (similar to rules, decision tables,
etc.):
PackageBuilder.addRuleFlow(Reader)
If you want to access ProcessBuilder directly, you can just provide an empty
PackageBuilder, but it
So my question is, how can I say to the split node to consider the fact
outgoing from the ruleFlowGroup1 and not a fact in the working memory
In one of the future releases, we will add support for ruleflow 'variables'
that can temporarly store some value so that it can be used by other
)
at org.drools.compiler.PackageBuilder.init(PackageBuilder.java:139)
at org.drools.compiler.PackageBuilder.init(PackageBuilder.java:88)
Kris Verlaenen wrote:
Yes, that is possible, but you should also add the (generated) package of
your PackageBuilder.
But this process is actually much simpler when using
A ruleflow actually just presents a set of rules that you want to evaluate (and
you use a ruleflow to specify the order). You can define yourself when to
execute those rules by invoking startProcess whenever necessary. It is
possible to have multiple (possibly unrelated) ruleflows in one
This is not Drools-related but rather a generic Java problem.
You should read the Java API of the Reader class.
A reader remembers the last position it used to read out data.
So if you try to use the same reader twice, the second time it will be
empty,
as it will already be at the end of the
This exception is thrown when it cannot find (one of) the necessary libraries
for loading the Java Dialect. In this case probably the eclipse jdt compiler.
Make sure all the necessary dependencies are in your classpath. If you are
using a Drools project, the Drools classpath container should
You should also use the parentheses for functions, as in normal Java code:
eval ( teste() )
Of course you can add parameters etc. to your functions like this as well.
Kris
- Original Message -
From: Rafael Alcemar
To: rules-users@lists.jboss.org
Sent: Friday, August 17,
This is a way to tweak how connections are shown in your ruleflow:
- manual always draws your connections as lines going straight from their
start to end point (with the possibility to use intermediate break points)
- shortest path is similar, but it tries to go around any obstacles is
might
The expected behavior is actually the second one, did you really get those
results when executing the first set? The reason is that you should notify
the engine if you change a product (so it can re-evaluate). Otherwise, it
will never know that the product has changed price and will still use
... But I have the same result without my
ruleflow.
vdelbart
-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Kris Verlaenen
Envoyé : lundi 10 septembre 2007 16:37
À : Rules Users List
Objet : Re: [rules-users] Ruleflow and persistence
The expected
Actions in RuleFlow are interpreted at runtime using MVEL. This error seems to
indicate that there is a problem in the syntax of your MVEL expression.
However, looking at your example, I do not see any problem,
System.out.println(Your text here); as action property should work (I just
tested
Now my understanding is that It should execute rule Increment 5 times..
But instead it does it 10 times.
Is that a normal behavior?
Well, actually, this is expected behaviour, let me try to clarify.
Whenever a RuleSet node, like your Up node, is activated, it starts executing
use the rule attribute lock-on-active to stop this behaviour, it stops a
rule re-activating while the ruleflowgroup is active
Well, this won't work for the same reason no-loop isn't working: if you use
lock-on-active, it will make sure that the rule is not reactivated, so the
execution of the
.
Mark
Kris Verlaenen wrote:
use the rule attribute lock-on-active to stop this behaviour, it stops a
rule re-activating while the ruleflowgroup is active
Well, this won't work for the same reason no-loop isn't working: if you use
lock-on-active, it will make sure that the rule
Globals should not be used for storing information that needs to be updated.
From the documentation:
Globals are named objects that can be passed in to the rule engine; without
needing to insert them. Most often these are used for static information, or
services that are used in the RHS of a
Strange, could you please specify which version you are using for
- eclipse
- GEF
- Drools
so I can try to reproduce this error?
Kris
- Original Message -
From: [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
Sent: Thursday, September 20, 2007 7:13 PM
Subject: [rules-users] Creating
Paul,
Correct me if I'm wrong, but I think RHDS is on top of Eclipse Europe (3.3),
and the current version of the Drools plugin is still targeted to Eclipse
3.2. Most of it will work, but debug is one of the areas where there have
been some changes in the internal eclipse APIs. We'll be
Sergey,
In theory you can use AgendaFilters in combination with ruleflow. Note however
that the agenda filter will prevent certain other activations from firing. As
a result, your ruleflow could be blocked somewhere by not being able to execute
certain activations:
* An ruleflow group will
You can create a rule that initializes your global, preferrably with a high
salience so it gets executed first:
rule InitializeGlobal salience 100
when
then
ArrayList objectList = new ArrayList();
objectList.add(1);
objectList.add(2);
That initialized my global but the rule still runs every execution. Can I
disable the rule after the first execution?
What do you mean by every execution. A rule should only be executed once,
unless it gets reactivated (which should not be the case in this situation).
I would like to use (if
You can safely ignore this message, everything should still be working fine.
I already updated trunk so that this message does not appear anymore.
Kris
- Original Message -
From: J Michael Dean [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
Sent: Thursday, November 01, 2007 1:04 PM
Rules can be added to both a ruleflow-group and an agenda-group. However,
for a rule to fire in that case, both its agenda-group AND its
ruleflow-group should be active, otherwise a rule will NOT fire. So simply
calling setFocus will not work if your ruleflow is not executing that
specific
You should make sure you are using the right version of eclipse. For the
latest 4.0.3 release, there are two versions of the eclipse plugin, one for
eclipse 3.3.x and one for eclipse 3.2.x. Older versions of the eclipse
plugin require eclipse 3.2.x.
Looking at the message, you seem to be
Did you try cleaning your entire project? Or maybe even re-import the
project in eclipse?
Occasionally it happens that an eclipse project gets messed up in some way
...
If this fails, could you open a JIRA with a selfcontained sample eclipse
project showing the error? I'll try to take a look
Have you tried java.math (math should not be capitalized)?
Kris
- Original Message -
From: Andy Mei [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
Sent: Friday, November 16, 2007 4:44 PM
Subject: [rules-users] From accumulate compilation error
:java.Math.BigDecimal cannot be
From the documentation:
The guided editor works based on a .package file in the same directory as
the .brl file. In this package file - you have the package name and import
statements - just like you would in the top of a normal DRL file. So the
first time you create a brl rule - you will need
Massi,
Why do you want to use a ruleflow? If you simply remove the ruleflow-group
statements from your rule definitions, you will get your expected behaviour, as
rule_ab will execute first, updating your user fact, which will then trigger
rule_ba to execute, updating the user fact again,
The audit viewer is SWT-based (that is the eclipse UI) and can be embedded
in an SWT application. If your application is Swing-based, you should have
no problems in creating something similar as well if you know how to use a
JTree. The code for the audit view is in the eclipse plugin, take a
The ruleflow action node can be used to specify some action (as a piece of
code) that should be executed. Currently, it only has access to global
variables. It might indeed be a good idea to also allow access to some kind of
workingMemory variable. We will try to add support for that when we
I would like to introduce if\while statements into the action node
The use of if/while statements in the MVEL dialect is disabled, as it usually
leads to less declarative rules. For simple if-statements, you can still use
(x == null ? x : y). More complex if/while constructs can usually be
If rules are part of a ruleflow-group, they are only considered if that
ruleflow-group is active. You can activate the ruleflow-group by using it in
a ruleflow, but you can also manually activate ruleflow-groups:
workingMemory.getAgenda().activateRuleFlowGroup(String name)
Kris
-
The screenshot shows the old approach, where each sentence is suggested word by
word. This approach however contained some flaws and we weren't quite happy
with it (it becomes very confusing if you have quite a few DSL sentences).
That's why we reverted back to suggesting the entire sentence
When creating a drl file using the wizard, check the Use a DSL checkbox.
The wizard should now create a .dslr file.
Kris
- Original Message -
From: SB.Raghavendra
To: Rules Users List
Sent: Tuesday, March 11, 2008 1:28 AM
Subject: [rules-users] How to create dslr file in
Mehak,
You can use rules to activate your ruleflow, where you can use the drools
variable in the rule consequence.
For example, this rule would activate a sample ruleflow automatically at the
start of the session:
rule Test salience 10
when
then
A RuleFlow simply makes sure your rules are evaluated in a specific order.
Both strategies are possible, but I believe there are some small differences:
- If you first insert all your debts and then activate the ruleflow, all
orders will progress through the ruleflow at the same time (e.g.
Ruleflow groups allow you to group rules together and rules inside a ruleflow
group only execute when the ruleflow-group is active. You can use ruleflow
groups inside a ruleflow but they can be used outside ruleflows as well. You
could manually activate and deactivate ruleflow groups using
There should be no tweaking to get it working correctly (ruleflows don't
even use separate threads during execution currently). Based on your
explanation however, it is not obvious why things might be going wrong. I
suggest trying to use the audit view or a custom logger to figure out what
There was an error in the IDE where different configuration files were not
correctly loaded from the user classpath when creating a PackageBuilder. I
have fixed this in trunk (JIRA JBRULES-1614).
For now, I suggest you use the workaround as suggested by by Steve (thx
Steve !). Putting the
it seems that current released version of drools, supporting only MVEL
code
The action node allows you to simply execute a piece of code. While Drools
4.0.7 only allows you to use mvel fragments, the upcoming Drools 5.x release
also allows you to use the Java dialect. It will also allow you
Actually i have an action, which is common to a couple of splits, so in my
action i need to log(log4j - file appender) that from which split request
is
coming from.
I would guess you would need to create two actions, one for each path,
before the join. Those actions would have similar
is action will support below kind of stuff ?
An action is like a rule consequence, it should be valid java or mvel code.
Something like
System.out.println(This is an action);
or
insert(new Person());
The code you are using is actually a rule (you are matching variable p to an
object in
it seems the activation for the second node is not cancelled also i
do a retract in the rule
The activation should have been removed from the ruleflow group. I just
tested this with a small example and I do not seem to be able to reproduce
this error, the retracted object seems to have
Are you loading your DSL rules using PackageBuilder.addPackageFromDrl(Reader
source, Reader dsl) ?
Kris
- Original Message -
From: Barry Kaplan [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
Sent: Tuesday, June 24, 2008 7:33 PM
Subject: [rules-users] DSL debugging?
I have a
The IDE allows you to define shared definitions (e.g. functions and imports)
in a file with extension .package (instead of the normal .drl). This
.package file should be in the same directory as the rules that use it, the
IDE is not capable of searching other folders at this point.
Kris
Use a rule (probably without conditions and high salience) to start your
ruleflow:
rule Start Process salience 10
when
then
drools.getWorkingMemory().startProcess(yourName);
end
Kris
- Original Message -
From: Yoni Mazar [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
I have a condition on an attribute of a few inserted objects(all of
same type) in the Split node of a ruleflow.
Basically rules that are used inside split nodes are evaluated exactly the
same way as normal rules.
The condition looks like: Author( attribute == -1 )
and it holds for all
At issue, the rules within the second ruleflow, though activated, are not
being executed.
Do you have a test case that shows this behaviour? If you open a JIRA and
attach the test case, I'll take a look. Have you tried starting the process
directly using the startProcess method on the
As far as I know Drools Flow Eclipse editor works only in Eclipse 3.3.
This depends on the version of Drools you are using. For Drools 4.0.x you have
the choice to use either Eclipse 3.3 or 3.4 (just select the right download),
for Drools5 you'll have to use Eclipse 3.4.x.
Also the RETE tree
Hans,
The behaviour you are witnessing is indeed expected behaviour. The problem is
that we currently do not have a matching OR-join construct, so it is indeed
difficult to model behaviour like you want to. The reason is that is it a very
difficult problem to create a generic OR join, i.e. a
Keith,
This issue has already been fixed on the trunk version a while ago, as a
ProcessBuilder now reuses the package builder configuration. So it will be
part of the M3 release.
Kris
- Original Message -
From: keithnielsen [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
Sent:
[The following answers are based on the latest Drools 5 M3 code.]
1) I am assuming that when creating the constraints within a given node
within a rule flow that the selection of rule as the type will create a
rule behind the scenes while selection of code will create some java
object
Michal,
I'll add a dispose method to the SingleSessionCommandService. Don't think
using a command for this would be a good idea as it would leave the session in
a disposed state so future commands would fail.
Regarding your earlier question, SingleSessionCommandService now also has
Eclipse 3.4.x is not supported for Drools 4.0.x. So you should either
- use Eclipse 3.3.x or 3.2.x with the corresponding Drools 4.0.7 plugin
- use the Drools 5.x plugin with Eclipse 3.4.x
Even though large parts of the Drools 4.0.7 plugin might still work under
Eclipse 3.4.x, some things like
The Rete Tree view of the Eclipse drl editor does fails for the example
drl fild, with Rete Tree Build Error.
Which version of the Drools plugin and which version of Eclipse are you
using?
I know the Rete Tree was broken for a while but should be working again in
the latest release.
Kris
(where is the best place to call commandService.dispose()
method?).
Best Regards,
Michal
On Tue, Dec 2, 2008 at 4:31 PM, Kris Verlaenen [EMAIL PROTECTED] wrote:
Michal,
I'll add a dispose method to the SingleSessionCommandService. Don't think
using a command for this would
This error is usually indeed the result of not having the correct eclipse jdt
jar on your classpath. Are you using the Drools Eclipse plugin (as that should
get the dependencies for you automatically)? Could you explain what version of
Drools, Eclipse and Drools Eclipse Plugin you are using?
The Drools plugin now supports multiple runtimes, but this means you must
always define one. We are still in the process of documenting this, but this
is an extract from the docs that should help you out. Let me know if it is
still unclear.
Note: the images that are referred to can be
Christiano,
Take a look at
http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch09.html
for more information about human tasks and swimlanes in general.
So a swimlane can be used to assign human tasks to the same actor. Actors are
Steve,
If you have access to the process instance, you can access the variables like
this:
processInstance.getContextInstance(VariableScope.VARIABLE_SCOPE).getVariable(variableName);
You can of course hide this behind a function or java util method if you want
to hide the details.
Kris
You can decide yourself how to respond to the result. So yes, you can just
implement your own handler. The blocking response handler is made for testing
purposes mostly: when you ask it for the results, it will wait until those
arrive or will throw an exception if it needed to wait too long.
Femke,
That error occurs when you are trying to execute the Human Task node. In you
human task node, you probably have a mapping from the patient variable to a
parameter of the human task (either by mapping the variable directly using the
in-mappings property or by using #{patient} inside one
Cristiano,
The errors do seem to indicate that the collection expression and variable
name are empty. This in combination with your layout problem seems to
indicate to me that there is an issue when trying to save or load the
underlying XML. Could you open a JIRA and attach the ruleflow
Garrett,
The 3rd option you describe is currently possible in the core engine,
however support has not yet been added to the graphical designer for this.
You can however manually add it in the XML directly for now. If you look at
the XSD it should look something like this:
start id=1
Cristiano,
If the working memory is always different per work item, you could use a
global and pass it as a parameter of the work item.
However, in general it does seem better to set this on the work item handler
directly at construction time, as a parameter on your work item handler.
Cristiano,
There are some examples on processes using timers here:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java
If you need help, could you maybe send me the test project you are trying to
execute, so I
process
completed if diagram has a timer...
Ok, I'll sent to you my project.
Thanks
On 02/03/2009, at 11:19, Kris Verlaenen wrote:
Cristiano,
There are some examples on processes using timers here:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org
Femke,
If the editor cannot read the underlying XML file, it will default to a new
ruleflow, i.e. the start only.
There should be an error in the Eclipse error log (Window - Show View -
Other ... and then under General).
Could you maybe send me the error and/or the XML file? as this should
Garrett,
No, there is no limit in the number of process instances you can have
simultaneously. I did manage to reproduce your error though, and
discovered an issue when firing rules (we do not allow nested execution
of fireAllRules() but in some specific case this didn't work correctly).
This
Marc,
As Mauricio already pointed out, we have already have very concrete plans in
adding separate persistence of process instance variables in the database.
I expect this to be added to trunk in a few weeks time. This will allow
pluggable persistence managers for all your variables based on
Quoting Marc Dzaebel mdzae...@web.de:
Hi Kris,
thanks for your thorough and quite helpful explanation!
Kris Verlaenen wrote:
... concrete plans in adding separate persistence of process
instance
variables in the database. I expect this to be added to trunk in a
few
weeks time
Alessandro,
Not sure what the XOR constraint looks like exactly, but if you are
using a rule constraint and it is referencing the NumeroRound object in
working memory, are you notifying the engine when this number is changed
(as I didn't see any update statements in your rules).
To figure out
These figures are strange indeed, and probably caused by other causes
than simply the loading itself. You should expect a small increase in
load time related to the number of nodes in the process, and some types
of nodes that are using rules will probably take a little longer to load
(as they
Michal,
A ruleset node only continues if the ruleflow group is it associated
with is deactivated. A ruleflow group is deactivated automatically if
it contains no more activations or if you deactivate it manually. By
using an agenda filter, you are not executing the activation and thus
the
PS: Is this the corrent list for rules flow users? Is rules flow an
active project?
Yes, you've come to the right place ;)
This might be a bug:
Globals declared Constraints for an Event Wait node don't show up in
the headers section of the rf file.
The problem appears to be that, if you
It's difficult to figure out what's going on without looking at the
process itself, but your code seems to be fine. If you run the engine
in reactive mode (using fireUntilHalt), it should automatically fire the
action associated with the timer once it goes off. Note that, if you
are not running
Andre,
In Drools5 we introduced a new module called drools-api which contains
all the stable interfaces we want to expose to the end user. People who
are using the new Drools5 API are encouraged to use only the public API
and not cast to internal implementation classes as they might change
over
Ajay,
Rule constraints can only reason on data in the working memory. In
general there are two strategies for handling your problem then:
1) The variable you want to access (in this case the request) is also
inserted in the working memory. That way you could write something like:
$r:
Andre,
There should be no problem in using the same global in both your rules
and processes.
I have tried a simple example as you described but have not been able to
reproduce the problem. Could you send me a self-contained example that
shows the issue?
Kris
Quoting Malenfant, Andre
Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Malenfant,
Andre
Sent: Wednesday, June 10, 2009 11:07 AM
To: Kris Verlaenen
Cc: Rules Users List
Subject: RE: [rules-users] Globals in ruleflow
Thanks for trying this for me
by a consequence
of my rules, I have to call update? For the same reason? I guess I am
trying to understand the underlying mechanism.
Thanks
-Original Message-
From: Kris Verlaenen [mailto:kris.verlae...@cs.kuleuven.be]
Sent: Wednesday, June 10, 2009 11:38 AM
To: Rules Users List; Malenfant
Terminate Property *is* set to true).
Thanks
Ajay
-Original Message-
From: Kris Verlaenen [mailto:kris.verlae...@cs.kuleuven.be]
Sent: Friday, June 05, 2009 5:08 PM
To: Rules Users List; Gautam, Ajay, GBM
Cc: rules-users@lists.jboss.org
Subject: Re: [rules-users] Timer does
for the completion of the
process instance. This keeps this implementation choice from your
process logic then. In general, you just call halt() when you're done
processing. For long-running sessions, you might even never call it.
Kris
Ajay Gautam
-Original Message-
From: Kris Verlaenen
Mike,
The work item definitions file is only used in the graphical editor, to
add custom nodes to the palette. It is not used at compile or runtime,
as the variable definitions etc. are all part of the work item itself.
So you probably don't need it in your environment.
Kris
Quoting msully
Let me try to answer the first set of questions:
- does RuleFlow support arbitrary long wait states, in other words,
can I call long-running services from it asynchronously?
Of course, there are various nodes that behave as some sort of wait
node. For example, a work item node waits until the
Gryf,
The order example can be executed using what we call advanced execution
mode. In that case, you are not automatically going from one node to
the other in your process all the time, but we allow other rules to
intervene and possibly override the default behaviour. The
workflow_rules you
Are you debugging your application as a Drools Application?
Check out the documentation here:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html/ch07.html#d0e6947
If that is not working, could you create a new sample project with the
There is no one method API to do this at this point. However, if you
have a process instance that is waiting for a sub-process to complete,
there always is a SubProcessNodeInstance as part of the parent process
instance that contains the info you need.
So what you could do is iterate over the
Yes, this is a limitation of the IDE. The reason is that a stateless
session does not provide the methods needed to retrieve the information
the IDE needs. For retrieving the state of the session, you will need
to use a stateful session (at least for testing).
Kris
Quoting Miles, Eric
The fix for this issue has been added to trunk about a month ago already
I think, have you already tried with the 5.1.0 SNAPSHOT release? Does
this solve your issue?
You can get the snapshot at
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/
Kris
Quoting SBalakrishnan
Hi,
Most of this information can be found in one of the various Drools Flow
documentation chapters.
Quoting pardeep.ru...@lntinfotech.com:
1. Is there support for multiple roles in a workflow?
I suppose you are referring to different human actors? Human tasks can
be assigned to different
1 - 100 of 310 matches
Mail list logo