Rules updating error
by Ioannis Christodoulou
In my java ee application, I use drools 6.1.0.Beta1, deployed on jboss eap
6.2 (I have also deployed Kie Workbench 6.0.1.Final).
In order to get the latest updates on my rules (made on kie wb) I tried to
set kiescanner to "LATEST". This seems to not be working always (I'm not
100% sure about the reason, it seems to happen when I have not re-deployed
the jar with the model classes I use in my rules, or I have not clicked on
build&deploy of the rules project), so I have reverted to using "1.0" as
the version and not changing the version when I update the rules project.
There is an issue with the application not validating, because I have a
guided decision table which uses a global variable and a function, but that
seems to not be an error after all (everything seems to build as it should).
However, while my application is running (and watching for updates through
scanner), if I make an update and deploy the rules project again, the
application retrieves the update and fails with a validation error about
not being able to analyse the expressions regarding the global function and
the global variable.
Any suggestions?
Thank you very much.
10 years, 9 months
Needs advice to help Drools on a big problem (and avoid GC overhead)
by Raphael
Hi,
In our project, we use Drools to compute forbidden allocations as input for
an allocation problem (for which we do not use Drools BTW).
The constraint of the problem (forbidden operation for given resources) are
expressed as drools rules.
We have about
-200 resources
-700 operations
Those are the Drools facts.
We have about 200 Drools rules describing the forbidden allocations
The problem here is that many rules produce duplicates forbids.
For instance :
Rule 1 may forbid Op1 on Res1 & Res3
Rule 2 may forbid Op1 on Res2 & res3
Currently the RHS of rules just insert forbids into a pure Java Set (no fact
insertion).
The Set takes care of avoiding duplicates, but still, we feel we could help
Drools by giving him a hint that
all rules are actually producing pairs of <Resource, Allocation> and that he
should not try to produce them more than once.
Currently the structure of each rule looks like that :
when
$resource : Resource(<someconditions>)
$operation : Operation(<someconditions>)
then
globalSet.add(Pair<resrouce, operation>)
end
With the size of the problem, we often end up with outOfMem/ GC limit.
When analyzing memory dump, we see about
300.000 drools left tuple object.
I am not sure if we could help drools to reduce the Rete tree here.
I mean, the allocation matrix is already : 200*700 = 140.000 cells.
Drools only uses 2 nodes for each possible forbids, which seems already well
optimized.
We had several idea to improve that though, but we are not enough expert in
the internal of the RETE algorithm to decide if that's a good way to go :
1) Insert forbids as facts in the RHS and check they are not already there
in the LHS :
when
$resource : Resource(<someconditions>)
$operation : Operation(<someconditions>)
not Forbid(res=$resource, op=$operation)
then
insert(Forbid($resource, $operation))
end
2) Merge all rules in one big rule with a single RHS
Is it possible to have something like :
when
// Rule 1
($resource : Resource(<someconditions>)
$operation : Operation(<someconditions>))
or
// Rule 2
($resource : Resource(<someconditions>)
$operation : Operation(<someconditions>))
// Etc ...
then
globalSet.add(Pair<resrouce, operation>)
end
3) Define a common RHS somewhere and tell Drools all rules use this one.
Is there a possibility in Drools to define reusable RHS ? Would it help ?
4) Any other idea ?
Thanks in advance for your help.
Brgds,
Raphael Jolivet
--
View this message in context: http://drools.46999.n3.nabble.com/Needs-advice-to-help-Drools-on-a-big-pr...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
cannot copy guided decision table
by Ioannis Christodoulou
I tried to copy a guided decision table in kie workbench 6.0.1.Final
It created the new decision table, but the generated drl (which can be
viewed from the 'source' tab)
cannot be validated, because the generated rule names are the same with the
copied decision table.
For example, copying the guided decision table: guided_decision_table.gdst
to rules2.gdst will not change the generated rules names, they will still
be:
rule "Row 1 guided_decision_table".
Is there something I can do about it ?
10 years, 9 months
How to allow non-programmers/non-Drools programmers to define rules
by ankit3j
I am a newbie to Drools and have been looking for a way to allow
non-programmers, mostly administrative guys, to define rules using a simple
language format and minimum coding terms/effort. I came across the concept
of DSL and DSLR and found it useful.
However, it seems that to use DSL one needs to have a knowledge of
domain(Java) objects defined. Not only does it defeat the purpose it also
exposes my Java objects to users. DSLR seems to be a better alternative
which can be modified by user. But it seems that DSLR is derived from DSL.
Which one of these 2 should actually be defined/written by user and uploaded
in the system so that backend can create rules based on it?
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-allow-non-programmers-non-Drools...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Configuring kie: namespace for Spring.
by milen igrachev
Hello,
can someone please paste me his definition of the xmlns:kie in the spring configuration.
I read the documentation and I got the configuration principles, but I cannot find the namespace definition in the net. A simple paste of the header xmlns:*/schemaLocation will be perfect.
Thanks in advance! M.
10 years, 9 months
Want to post to this list
by Ankit Jain
Hi,
I am Ankit Jain, a newbie to Drools. In order to get my queries answered I
would like to post to this mailing list.
Regards
Ankit
10 years, 9 months
Re: [rules-users] Updating project repositories
by Michael Anstis
I've asked a colleague to comment.
We do manipulate the pom for the UI but should retain original content that
is not modified by the Project Editor.
@Toni... What's your opinion?
Sent on the move
On 20 Mar 2014 18:03, "Joe White" <Joe.White(a)recondotech.com> wrote:
Also, that is the same configuration that is in my settings.xml for my
installed maven instance and the profile is active.
*From:* rules-users-bounces(a)lists.jboss.org [mailto:
rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Joe White
*Sent:* Thursday, March 20, 2014 12:01 PM
*To:* Rules Users List
*Subject:* [rules-users] Updating project repositories
I have updated my repository configuration but when I build and deploy by
package two things happen:
- The jar only gets deployed to my local repo it doesn't go out to
the remote instance
- The pom doesn't contain the full repository configuration when
deployed. The <snapshot> and <releases> config are dropped
Am I missing a piece of config to get the jar pushed out to my remote repo?
*My repository config inside the WB:*
<repositories>
<repository>
<id>recondo-repo</id>
<name>papaafrepo001-releases</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>
http://papaafrepo001.recondo.vci:8081/artifactory/repo</url>
</repository>
</repositories>
*Repo config inside the deployed pom:*
<repositories>
<repository>
<id>recondo-repo</id>
<name>papaafrepo001-releases</name>
<url>http://papaafrepo001.recondo.vci:8081/artifactory/repo</url>
</repository>
</repositories>
Joe White
CIO Technology Enabled Services
303-974-2849 (Office)
720-232-9023 (Cell)
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
10 years, 9 months
Module in Nexus Never Found
by david.berkman
Creating a KieContainer with a ReleaseId to load a jar from a Nexus repo. The
ReleaseId has '-SNAPSHOT' coordinates. I know the jar exists in the repo,
that it can be accessed, and that it contains the appropriate .drl files,
because when I run my project from the command line, using the Maven exec
plugin...
mvn exec:java
...everything is fine, the jar is found and pulled, the artifacts appear in
the local .m2 repo, the rules get loaded, and I'm able to create and use a
KieSession. I can test the rules, and they work. All is well.
If I run my project in any other way, with the 'java ' command whilst
setting the classpath properly, using the Tanukisoft wrapper, etc. every bit
of code runs properly, all necessary jar files are available on the
classpath, but the KieScanner tells me it can't find the jar...
Caused by: java.lang.RuntimeException: Cannot find KieModule:
com.mycompany:mymodule:1.0-SNAPSHOT
at
org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
My home directory seems like it's set correctly and is available from
properties as 'user.home', I can see a resolver-status.properties file
created at the proper place in the user's .m2/repository, so something knows
where the repo is, and has access to it. The resolver-status.properties
contains only...
#NOTE: This is an internal implementation file, its format can be changed
without prior notice.
#Fri Mar 21 02:31:03 UTC 2014
maven-metadata-local.xml.lastUpdated=1395369063564
maven-metadata-central.xml.lastUpdated=1395369063955
maven-metadata-central.xml.error=
maven-metadata-local.xml.error=
No luck, unless I use mvn exec:java, and then everything is fine. However,
our normal distribution methodology is not going to allow me to via Maven
this way.
Anyone happen to know what I'm missing so this will work executing the
'java' command? Some jar maven loads during exec that I'm not including as a
dependency? Anything?
All help appreciated,
David
--
View this message in context: http://drools.46999.n3.nabble.com/Module-in-Nexus-Never-Found-tp4028861.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months