Re: [rules-users] traits - don more than 3 pojos, got IllegalArgumentException

2012-06-22 Thread Davide Sottara
The DRL you reported is working for me with both stateful and stateless.. it may indeed be the case that I have already fixed the issue as a part of another fix :) The PR should be confirmed in a few days -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-traits-don-mo

Re: [rules-users] traits - don more than 3 pojos, got IllegalArgumentException

2012-06-22 Thread Davide Sottara
I tried to repdroduce the issue, but I couldn't get the same error.. could you provide a test case? Also notice that I made some fixes in a pull request which has been out there for a while, waiting to get approved.. it may be the case that the fix is already contained in there Davide -- View this

Re: [rules-users] planner score calculation error...

2012-06-22 Thread Cedric Hurst
Offhand, it seems like the room needs to maintain a 'grid' of x and y tiles and which tables occupy each tile. That way you can plan while making sure that no two tables overlap. Sent from my iPhone On Jun 22, 2012, at 5:55 PM, Ricardo wrote: > > Hi when i use the following drl file for sco

[rules-users] planner score calculation error...

2012-06-22 Thread Ricardo
Hi when i use the following drl file for score calculation It assign a bigger table into the smaller room. help will be appreciated console output is as follows.. *Solved Organizer with 2 rooms and 3 tables: Table 1 -> Room 1 Table 2 -> Room 2 Table 3 -> Room 2* test data:

Re: [rules-users] Does Guvnor Support Traits?

2012-06-22 Thread Michael Anstis
Thanks Davide, your comments are much appreciated. sent on the move On 22 Jun 2012 22:52, "Davide Sottara" wrote: > "Experimental" means it has not been tested thoroughly yet, so it might be > subject to improvements and even some language changes. Also, it means that > the docs are really lack

Re: [rules-users] JBPM & ontology

2012-06-22 Thread Davide Sottara
Hi Olfa, sorry, I've been travelling in the last 3 weeks, I'll answer your emails shortly after. Now, for a general, public answer: "integrating business processes and ontologies" is a very broad question... Some possible interpretations include: 1) Using a BP ontology as a meta-model of BPs, so t

Re: [rules-users] Does Guvnor Support Traits?

2012-06-22 Thread Davide Sottara
"Experimental" means it has not been tested thoroughly yet, so it might be subject to improvements and even some language changes. Also, it means that the docs are really lacking! :) (shame on me!). I have never tried to use traits in guvnor yet, but my first impression is that you don't really ne

Re: [rules-users] Does Guvnor Support Traits?

2012-06-22 Thread Michael Anstis
Hi Benjamin, Your assumptions are correct - not so green after all :) Technical Rules are just plain text DRL, so whatever drools-expert supports is possible. TBH, I've not heard of anybody else using traits (or attempting to) in Guvnor, so any feedback would be great. AFAIK, "experimental" mea

Re: [rules-users] Does Guvnor Support Traits?

2012-06-22 Thread BenjaminWolfe
Sure. So if I did author rules in Guvnor using traits, I would (1) write a technical rule to declare the trait, (2) write a technical rule to don that trait given whatever LHS pattern, and (3) write another technical rule to make use of the trait in a useful way -- all of which I would do without

Re: [rules-users] drools planner ConstraintOccurrence

2012-06-22 Thread Ricardo
Hi thanks lot, for the last one week I am breaking my head to understand the drools planner. I have two questions... 1) When to use Unweighted constrains? 2) Is any way I can combine the following two rules in to one rule, I mean writing length and width in one rule condition instead of two. I tr

Re: [rules-users] drools planner ConstraintOccurrence

2012-06-22 Thread Geoffrey De Smet
Most use case use IntConstraintOccurence because they have an int hard score and an int soft score, for example in the cloud balancing example, ... The int is the weight. Take a look at the examples cloudBalancing, nqueens, ... and the manual chapter about score calculation. Op 22-06-12 20:18,

[rules-users] JBPM & ontology

2012-06-22 Thread Olfa h
Hi, How i can integrate ontology created with Protégé with JBPM ? can you give me an example thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Trouble wrapping my head around window.length(1)

2012-06-22 Thread Ladd
Thanks a lot for the reply W! I tried your suggested alternative and it worked as I need it to. - Ladd -- View this message in context: http://drools.46999.n3.nabble.com/Trouble-wrapping-my-head-around-window-length-1-tp4018171p4018186.html Sent from the Drools: User forum mailing list archive

Re: [rules-users] Trouble wrapping my head around window.length(1)

