how to avaide overwrinting results in drools planner
by Ricardo
I have 2 boxes, lets say each size of 5x5 and I have 3 items two size 4x4 and
one item size is 3x3. planner initially planner assigning as follows...
I - When I use 3 items 2 boxes....(this produce wrong planning)
item1 (4x4) --> box1 (5x5)
item2 (4x4) --> box2 (5x5)
item3 (4x4) --> box1 (5x5)
II - When I use 2 item, result as follows...(this is correct planning)
item1 (4x4) --> box1 (5x5)
item2 (4x4) --> box2 (5x5)
III - When I increase one more box....(this is correct too)
item1 (4x4) --> box1
item2 (4x4) --> box2
item3 (4x4) --> box3
you can see the test I - it is over writing the first assignment and assign
the new item there in the box 1, I unable to figure it out how to solve this
problem, I suspect this can be done in the score calculation rules, the
problem is I do not know how to implement to avoid the overwriting
assignments.
thanks,
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-avaide-overwrinting-results-in-d...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Write Assumptions for NESTED List<Object>
by aliosha79
Hi i have these simple three POJO class. The first is an OrderType that
cointains a List or OrderLineType and each orderline cointains a list
of measures.
________________________________________________________
/public class OrderType {
protected List<OrderLineType> OrderLine;
protected String priority;
public void set ....
public List<OrderlineType> get ....
public getPriority()...
public setPriority()...
}
public class OrderLineType {
protected String Quantity;
protected List<OrderLineMeasure> OrderLineMeasure;
public void set ....
public List<OrderLineMeasure> get ....
public getQuantity()...
public setQuantity()...
}
public class OrderLineMeasure {
protected int measure;
protected List<OrderLineMeasure> OrderLineMeasure;
public getMeasure()...
public setMeasure()...
} /
________________________________________________________
I want to write an assumption stating that:
*If an ORDER contains at least 3 orderLine... the order must have the High
Priority.* In can do that writing this rule:
_______________________________________________________________
/when
$Order : OrderType ($orderLineList :orderLine)
OrderLineType(Quantity.Value >= 3 ) from $orderLineList
then
$Order.getUBLRuleEnginePriority().setValue("high");
end/
________________________________________________________________
Now how can i write the assumption? if i want a rule stating:
*If an ORDER contains at least 3 orderLine and Each OrderLine contains more
than 12 measures... the order must have the High Priority.*
Really thanks for your help.
Regards.
Alessio
--
View this message in context: http://drools.46999.n3.nabble.com/Write-Assumptions-for-NESTED-List-Objec...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Issues without response
by Cyril Sochor
Hi,
I created two issues in bugtracker, second one with pull request.
JBRULES-3528 Deadlock when using pseudo session clock
JBRULES-3529 JMS messenger for JBOSS AS 7.1
Issues are 20 days without any response. What's wrong?
Thank you,
Cyril Sochor
13 years, 8 months
Workitems doesn't get persisted when completing a task after rehydrating a knowledge session is some circumstances.
by Alberto R. Galdo
Hi,
We have a fairly large BPMN process running inside a JPA persisted
StatefulKnowledgeSession using Drools 5.4 & JBPM 5.3. Our process involves
timers, automated tasks, human tasks .... most of them are long-running
processes, so a fault-tolerant scenario is a must.
We've found what seems to be a weird, weird bug in JBPM-Drools
regarding the execution of BPMN processes. This is by best to summarize the
problem:
"We are unable to complete a human task after rehydrating a Drools
knowledge session because in some circunstances the generated Drools'
workitems don't get persisted in the database after the completion of a
previous task"
So, as the workitem is not in the database, when a human task client
completes a task that is related to that non-existent workitem, the process
doesn't get restarted. And the process fails.
¿Why does this happens? Lets see:
When the processs is executed, different workitems get created,
updated and eventually deleted during the execution of a process up until a
human task is created ( in our process ). When living in a persistet
knowledge session, the transaction that is associated to Drools' thread is
commited right after the human task is created in the human task server ...
as it is a "safe point". Nothing here. Everithing is consistent, if you
look at the database you will see your session instance, your process
instance, and the final human task workitem as it is the only workitem
survivor after the execution ( whatever hadler-managed automated task that
were executed before the human task are deleted and the human task workitem
needs to survive as it's completion depends on asyncronous client
interaction ).
Now, if you connect to the human task server and complete that human
task, a message is sent to the Drools session to update the state of the
work item. The workitem gets updated, the process get restarted and the
flow continues ... maybe generating a new human task ( which is our case ).
At this very moment, if you take a look at the database, there are no
automated-handled-task workitems ( as expected ) but there isn't any human
task related work item, even worse, the task at the human task server is
created, persisted and has a reference to the non-existant workitem.
Days of debugging led us to what we think is the source of the problem:
We found that the execution of the process after completing a task is
being executed in the same thread as the one that receives the mina message
that the human task server sends whenever a task is completed. This thread
is not the same thread that executes the knowledgesession ( where the
reteoo lives ) and so it doesn't have a transaction. By the way, we found
that for workitem persistence the JPAWorkitemManager never joins an active
transaction. :(
That's why invoking the persistence of a workitem as a consequence of
restarting the execution of a process inside the thread that receives the
mina messages makes the database inconsistent, and so invalidating all
means to make JBPM fault tolerant by making Drools session persistent.
We found a way to circunvent this problem, making all our human task
nodes be followed by a event timer. That way, when the timer gets completed
we force the execution of the process to live in the same thread that the
reteoo session lives where a transaction is available and things get back
to normal. But this is really dirty and wrong.
Any thoughts?
We are really eager to be wrong whith this. :'(
Greets,
Alberto R. Galdo
argaldo(a)gmail.com
13 years, 8 months
JBPM & ontology
by Olfa h
Hi,
How i can integrate ontology created with Protégé with JBPM ?
can you give me an example
thank you
13 years, 8 months
Help please!!!
by paco
I want to detect the conflict between the rules with Drools Verifier. For
example the first condition of the second rule is present in the first rule
and the actions to perform are the same in both rules as they demonstrate in
the following case. It works very well when these rules belong to the same
drl file.
--------- fichier a.drl---------------------------
rule "a"
no-loop true
ruleflow-group "group1"
dialect "mvel"
when
A==0
then
Action1
end
rule "b"
no-loop true
ruleflow-group "group1"
dialect "mvel"
when
A==0 && B==1
then
Action1
end
The problem arises when I separated its rules and that I have to put each in
its own file
---------------- a.drl----------------
rule "a"
no-loop true
ruleflow-group "group1"
dialect "mvel"
when
A==0
then
Action1
end
------------------b.drl--------------------
rule "b"
no-loop true
ruleflow-group "group1"
dialect "mvel"
when
A==0 && B==1
then
Action1
end
I can no longer detect this problem with Drools Verifier.
Does anyone ever encountered this problem?
How can I do to write a small program to audit if this case?
--
View this message in context: http://drools.46999.n3.nabble.com/Help-please-tp4018136.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Guvnor access DB2 using kerberos
by yan.d.zhang@accenture.com
Hi,
I am currently using Drools Guvnor 5.4.0-Final, and trying to connect it to DB2 database using Kerberos.
I downloaded the db2 jdbc jars, modified repository.xml file, and also created the database schema manually into DB2 according to db2.ddl file in jackrabbit-core-2.2.8.jar.
However, I still get the following errors in log file:
- "failed to initialize File System"
- "Cannot create PoolableConnectionFactory (DB2 SQL Error: SQLCODE=-1060, SQLSTATE=08004, SQLERRMC=ECSTST, DRIVER=3.57.82)"
Is there any specific steps I have to do to connect Guvnor to DB2 using kerberos?
Thank you,
Yan
________________________________
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
______________________________________________________________________________________
www.accenture.com
13 years, 8 months
Need Suggestion about what rule engine to use
by debchamps
Hi,
I have an application where I will be requiring rule engine in two places.
Use case1
-------------
I have around 15 rules(It is likely to change very rarely) which are like
truth table
var1 var2 var3 var4 Action
true false false true add x,y,z to list
false false false true set x = todaysDate +3
Use case2
------------
There is lots of rules (atleast 10000 and growing)
and the rules is like
var1 = 'x' and var2 = 'y' set x=1
var2 = 'e' and var5 = 'f' add 'Ram' to list B
The rules can be added dynamically and at anytime(absolute necessity)
Currently we are using a rules engine which is coded by ourself where we
load rules and actions from memory every 15 minutes and execute the rules
engine. However if the rules grow like anything we may face problem in the
future
The use case1 can be implemented by the existing rules engine. But inserting
the rules in the database is a problem area in the current implementation
other than some standard cases like Use case2
I need suggestion on how to approach the problem and what rule engine to use
: -
1> Move everything to a new Rule Engine
2> Have use case 2 in the old rule engine and use case 1 in new Rule Engine
(Is it good ... )
3> Have everything in the old RuleEngine
So in case of a new Rule Engine what is recommended ??
Thanks and Regards,
NewBie in RuleEngine
--
View this message in context: http://drools.46999.n3.nabble.com/Need-Suggestion-about-what-rule-engine-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months