Option Call method on object
by nada1985
Hello
I started on Drools guvnor and I have to create business rules in the
interface Guvnor.J 'have imported the model jar containing the necessary
objects but I have a problem calling methods, and getters setteres of a
class.
When I defined the conditions in When section, and I go to action, I choose
Call method on Command, I do not see the methods of the Command class.
Have you any idea? It blocks me for many days I do not know where does the
problem.
thank you
--
View this message in context: http://drools.46999.n3.nabble.com/Option-Call-method-on-object-tp3726315p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months
Rule processing blocking when I/O is involved in a BPMN 2.0 Task
by Alberto R. Galdo
Hi,
Our setup consists on some BPMN process being executed when a rule
fires. Our process has a node of type Task for which a handler is available
at the knowledge session. Our handler invokes a web service and waits (
blocks ) for the response before completing the task and letting the BPMN
process continue.
Well, we've inserted a hundred facts in the session that trigger the
rule that triggers the BPMN process that triggers the web service call ...
what we are seeing ( using the statistics gathered using JMX and our own
experience ) is that 100 rule activations are created and only one fires,
the rest, are "waiting" for the web service to respond. When the web
service responds then another rule fires, and so on. For an iliterate point
of view, seems that there's only one thread for it all, drools expert,
fusion and flow ...
Our session is stateful and we this is how we manage our session:
new Thread(new Runnable() {
public void run() {
session.fireUntilHalt();
}
}).start();
How do we get the rules to fire in parallel? Is there any better way
to get this done ( to get the processes executed in parallel and not
blocking the execution of the rules)?
Greets,
Alberto R. Galdo
argaldo(a)gmail.com
14 years, 4 months
5.3 ruleflow question
by St. Lawrence, Zachary
I am trying to use ruleflows to test a different approach to a problem but I am having problems finding the right implementing jars for use in my maven imports.
In 5.2 the needed builder classes were in jbpm-flow-builder. But 5.3 doesn't have that package. How does one use ruleflows in the most recent release of drools?
Zack
14 years, 4 months
DSL Build Problem
by John Peterson
I'm looking for a little help on a problem we can't figure out with some DSL errors during a build. We're working with version 5.3.0.Final on RSA 7.5.5.
The offending line of DSL is on the rule is:
Write qualifyingPoints on Result as $var01 * $var02
$var01 and $var02 are variables set in the WHEN part of this rule.
The offending line of code is translating to:
modify (Result){qualifyingPoints = $var01 * $var02};
When I execute the program that calls this rule, if fails during the build process with the following:
Unable to Analyse Expression @Modify with (Result){qualifyingPoints = $var01 * $var02 };
[Error: java/lang/String.isEmpty()Z]
[Near : {... @Modify with (Result){qualifyingPt ....}]
^
[Line: 1, Column: 9] : [Rule name=Qualifying Points rule 1']
If I modify the code to use an assignment and update instead of modify, it will build without an error:
Result.setQualifyingPoints( $var01 * $var02 );update (Result);
Note that we only see this behavior on RSA. We do not see it on Eclipse (but we need to use RSA).
I didn't find anything online so I thought I'd check to see if this is something someone has seen before.
Thanks!
14 years, 4 months
Can I insert a fact from within a drl function?
by Shur, Bob
It seems I am unable to insert a new fact from within a drl function. I tried this:
////////////////////////
package com.sample
declare Dummy
end
function void init() {
insert(new Dummy()); // Doesn't compile
}
rule "init"
salience 999
when
then
init();
insert(new Dummy()); // Compiles
end
////////////////////////
Is the above supposed to work?
14 years, 4 months
setting different value in consequence ( RHS part) based on a conditional check
by vadlam
Hi,
we have an existing BRL rule in Guvnor whereby we set the value of some
fields in RHS based on some value checks in the condition part. we have
created several of these rules already in a previous release.
In the next release, we have new requirements to set the value of an
existing field in consequence to be of 2 different values based on a
specific conditional evaluation. the rest of the rule remains the same.
to clarify,
when
samplefact1( status== "active" , state=="CA" )
then
Response fact0= new Response();
fact0.setField1( "Y" );
fact0.setName( "something " );
insert(fact0 );
end
we now have to change this to set Field1 value to Y or N based on some
updated condition for status field.
lets say if status=="active" , Field1 has to be Y, but when status=closed,
then Field1 has to be N
Please keep in mind that the rest of the rule remains the same.
is there a way to set the value of Field1 to be Y or N within the
consequence part of same rule without having to create another rule .
will the use of functions or variables be of any help in this case?
--
View this message in context: http://drools.46999.n3.nabble.com/setting-different-value-in-consequence-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months