Business Rules vs DLS Confirguration
by IPatel
Hi,
I have recently started using Guvnor and created simple rules in Business
Rules and DSL Configuration options. For one of my rule, i am using DSL Rule
in WHEN statement but when i try to write THEN statement, i see that i have
2 option "Insert Fact" and "Logically Insert Fact"
So without knowing which one to use, i tried both and i get out of memory
error. I also tried using either and still got the same error.
After this, i created another DSL rule in DSL Configuration and added that
in my THEN statement and it worked.
Can anyone explain what this means?
--
View this message in context: http://drools.46999.n3.nabble.com/Business-Rules-vs-DLS-Confirguration-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
continuous integration of rule assets via jenkins to guvnor?
by Cedric Hurst
I'd like to get a quick sanity check on best practices...
I'm working on a project where, by policy, all assets (including drl's, bpmn
files, etc) must be built, tested and packaged by a Jenkins server. Rule
assets are structured within a project that also includes non-rule assets.
As is quite common, the primary system of record for these assets is an SCM
like svn or git, and that's what our Jenkins box talks to.
However, for the rule stuff specifically, we're also using Guvnor's
drools-repository to package the assets into a knowledge base, which is
referenced jBPM's process engine in the runtime. The plan is to have
several Guvnor environments running with parity to development, QA, UAT and
production setups. However, we're having a very hard time figuring out how
best to sync our rule assets to these various repositories as part of an
automated release.
To the best of my understanding, rule assets are deployed to a Guvnor
instance file-by-file via WebDAV. One can also upload JARs for POJOs, but
DRLs, BPMN, DSL files need to be synced individually. Is this the case?
And, if so, how do other groups handle continuous integration and deployment
of assets coming from external SCMs?
Btw, I came across aware of a Maven plugin which seems to do this sort of
piece-by-piece deployment:
https://github.com/awaterma/drools-guvnor-plugin
So we could certainly port this sort of functionality to our own build
toolchain, but it seems like a lot of work so I'm hoping for a better way.
--
View this message in context: http://drools.46999.n3.nabble.com/continuous-integration-of-rule-assets-v...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Can get "not equal" (!=) to work but not "equal" (==) in LHS
by BenjaminWolfe
Background: I’m a business user. Dev wrote the fact model and the initial
rule set. I can’t configure the fact model, the agenda groups, or the java
code that fires the rules. I can change the rules within the .drl file. My
question has to do with those rules.
The application is run as a web service. Each call has just one Autopolicy
in its own stateless session. An Autopolicy has one or more Vehicles, and a
Vehicle has one or more Package of insurance coverages. Autopolicy objects
come in with a random float (RandomGenId) between 0 and 1. Based on that
random float we assign the object to an experiment group (RuleFlowId).
Based on the experiment group we then set the value of the packages. (See
the code below.)
Below, rules 0A and 0B work when I use ruleFlowId != “test” and ruleFlowId
!=“control” respectively, but they don’t work with the much more
straightforward approach of ruleFlowId == “control” and ruleFlowId == “test”
(respectively). Does anybody have an idea why?
Thank you!
-------------------------------------------
rule "control group"
agenda-group "Rules-Recommendation"
salience 999998
no-loop true
lock-on-active true
dialect "mvel"
when
$autoPolicy : Autopolicy(randomGenId < 0.5)
then
modify($autoPolicy) {setRuleFlowId("control")}; // Default ruleFlowId is
“1”
logger.debug("control group set");
end
rule "test group"
agenda-group "Rules-Recommendation"
salience 999997
no-loop true
lock-on-active true
dialect "mvel"
when
$autoPolicy : Autopolicy(randomGenId >= 0.5)
then
modify($autoPolicy) {setRuleFlowId("test")}; // Default ruleFlowId is
“1”
logger.debug("test group set");
end
rule "Rule 0A: Set Packages for Control Group"
agenda-group "Rules-Recommendation"
no-loop true
lock-on-active true
dialect "mvel"
when
$autoPolicy : Autopolicy(ruleFlowId != "test")
$vehicles : Vehicles()
$packages : Packages()
$vehicle : Vehicle() from $vehicles.Vehicle
then
// set $packages
logger.debug("Rule 0A fired");
end
rule "Rule 0B: Set Packages for Test Group"
agenda-group "Rules-Recommendation"
no-loop true
lock-on-active true
dialect "mvel"
when
$autoPolicy : Autopolicy(ruleFlowId != "control")
$vehicles : Vehicles()
$packages : Packages()
$vehicle : Vehicle() from $vehicles.Vehicle
then
// set $packages
logger.debug("Rule 0B fired");
end
--
View this message in context: http://drools.46999.n3.nabble.com/Can-get-not-equal-to-work-but-not-equal...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Drools planner: The workingMemory has 1 ConstraintOccurrence(s) in excess
by Michiel Vermandel
Hi,
I am using Drools planner 5.5.0.Final.
Once again I have the exception "The workingMemory has 1 ConstraintOccurrence(s) in excess".
I have added all relevant planning variables as parameters of the ConstraintOccurrence.
Could the following theory be an explanation for this issue?
My dataset is not that big (not small either).
Could it be that a certain move is taken twice within the same step (as part of score trap?) which results in the same constraint occurrence?
I have one other question - maybe related:
In my configuration I have this:
<acceptor>
<planningEntityTabuSize>7</planningEntityTabuSize> <!-- I tested with lower values (5, 3) too -->
</acceptor>
<forager>
<pickEarlyType>FIRST_BEST_SCORE_IMPROVING</pickEarlyType>
<minimalAcceptedSelection>1000</minimalAcceptedSelection>
</forager>
Because of the forager configuration a step is sometimes taken after as little as 40 moves, but sometimes the number of moves grows to enormous amounts.
I think if that happens that the score is no longer improving.
Is it "normal" that a certain step can make +50k moves and counting?
Or does indicate once more to a score trap?
Thanks
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
11 years, 9 months