2012-06-22 Thread Wolfgang Laun
The first firing of "Faults coincide" is a bug. Rule "Faults don't coincide" doesn't do what I think you want it to do - "or" is inclusive, not exclusive. I'd recommend using this rule: rule "Detect" when f1 : MyEvent( key == "faultType1", value == "ALARM" ) not MyEvent( key == "faul

[rules-users] 2d contraints in the drools planner drl accumulate function

2012-06-22 Thread Ricardo
Is any one knows how to use 2d constraint(Object(String attr1, String attr2)) in the drools planner, planing entity to create drl file (may be in accumulate function). thanks, - with kind regards, -- View this message in context: http://drools.46999.n3.nabble.com/2d-contraints-in-the-drools

[rules-users] drools planner ConstraintOccurrence

2012-06-22 Thread Ricardo
Hi, I am learning drools planner, please explain to me about the ConstraintOccurrence (Int, Double,Long and Umweighted) object used in the then part of the drools planner drl file. My doubt is when to use this each type of this class and how it makes changes in the score calculations. note: Alread

Re: [rules-users] Setting unused globals on a session

2012-06-22 Thread Wolfgang Laun
Mind you, it's not in the "stable" API, but I suppose it still works with 5.4.0. It's one of the several thing I keep nagging about: that what you can program in DRL - which is considered to be stable - you should be able to retrieve via the stable API, at runtime. Preaching to deaf ears. :-\ -W

Re: [rules-users] Setting unused globals on a session

2012-06-22 Thread gqmulligan
I actually found this method by Wolfgang in an earlier post from over a year ago: KnowledgePackage kPackage = ...; KnowledgePackageImp kPackageImp = (KnowledgePackageImp)kPackage; org.drools.rule.Package package_ = kPackageImp.pkg; // globals: key is name, value is type name Map name2global = pac

Re: [rules-users] Does Guvnor Support Traits?

2012-06-22 Thread Michael Anstis
Guvnor only supports traits in "technical rules" (which are effectively free-format DRL, i.e. text). I think traits are still considered experimental at this stage (Sotty, Mark can you confirm?) so we'd be reluctant to introduce better UI support at this time. The need to add at some stage has be

Re: [rules-users] News functionalies on Drools verifier

2012-06-22 Thread Wolfgang Laun
On 22/06/2012, paco wrote: > Hi everybody > > Is it possible to add new functionalies on Drools verifier? > Yes. It only needs someone to do it. -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-u

Re: [rules-users] Accumulator being executed depending on the number of events

2012-06-22 Thread Wolfgang Laun
(Something strange is indeed going on which does result in differences between accumulate functions with and without reverse. But I see now that this is not what worries you. Sorry - but read on.) This particular condition: when $event: TestEvent( $key:key) $total : Number( ) f

[rules-users] Does Guvnor Support Traits?

2012-06-22 Thread BenjaminWolfe
I'm pretty new to developer forums. If my question is best asked in a different venue, feel free to point me there. And if it's vague (see the full version below), please ask clarifying questions. Thank you! I was just reading in the 5.4 docs about traits, donning the isA keyword... pretty exci

[rules-users] Error deploying drools-spring (5.4.0.Final) on ServiceMix 4.4.1

2012-06-22 Thread Nicholas Hemley
Hello, I have deployed drools-spring on ServiceMix 4.4.1 and suffer the following error: java.lang.NullPointerException at org.apache.felix.framework.resolver.ResolverImpl.toStringBlame(ResolverImpl.java:1521)[org.apache.felix.framework-3.0.9-fuse-07-03.jar:] at

Re: [rules-users] Setting unused globals on a session

2012-06-22 Thread gqmulligan
Vincent, I am looking at using your third option but when I call kSession.getGlobals() but there aren't any global variables set in there. I looked at the source to see what setGlobal was doing and that looks like it checks the Globals on the internal session which gets it from its internal rule

[rules-users] News functionalies on Drools verifier

2012-06-22 Thread paco
Hi everybody Is it possible to add new functionalies on Drools verifier? -- View this message in context: http://drools.46999.n3.nabble.com/News-functionalies-on-Drools-verifier-tp4018172.html Sent from the Drools: User forum mailing list archive at Nabble.com. _

[rules-users] Trouble wrapping my head around window.length(1)

2012-06-22 Thread Ladd
I'm new to Drools and have what I think should be a simple use case. But I'm getting some puzzling results from my tests. I have a simple class with just a key and value. What I want to detect is when the last occurrence with key "X" has a value of "ALARM" and the last occurrence with key "Y" ha

[rules-users] Detect conflit between rules with Drools Verifier

2012-06-22 Thread 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 sa

Re: [rules-users] Drools & JBPM Persistence

2012-06-22 Thread Mauricio Salatino
Drools and jBPM are being executed in the same thread, in your set up mina is not. Is that what are you pointing out? Did you really need to have mina in a separate JVM or you can use the Local Implementation? Cheers On Fri, Jun 22, 2012 at 10:00 AM, Alberto R. Galdo wrote: > > I see your point,

Re: [rules-users] Workitems doesn't get persisted when completing a task after rehydrating a knowledge session is some circumstances.

2012-06-22 Thread Mauricio Salatino
So, can you create an isolated test where you reproduce: "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" And I can ta

Re: [rules-users] Drools & JBPM Persistence

2012-06-22 Thread Alberto R. Galdo
I see your point, but IMHO that doesn't mean that in certain circumstances, when the process is being executed in a thread that it is no the same thread as the one in which drools is executing leads to a situation in which the persistence mechanisms are not enough to allow a fault tolerant JBPM for

Re: [rules-users] Workitems doesn't get persisted when completing a task after rehydrating a knowledge session is some circumstances.

2012-06-22 Thread Alberto R. Galdo
Sure, WorkItemHandlers are never persisted. I re-register those handlers before staring the session, just because I want my tasks to be properly executed. :( Alberto R. Galdo arga...@gmail.com On Fri, Jun 22, 2012 at 2:46 PM, Mauricio Salatino wrote: > There are two concepts here: > 1) WorkIt

Re: [rules-users] Drools & JBPM Persistence

2012-06-22 Thread Mauricio Salatino
I think that you are mixing things up. Did you take a look at the CommandBasedStatefulKnowledgeSession? Every command that represent an operation against the knowledge session is being executed inside a transaction, for both rules and processes. As soon as a safe point is found (for both processes

Re: [rules-users] Workitems doesn't get persisted when completing a task after rehydrating a knowledge session is some circumstances.

2012-06-22 Thread Mauricio Salatino
There are two concepts here: 1) WorkItem -> Persist the state of the activity 2) WorkItemHandlers -> Never Persisted Are you re-registering the WorkItemHandlers at rehydratation? WorkItemHandlers are part of the runtime status and don't get persisted. Cheers On Fri, Jun 22, 2012 at 9:39 AM, Alber

