How to set up KIE WB + Drools Camel Server 6.0.1
by rt_olsson
Hi.
I'm currently in the process of setting up a Drools (6.0.1) environment from
scratch. The web applications are deployed on Tomcat (7.0.52) and everything
is using an MySQL (5.6.13) database. The goal is to have the KIE Workbench
up and running, together with jBPM and Drools. We also want to communicate
with Drools/jBPM via some kind of REST/SOAP service(s).
I have cloned the Drools source code repositories and built the various
binaries from there.
This is what I've done:
1) Installed Tomcat 7.0.52
a) applied configuration for Bitronix TM and the local MySQL server
(according to instructions in KIE WB README)
2) Deployed Drools Camel Server 6.0.1
(drools-camel-server-example-6.0.1.Final)
a) added a dependency to kie-ci to the pom.xml file
b) built and deployed to the local Tomcat server
c) in WEB-INF/classes/knowledge-services.xml, changed the kie:kbase
packages attribute to reference "com.acme.drools"
d) restarted the webapp
3) Built and deployed KIE WB 6.0.1 (kie-wb-6.0.1.Final-tomcat7) to the local
Tomcat server
a) applied Tomcat specified configuration according to the README file
b) restarted the webapp
4) In KIE WB:
a) created a new repository
b) created a new organizational unit and attached it to the new repository
c) created a project
d) in the project I created one guided decision table with one accompanying
data model class, all this in the same package "com.acme.drools". The
decision table matches the defined class and various attribute values
combinations. If there is a match the rule's action is to set a new
attribute of the object.
e) built and deployed the project to the local Maven repository
At this point I can't see any evidence in the logs that the Drools Camel
server really picks up the newly created kjar. How do I know if it has?
Should I expect it to load the jar? Do I maybe need to configure something
more or differently to make the two apps work together?
5) Via the Drools Camel REST API, I then inserted a fact that should trigger
the rule created and deployed in 4d+e. Unfortunately, it doesn't. Nothing
happens.
I can't get this to work. It is obviously something that I don't fully
understand when it comes to the interaction between KIE WB and Drools.
Does anyone out there have a small example of a working setup of KIE WB and
Drools Camel Server __with__ integration of the two through Maven?
Regards
Roland
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-set-up-KIE-WB-Drools-Camel-Serve...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 6 months
halting on sub-optimal solution
by nkgxgongxi
Hi everyone,
Could anyone help me by providing me some advice on how to make the
searching more efficient?
I wrote a program based on OptaPlanner to solve a scheduling problem, and I
knew the expected optimal solution. My program runs well to keep finding
better solution, however, when it comes to a solution which is really close
to the optimal one, the program just halts there. I mean, it keeps
searching, but can't reach the optimal even after 10hrs of running time.
I am currently using tabu search and simulate Annealing to control the local
search, and I have tried several different combinations of parameters, but
there is no improvement found.
I will appreciate your help.
Regards,
Gong
--
View this message in context: http://drools.46999.n3.nabble.com/halting-on-sub-optimal-solution-tp40294...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
OptaPlanner: Solver.isEveryProblemFactChangeProcessed() return true before the last fact change is processed
by Hagai
Using OptaPlanner 6.0.1.Final and following the documentation for real-time
planning:
"Alternatively, you can subscribe to the BestSolutionChangedEvent.
A BestSolutionChangedEvent doesn't guarantee that every ProblemFactChange
has been
processed already, so check Solver.isEveryProblemFactChangeProcessed() and
ignore any
BestSolutionChangedEvent fired while that method returns false."
However, Solver.isEveryProblemFactChangeProcessed() return true before the
last fact change is processed.
This is documented in the code DefaultSolver.java: *// TODO bug: the last
ProblemFactChange might already been polled, but not processed yet*
I believe this can be fixed using the following code in
DefaultSolver.checkProblemFactChanges:
ProblemFactChange problemFactChange =
problemFactChangeQueue*.peek()*;
while (problemFactChange != null) {
score = doProblemFactChange(problemFactChange);
*problemFactChangeQueue.poll();*
count++;
problemFactChange = problemFactChangeQueue*.peek()*;
}
This way the queue will not be empty until the fact change is processed.
--
View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-Solver-isEveryProblemFactCh...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Integrate jBPM with OptaPlanner
by jjn
Hi, how can I integrate jBPM with OptaPlanner. I have solved a problem using
OptaPlanner, where there are a number of requests which are optimally
assigned to particular employees, based on certain constraints. Now I want
to create a dispatcher in jBPM, where certain employees(actors) can solve
certain requests(process instances). Any idea how I can go about this
problem ?
--
View this message in context: http://drools.46999.n3.nabble.com/Integrate-jBPM-with-OptaPlanner-tp40293...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Drools 5.4
by maxynandy
if we have guvnor,we have a additional context (Url for Guvnor related
modules).
We would like to have a Single Context for our application.
1)Let me know whether any risk is seen in merging the application war and
guvnor war.
2)Alternatives for loading the rules dynamically other than using Guvnor.
Thanks,
maxynandy
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-tp4029407.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Question about length windows
by Demian Calcaprina
Hi Guys, I have one question about how lenght windows will work.
I have a rule like this. Basically, it is a "crosses" function, where the
value of my object crosses a value.
rule "mytest"
dialect "mvel"
when
t2_1 : Tick( value < 102.352 ) over window:length (1)
t1_1 : Tick( this before t2_1 , value >= 102.352 ) over window:length (2)
then
//DO SOMETHING
end
23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger]
(Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest
activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351,
tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352,
tickTime=Fri May 02 05:51:12 ART 2014](26)
23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger]
(Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest
activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349,
tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352,
tickTime=Fri May 02 05:51:12 ART 2014](26)
If you see, the first activation, the
window:length(1), matched the object 27
window:length(2), matched the object 26
Then, after 2 minutes and some Ticks insertes in the WM
window:length(1), matched the object 146
but window:length(2), still matched the object 26
I would expect, that, as object 26 was the first one to be inserted, then
it is outside the window:length(2).
Is my understanding correct? Am I making something wrong? I am using Drools
6.
Thanks!
Demian
10 years, 7 months
Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple
by JensAlejos@OAKCORPx4287
Hello,
Our Guvnor 5.3.0 is generating an OOM and crashing the server.
At the time of the crash we could see lots objects holding a lot of stuff in memory, most notably 23,878,166 org.drools.reteoo.JoinNodeLeftTuple, each of which takes 72 bytes. For 1.7 GB of heap.
I believe the real issue is something is going wrong in guvnor that it is creating way to many of these org.drools.reteoo.JoinNodeLeftTuple objects.
Do you guys have had this issue? Is this because of a Guvnor guided editor bug?
Thanks
NOTICE: This message, including any attachments, is intended for the use of the party to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately by reply e-mail, and delete the original and any copies of this message. It is the sole responsibility of the recipient to ensure that this message and any attachments are virus free.
10 years, 7 months
Rule Orchestration
by swaroop
Hi,
Iam using Drools 5.6 , developing rules on guvnor. I have a scenario where i
have two decision tables , One is supposed to execute after the other.
I want to ensure that DT Two should be executed only after all the
executions in DT one happen . Because IN DT Two the list is being checked if
set of values are not present, currently when i have two Customer objects in
Working memory each having matching rows in Decision Table One .Once the
match is found for a customer object then as per the action a Product fact
is inserted which leads to fire the DT Two and the list is evaluated if set
of d are not present , the rule is fired in DT Two as the list is not
populated for the other customer object and matching rows which is being
checked in DT Two eval list column. Which is not desired . I tried with
salience , ruleflow group with not much of a help
Is there a way to can handle this
<http://drools.46999.n3.nabble.com/file/n4029371/DTIssue.png>
*Decision Table One*
Condition Condition Condition Action
c:Customer
a==$param b in ($param) c == $param "list(Global
Variable).add(d);
insert(Product())"
*Decision Table Two*
Condition Condition Condition
Action
p:Product
a==$param eval(list doesnt not contain ($param)) c == $param
response.setMessage($param);
Regards
Oggu
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Orchestration-tp4029371.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months