DSL Enumerations
by rjr201
Hi,
I'm creating a DSL with dropdown boxes that are populated by enumerations. I
have so far had success in making one drop down box dependent on the value
of another dropdown box on the same [when] line:
[when]For every {objectType:ENUM:Object.type} with
{attribute:ENUM:Object.attribute} equal to {value:ENUM:Object.value} =
{objectType}({attribute} == "{value}")
In the above example whatever value is chosen for objectType will dictate
the values in the attribute dropdown which in turn dictates the values in
the Value dropdown.
My question is this: Is it possible to have a dropdown box reliant on the
value of a dropdown box on a /different / line of the rule?
I've tried a few different ways but am having no luck.
Thanks for any help anyone can give me on this.
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/DSL-Enumerations-tp4021696.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 1 month
form of accumulate in examples is depricated?
by Michiel Vermandel
Hi,
In lots of rules in the drools planner examples the accumulate function is used in this way:
rule "requiredCpuPowerTotal"
when
$computer : CloudComputer($cpuPower : cpuPower)
$requiredCpuPowerTotal : Number(intValue > $cpuPower) from accumulate(
CloudProcess(
computer == $computer,
$requiredCpuPower : requiredCpuPower),
sum($requiredCpuPower)
)
then
insertLogical(new IntConstraintOccurrence("requiredCpuPowerTotal", ConstraintType.NEGATIVE_HARD,
$requiredCpuPowerTotal.intValue() - $cpuPower,
$computer));
end
(example from cloudBalancing).
Though, documentation says (http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_...) one should this syntax:
<result pattern> from accumulate( <source pattern>,
init( <init code> ),
action( <action code> ),
reverse( <reverse code> ),
result( <result expression> ) )
Does this mean that the axemples could be optimized and that I should go for that syntaxt as well rather than using the syntax like rule "requiredCpuPowerTotal" ?
Thanks
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
13 years, 1 month
Will there be a 5.5.1 release?
by Magnus Vojbacke
I'm following a couple of specific bug fixes that have made it into the 5.5.x branch (including the serious "incorrect evaluation of LHS using Integer/Number intValue" bug from last week).
I need these bug fixes, but I'm not that eager to pull in a new major version (6.0) any time soon. Given the choice, I would definitely prefer to step up to a minor version (5.5.x).
How do you usually do it? Is there going to be a 5.5.1 release?
13 years, 1 month
hot deployment behavior
by William Guinn
Would someone be so kind to describe exactly what happens when we hot deploy a rule change to a stateful session. It looks like the old version of the rule is deleted, in turn forcing a retraction of any RHS that was logically inserted (all our inserts are logical) as a consequence of this rule (and any cascading effects) that has no other LHS to support its existence. Then the new rule is inserted, the agenda is rebuilt based on the current working memory contents, and the rule is automatically fired (in our case recreating everything it just deleted)
Do I have this right?
Is there a way to change the behavior to be less invasive? This "rebuild" can take minutes, and I am not running at high volume yet.
For example what if the updated rule logically has no impact on existing working memory contents, let's say it's a maintenance change for future facts or new conditions? If the operation did not delete and rebuild everything, rather if it determined the impact of the change, and only replaced retracted/deleted what is affected by the logic change, would this be faster?
Bottom line it would be highly desirable for this to be minimally invasive.
thanks
[cid:image001.gif@01CDF7F0.4B5CB130]
Bill Guinn | Sr. Vice President, and CTO
SUMMUS Software, Inc.
3179 Skyway Court, Fremont, CA 94539
510.780.3895 office | 916.715.6433 mobile
@summussoftware twitter
william.guinn(a)summussoftware.com<mailto:kl@summussoftware.com>
[cid:image002.png@01CDF7F0.4B5CB130] [cid:image003.jpg@01CDF7F0.4B5CB130] <http://www.summussoftware.com/pdfs/EMA_NGITM-Q4-2012_Radar_Summus-Profile...>
________________________________
NOTICE TO RECIPIENT: THIS E-MAIL (INCLUDING ANY ATTACHMENTS) IS MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, MAY CONTAIN CONFIDENTIAL INFORMATION, AND IS PROTECTED BY LAW. IF YOU RECEIVED THIS E-MAIL IN ERROR, PLEASE IMMEDIATELY NOTIFY THE SENDER OF THE ERROR BY RETURN E-MAIL, DELETE THIS COMMUNICATION AND SHRED ANY ATTACHMENTS. UNAUTHORIZED REVIEW, USE, DISSEMINATION, DISTRIBUTION, COPYING OR TAKING OF ANY ACTION BASED ON THIS COMMUNICATION IS STRICTLY PROHIBITED.
13 years, 1 month
multi-tier decision application in drools server
by Yuri
Hi Everyone,
I am trying to use drools 5.5.0 to provide approval/denial for a case. The
best way to represent our business logic is through a workflow where the
user-inserted facts get processed in a particular step, and the RHS of the
rules in that step insert new facts for the next step in the flow, until,
at the end, a decision fact is generated. Looking at the Drools Expert
tutorial, this is very similar to the driver license application, except
that mine has a jbpm flow. As such, I have been using a stateless session
to get my rules to work.
Until recently, I have been working on this problem as a local drools
expert solution, referencing the rules engine and the rules package
directly. However, the final step was going to be to move this solution to
drools server so that the business logic could be accessed through a
RESTful interface. I assumed that the main functionality available in the
drools rules engine would remain in drools server. However, when I saw the
following post, I became concerned that perhaps the functionality I took
for granted in Drools Expert does not exist in Drools Server. The post was
recent and has not gotten a response, but if the response is indeed that
stateless sessions do not work with rule flows in drools server, I was
wondering if anyone had a suggestion for how I would tackle my workflow
problem. Is there another way in drools server (other than salience) to
get different sets of rules to execute in a particular order and come up
with an answer at the end of the work flow?
http://drools.46999.n3.nabble.com/Ruleflow-not-working-with-stateless-ses...
Best,
Yuri
PS. I have been able to reproduce the scenario described by the user in the
post above.
13 years, 1 month
ETA on drools 6?
by kurrent93
Hi
I'm curious, when will drools 6 be released?
Also, about Guvnor-NG. I understand this will be written in Errai. Will it
be possible to host/embed elements as can be done now with Guvnor?
I also understand you will use Git. Will Guvnor also support databases, eg,
postgresql?
Is there any developer documentation for the next Guvnor?
Thanks and regards,
Anton
--
View this message in context: http://drools.46999.n3.nabble.com/ETA-on-drools-6-tp4021695.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 1 month
solution equals and hashcode are never called.
by Michiel Vermandel
Hi,
I am still struggling to find why my simple unit test cannot be solved to a zero score solution.
It is easily to see the solution on sight and if I feed it with the prepared solution (in a custom solver phase) it "finds" the optimal solution right away.
I'm trying everything and try to review everything I have written.
It is during that review that I noticed that the equals and hashcode methods of my solution implementation class are never called.
Obviously the solutionEquals and solutionHashCode methods of my planning entity are never called either.
What should I conclude out of that?
Is this a crucial issue? If so, what should I check/change?
I am running Drools Planner 5.5.0.Final on java 1.7.0 on a Windows 7 64bit machine.
Thanks,
Michiel Vermandel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
13 years, 1 month
detecting score traps
by Michiel Vermandel
Hi,
Is there any deterministic way for detecting a score trap in Drools Planner?
I have read about the hill-climbing issue and the ways to reduce the possibility of this but I think it is still possible to encounter, right?
So it would be great to have some red-light flashing when it happens after all :-)
Thanks,
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
13 years, 1 month