Re: [rules-users] Drools & JBPM Persistence

2012-06-22 Thread Alberto R. Galdo
No, I didn't. I need to be able to deploy the human task server and my knowledge session in separate JVM's. And Mina is on my way. The fact that I am able to do things in some other way doesn't make this very problem dissapear ... :(. In fact, this will never dissapear unless some communication me

Re: [rules-users] Workitems doesn't get persisted when completing a task after rehydrating a knowledge session is some circumstances.

2012-06-22 Thread Alberto R. Galdo
No, I'm not registering pending workitems at rehydration. That's why I'm using Drools & JBPM persistence ;-). I don't want to write my own state persistence, as I am a mere user of JBPM & Drools services. >> "They are never persisted" This several methods in org.drools.persitence.jpa.JPAPersisten

Re: [rules-users] Drools & JBPM Persistence

2012-06-22 Thread Mauricio Salatino
Both persistence mechanisms are already unified. the jBPM-persistence module extends the Drools one adding the relevant entities by the processes. You can be having problems with the Mina Server, did you try the local configuration? The Mina Server was designed to run in a different JVM than the s

Re: [rules-users] Workitems doesn't get persisted when completing a task after rehydrating a knowledge session is some circumstances.

2012-06-22 Thread Mauricio Salatino
"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" They are never persisted, they are runtime information that you must re-

[rules-users] Drools & JBPM Persistence

2012-06-22 Thread Alberto R. Galdo
Hi, I'm opening this thread in the aim of generating a debate about the approach to session persistence in Drools and JBPM for BPMN processes which by definition are able to generate asynchronous human tasks. IMHO the current approach needs to be refactored in favor of joining the managemen

Re: [rules-users] Accumulator being executed depending on the number of events

2012-06-22 Thread e...@yahoo.com
Hi Wolfgang, I couldn't agree more with your analysis unfortunately it seems that or i have something wrong with my rule or there is something wrong with the implementation? First off all the reserve was set to false this would mean that once the rule is finished the context shouldn't be availabl

[rules-users] Someone can help me by answering at this question?

2012-06-22 Thread paco
-- View this message in context: http://drools.46999.n3.nabble.com/Help-please-tp4018136p4018156.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/

Re: [rules-users] simple subtraction in drools 5.3 fires rules

2012-06-22 Thread oranoh
didn´t try that, but I think it´s better to use a version that is more robust. -- View this message in context: http://drools.46999.n3.nabble.com/simple-subtraction-in-drools-5-3-fires-rules-tp4018141p4018155.html Sent from the Drools: User forum mailing list archive at Nabble.com. _