Re: [rules-users] Error When changing persistence from H2 to Oracle forTaskService
Hi Kris, This is the list of errors that I have when trying to persist the TaskService to Oracle. I applied mapping to them but if the column names and table names are fixed it would be great. Please can you notify me once the changes are applied so that I can run a test on them. -- size column name -- create table Attachment (id number(19,0) not null, name varchar2(255), accessType number(10,0), contentType varchar2(255), attachedAt date, size number(10,0) not null, attachmentContentId number(19,0) not null, attachedBy_id varchar2(255), TaskData_Attachments_Id number(19,0), primary key (id)) -- table name reserved in oracle -- create table Comment (id number(19,0) not null, text clob, addedAt date, addedBy_id varchar2(255), TaskData_Comments_Id number(19,0), primary key (id)) -- date column name problem -- create table Deadline (id number(19,0) not null, date date, escalated number(1,0) not null, Deadlines_EndDeadLine_Id number(19,0), Deadlines_StartDeadLine_Id number(19,0), primary key (id)) -- date problem -- name is long -- create table Notification_BusinessAdministrators (task_id number(19,0) not null, entity_id varchar2(255) not null) create table Notification_EmailNotificationHeader (Notification_id number(19,0) not null, emailHeaders_id number(19,0) not null, mapkey varchar2(255), primary key (Notification_id, mapkey), unique (emailHeaders_id)) create table PeopleAssignments_BusinessAdministrators (task_id number(19,0) not null, entity_id varchar2(255) not null) create table PeopleAssignments_ExcludedOwners (task_id number(19,0) not null, entity_id varchar2(255) not null) create table PeopleAssignments_PotentialOwners (task_id number(19,0) not null, entity_id varchar2(255) not null) create table PeopleAssignments_TaskStakeholders (task_id number(19,0) not null, entity_id varchar2(255) not null) Regards, Ram ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools vs OPSJ
Date: Thu, 8 Apr 2010 08:56:35 -0700 From: greg_bar...@yahoo.com To: rules-users@lists.jboss.org Subject: Re: [rules-users] Drools vs OPSJ What version of drools did you use? Drools 5.0.1. Did you use a version with the true modify feature? I feel sorry but I do not understand your question. I did not make any particular tuning. --- On Thu, 4/8/10, Bertrand Grottier b_grott...@hotmail.com wrote: From: Bertrand Grottier b_grott...@hotmail.com Subject: [rules-users] Drools vs OPSJ To: rules-users@lists.jboss.org Date: Thursday, April 8, 2010, 2:08 AM Hello, At the present time, I am evaluating Drools vs OPSJ. Before I started, I had a look at the following tests: http://blogs.illation.com.au/2009/09/waltz-benchmark-performance-opsj-vs-drools/. Based on these tests, I was expecting better performances from OPSJ over Drools regarding the rule firing time. However, I obtained opposite results on a basic test. It consists in a sort of join clause: I have a few products and many potentiel prices (10^4) in the knowledge session. The aim is to match the appropriate prices to each products. My question are the followings: - Does someone obtained similar results ? - Are there situations where Drools outperforms OPSJ ? (apparently yes). Thank you in advance. Regards, Benoît Commander un cadeau en ligne discrètement? Voir la solution offerte par Internet Explorer8 -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users _ Hotmail arrive sur votre téléphone ! Compatible Iphone, Windows Phone, Blackberry, … http://www.messengersurvotremobile.com/?d=Hotmail___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools vs OPSJ
He means the latest of the latest version, released last week or so. Not the one you're using, apparently. 2010/4/9 Bertrand Grottier b_grott...@hotmail.com -- Date: Thu, 8 Apr 2010 08:56:35 -0700 From: greg_bar...@yahoo.com To: rules-users@lists.jboss.org Subject: Re: [rules-users] Drools vs OPSJ What version of drools did you use? Drools 5.0.1. Did you use a version with the true modify feature? I feel sorry but I do not understand your question. I did not make any particular tuning. --- On *Thu, 4/8/10, Bertrand Grottier b_grott...@hotmail.com* wrote: From: Bertrand Grottier b_grott...@hotmail.com Subject: [rules-users] Drools vs OPSJ To: rules-users@lists.jboss.org Date: Thursday, April 8, 2010, 2:08 AM Hello, At the present time, I am evaluating Drools vs OPSJ. Before I started, I had a look at the following tests: http://blogs.illation.com.au/2009/09/waltz-benchmark-performance-opsj-vs-drools/. Based on these tests, I was expecting better performances from OPSJ over Drools regarding the rule firing time. However, I obtained opposite results on a basic test. It consists in a sort of join clause: I have a few products and many potentiel prices (10^4) in the knowledge session. The aim is to match the appropriate prices to each products. My question are the followings: - Does someone obtained similar results ? - Are there situations where Drools outperforms OPSJ ? (apparently yes). Thank you in advance. Regards, Benoît -- Commander un cadeau en ligne discrètement? Voir la solution offerte par Internet Explorer8 http://clk.atdmt.com/FRM/go/207186971/direct/01/ -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.orghttp:///mc/compose?to=rules-us...@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Acheter en ligne en toute sécurité ? Internet Explorer 8 vous protège gratuitement ! http://clk.atdmt.com/FRM/go/206608211/direct/01/ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- To understand what is recursion you must first understand recursion ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] DROOLS Flow as a Manufacturing process execution engine - Noob questions about events and concurrency
Salaboy, I put up a new simple diagram with red markers to show what I mean: http://i349.photobucket.com/albums/q388/shooter_za/loop.jpg http://n3.nabble.com/file/n707815/loop.jpg 1. Regarding concurrency. What I mean is that after I use an AND split node, the flows going out from it will execute on their own paths at the same time? I assume that DROOLS Flow achieves this in the engine with multiple threads (in the background of the engine that we don't see)? 2. Regarding control loops. I mean here that according to the way I set up the flow that a loop will be constructed in the logic with certain flows executing multiple times. The motivation for this is that in manufacturing more than one product is assembled in a run, and this is where the loops in logic come from. I don't think I need a dedicated for each construct, but I may be wrong. If you look at my DROOLS flow image, you'll see that I've modeled three such loops into my flow and outlined one in the diagram above. The compiler validates my flow as legal, I'm wondering if this is really allowed in DROOLS. 3. Regarding the Events. In the diagram you can see I outlined an example of two Events that are attached to an AND Join node. As I understand it, all flows going into the AND Join node should be completed before it can continue. Two of my flows here are Events. So in this example I want the one normal flow to enter the AND Join node and at some later time when both Events have fired I need the outgoing flow to continue. When I run the process, it does not wait until the two Event nodes have fired, it just executes until the AND Join node is encountered and the overall process exists. Jean jeanjvr wrote: I attach a PNG image (http://i349.photobucket.com/albums/q388/shooter_za/jvr_test_flow.png) and a trimmed log of my flow just for interest sake at the end. My test Java app starts the flow in a new thread and allows me to trigger events in the flow with buttons (processInstance.signalEvent(String type, Object data)). If I use Drools in my project, the events would be generated by factory devices through an industrial protocol called OPC. Some noob questions: 1. I need concurrent execution in my flow. I use Split nodes to do this. Is this the correct way to achieve concurrency? 2. I need to construct control loops. Pieces of the flow that execute over and over until a constraint directs flow to an End node. I see no reason why loops cannot be done in DROOLS flow. 3. My biggest problem at this time is that my flow executes, but ignores Event nodes connected to AND Join nodes. The work-flow then ends and my thread exits, although the End nodes in question are not reached according to the log. I suppose the engine determines that no terminating End node can be reached and stops. I think that I maybe have an incorrect understanding of some aspect of the DROOLS work-flow engine. The core idea is to let one or more flows reach an AND Join node - and then wait until all Event nodes attached to the AND Join node is triggered, allowing the flow to continue. Other problems I will not list here now, as I believe I may be able to figure them out (variables, constraints). I just want to prove that Flow can be used. -- View this message in context: http://n3.nabble.com/DROOLS-Flow-as-a-Manufacturing-process-execution-engine-Noob-questions-about-events-and-concurrency-tp706102p707815.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do operator such as is one of (xx, yy, zz) in a decision tablee
The easiest way to do this is to use regular expressions with matches Eg state matches AZ|CA|NV if you don't care about the case then use (?i)AZ|CA|NV You can find details of regex here http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html There are also the in and memberof keywords which can do similar operations but regex are probably easier. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of vadlam Sent: 08 April 2010 18:16 To: rules-users@lists.jboss.org Subject: [rules-users] How to do operator such as is one of (xx, yy, zz) in a decision tablee Hi, we are trying to do something like this in a decision table we need to be able to create a condition like the below in a decision table condition column. Perhaps one way this can be done is for user to be able to select mutiple states from a dropdown list of states and then apply the operator is one of on those selections. State is one of {AZ,CA,NV} Please let me know if this can be done . Thank you all in advance. -- View this message in context: http://n3.nabble.com/How-to-do-operator-such-as- is-one-of-xx-yy-zz-in-a-decision-tablee-tp706475p706475.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. An NDS Group Limited company. www.nds.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Tuples in Agenda Item.
DroolsWorkingMemory is our custom class which contains asserted facts and other custom objects based on our project requirement. It should not be confused with WorkingMemory of Drools. For issue 1, I assume that if I overwrite one field in ConcreteType1 to a different value than that in BaseType, they are treated as diferrent objects. Consider the xml snapshot of the two objects for eg: *BaseType* object: com.parentchild.BaseType Booleanfalse/Boolean Date2010-04-09T00:00:00/Date Stringa/String Double0.0/Double /com.parentchild.BaseType *ConcreteType1* object: com.parentchild.ConcreteType1 Booleanfalse/Boolean Date2010-04-09T00:00:00/Date Stringb/String Double0.0/Double ConcreteType1Booleanfalse/ConcreteType1Boolean /com.parentchild.ConcreteType1 so I assume I have two objects BaseType(with value of String as a) and ConcreteType1 object (with value of String as b). The rule should evaluate to false on the above assumption. For issue 2, Sorry If i have misled, my only question was why does the Tuple inside Agenda Item show only ConcreteType1 and not the BaseType, If both of them are inserted in WorkingMemory. Doesn't the tuple contain all the objects inserted in WM. Regards, Rajnikant Gupta 2010/4/9 Wolfgang Laun wolfgang.l...@gmail.com Regarding Issue 1: Even if you do have different objects of ConcreteType1, the rule is fired for each of them, since each of these is equal to itself in terms of the BaseType. I also fail to understand Issue 2. But perhaps your misconception about base type and subtype matching is also responsible for that. Rule s looks strange for more than one reason. What is the DroolsWorkingMemory() pattern supposed to achieve? Is it a general trigger so that the rule only fires if one such object is present? Leaving base and extended types aside, testing for the equality of two objects of the same type must be done much more carefully. Assuming three objects of TypeX, x1, x2, x3 with x1.equals(x2) and NOT x1.equals(x3) and a rule like this: rule xxx when o1 : TypeX() o2 : TypeX() eval( o1.equals( o2 ) ) then ... This rule will fire 5 times, with the following activations: x1,x1, x2,x2, x3,x3, x1,x2, x2,x1. Using, e.g., o2:TypeX( this != o1 ) reduces this to two firings. -W 2010/4/9 Rajnikant Gupta capricorn@gmail.com Hi, ** Sorry for not being very clear. Here's the rule which I run: ** ** *package rr* *import com.thirdpillar.common.util.DroolsWorkingMemoryimport com.parentchild.BaseType* *import com.parentchild.ConcreteType1 * ** *rule s* *no-loop true * *salience 99 * ** *when* *DroolsWorkingMemory:DroolsWorkingMemory()* *BaseType:BaseType()* *ConcreteType1:ConcreteType1()* *eval (* *(* *((BaseType.equals(ConcreteType1)))* *)* *)* *then* *BaseType.setString(Blah Blah!);* *end * where *ConcreteType1 *extends *BaseType. * ** *Issues:* 1. Even for different values for fields in *ConcreteType1* and *BaseType, *the rule gets fired. 2. I also do audit for the rules for which i need tuples so that I can extract the objects out of it and evaluate the expression against Mvel. But the tuple shows me only the *ConcreteType1* instance not the *BaseType. *Thus getting wrong audit. Regards, Rajnikant Gupta Sr. Software Engineer GlobalLogic,Noida 09899530562 http://rkthinks.wordpress.com/ 2010/4/9 Greg Barton greg_bar...@yahoo.com We need some rule code to get a better idea of what's going on. Can you post some? --- On *Thu, 4/8/10, Rajnikant Gupta capricorn@gmail.com* wrote: From: Rajnikant Gupta capricorn@gmail.com Subject: [rules-users] Tuples in Agenda Item. To: rules-users@lists.jboss.org Date: Thursday, April 8, 2010, 1:36 PM Hi, I have a doubt regarding tuples. I created a rule using complex types objects. I am comparing two complex type objecs which have parent-child relationship eg. ParentType.equals(ChildType). I expect this to follow java rule which allows such comparision. Now when I run the rules with different values for fields in ParentType and ChildType (which means the rule should fail) to my surprise it evals to TRUE. Also upon inspection, the tuple shows me only the ChildType instance not the ParentType. I would appreciate any help on this. Regards, Rajnikant -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.orghttp://mc/compose?to=rules-us...@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users
Re: [rules-users] Tuples in Agenda Item.
Presumably ConcreteType1 extends BaseType. In this case the rule will evaluate true as ConcreateType1 IS A BaseType and therefore the same object matches both the o1 condition and the o2 conditions. This is why the tuple contains only 1 entry as there was only one unique object matched (o1 == o2). Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Rajnikant Gupta Sent: 09 April 2010 10:01 To: Rules Users List Subject: Re: [rules-users] Tuples in Agenda Item. DroolsWorkingMemory is our custom class which contains asserted facts and other custom objects based on our project requirement. It should not be confused with WorkingMemory of Drools. For issue 1, I assume that if I overwrite one field in ConcreteType1 to a different value than that in BaseType, they are treated as diferrent objects. Consider the xml snapshot of the two objects for eg: BaseType object: com.parentchild.BaseType Booleanfalse/Boolean Date2010-04-09T00:00:00/Date Stringa/String Double0.0/Double /com.parentchild.BaseType ConcreteType1 object: com.parentchild.ConcreteType1 Booleanfalse/Boolean Date2010-04-09T00:00:00/Date Stringb/String Double0.0/Double ConcreteType1Booleanfalse/ConcreteType1Boolean /com.parentchild.ConcreteType1 so I assume I have two objects BaseType(with value of String as a) and ConcreteType1 object (with value of String as b). The rule should evaluate to false on the above assumption. For issue 2, Sorry If i have misled, my only question was why does the Tuple inside Agenda Item show only ConcreteType1 and not the BaseType, If both of them are inserted in WorkingMemory. Doesn't the tuple contain all the objects inserted in WM. Regards, Rajnikant Gupta 2010/4/9 Wolfgang Laun wolfgang.l...@gmail.commailto:wolfgang.l...@gmail.com Regarding Issue 1: Even if you do have different objects of ConcreteType1, the rule is fired for each of them, since each of these is equal to itself in terms of the BaseType. I also fail to understand Issue 2. But perhaps your misconception about base type and subtype matching is also responsible for that. Rule s looks strange for more than one reason. What is the DroolsWorkingMemory() pattern supposed to achieve? Is it a general trigger so that the rule only fires if one such object is present? Leaving base and extended types aside, testing for the equality of two objects of the same type must be done much more carefully. Assuming three objects of TypeX, x1, x2, x3 with x1.equals(x2) and NOT x1.equals(x3) and a rule like this: rule xxx when o1 : TypeX() o2 : TypeX() eval( o1.equals( o2 ) ) then ... This rule will fire 5 times, with the following activations: x1,x1, x2,x2, x3,x3, x1,x2, x2,x1. Using, e.g., o2:TypeX( this != o1 ) reduces this to two firings. -W 2010/4/9 Rajnikant Gupta capricorn@gmail.commailto:capricorn@gmail.com Hi, Sorry for not being very clear. Here's the rule which I run: package rr import com.thirdpillar.common.util.DroolsWorkingMemoryimport com.parentchild.BaseType import com.parentchild.ConcreteType1 rule s no-loop true salience 99 when DroolsWorkingMemory:DroolsWorkingMemory() BaseType:BaseType() ConcreteType1:ConcreteType1() eval ( ( ((BaseType.equals(ConcreteType1))) ) ) then BaseType.setString(Blah Blah!); end where ConcreteType1 extends BaseType. Issues: 1. Even for different values for fields in ConcreteType1 and BaseType, the rule gets fired. 2. I also do audit for the rules for which i need tuples so that I can extract the objects out of it and evaluate the expression against Mvel. But the tuple shows me only the ConcreteType1 instance not the BaseType. Thus getting wrong audit. Regards, Rajnikant Gupta Sr. Software Engineer GlobalLogic,Noida 09899530562 http://rkthinks.wordpress.com/ 2010/4/9 Greg Barton greg_bar...@yahoo.commailto:greg_bar...@yahoo.com We need some rule code to get a better idea of what's going on. Can you post some? --- On Thu, 4/8/10, Rajnikant Gupta capricorn@gmail.commailto:capricorn@gmail.com wrote: From: Rajnikant Gupta capricorn@gmail.commailto:capricorn@gmail.com Subject: [rules-users] Tuples in Agenda Item. To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org Date: Thursday, April 8, 2010, 1:36 PM Hi, I have a doubt regarding tuples. I created a rule using complex types objects. I am comparing two complex type objecs which have parent-child relationship eg. ParentType.equals(ChildType). I expect this to follow java rule which allows such comparision. Now when I run the rules with different values for fields in ParentType and ChildType (which means the rule should fail) to my surprise it evals to TRUE. Also upon inspection, the tuple shows me only the ChildType instance not the ParentType. I would appreciate any help on this. Regards, Rajnikant -Inline Attachment Follows-
[rules-users] Double Handling
Hi, I am new to Drools. I am having a problem comparing 2 double values. I have a Java class with a double attribute called loanToValue. The loanToValue is been read from an XML file and the value is 92000.0. Based on this value I do not expect this rule to be fired, but for some reason it does. And the print statement returns 92000.0. Does anyone know what I'm doing wrong? My rule looks as follows: rule G2 Equity in Asset ruleflow-group goods dialect mvel when $d : IndividualDecision() Individual(eval($d.getLoanToValue() 85)) then System.out.println(loanToValue: + ($d.getLoanToValue())); end Thanks, Ade Adeyinka Timi | Technical Supprt | Nathean Technologies Ltd Registered Office 3 Lyncon Court, IDA Science Technology Park, Snugborough Road, Blanchardstown, Dublin 15, Ireland T +353 1 685 3001 | VOIP 076 615 1117 | E adeyinka.t...@nathean.com | http://www.nathean.com/ http://www.nathean.com www.nathean.com Incorporated in Ireland, No. 339972 The information appearing in this email and any files transmitted with it is confidential and may not be reproduced, modified, distributed, transmitted, displayed, published or broadcast without the prior written permission of Nathean Technologies Ltd. It is intended solely for the use of the addressee(s). Nathean Technologies Ltd, its directors, officers and employees do not accept liability for any loss or damage of any nature howsoever arising pertaining to the use of information appearing in this email and/or any files transmitted with it. Whilst this email has been checked for the presence of computer viruses, Nathean Technologies Ltd does not, except as required by law, represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, viruses, interception or interference. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Resuming the Flow: SESSION_ID, PROCESS_INSTANCE_ID, WORKITEM_ID
@Kris, good to see that you take a lot of time to answer in a comprehensive way Anatoly's questions. I never have time to sit down and write such a cool mail during or after 10 hours work. I'm still don't agree with him, that is our responsibility to include more high level cleaner APIs inside the framework, as you said before this kind of things really varies from one implementation from the other. As far as I saw in all the implementations that I worked for, they all want to have a layer (thin or not) to abstract the framework APIs, and that exactly where all those mappings, and looping using Flow APIs. Talking about ENTITIES and DOMAIN objects, probably we are mixing things here. A Human Task or something similar will be related with the Process and how we can express them, so having a work item ID information as part of the framework or another module information is still good for me. I've seen it in my implementations and it never look as a problem. By the way, if you store variables, the only thing that you will get out-of-the-box is loading that variables back, but you still need to look for them, or hardcode a special variable name. As far as repeating questions, Mark post a funny link with the mailing list rules :) On Fri, Apr 9, 2010 at 1:06 AM, tolitius webaka...@gmail.com wrote: @Kris, This is probably the most comprehensive and useful answer I ever got on forums, thank you very much! 1. I am definitely willing to contribute at any level I can [depending, of course, on my own skill set, time and interest in a certain area]. 2. Very interesting point about a shared session. I somehow automatically assumed that a StateFull session should probably not share it's state with multiple processes. So, I take it, we can have a single(ton?) stateful session to execute multiple processes without any issues? [I guess that is due to the fact that processes are different threads + the persistence is actually per process, and not per session?] 3. Since what we are working on is a very thin framework layer ( to allow functional developers not too worry about Drools Flow specifics + some high level business-friendly API + ... ), the solution with IDs ( session, processInstance, workItem ) should be hidden from them, hence what I've been thinking about is some kind of AbstractWaitingWorkItemHandler that will be responsible for persisting these three IDs before the actual child implementation executeWorkitem() is called. Persistence here may be approached as explicitly (DAO) creating a WORK_ITEM_ID | SESSION_ID | PROCESS_INSTANCE_ID | BUSINESS_ID record, OR (which seems a bit more automatic) Setting these variables as (I guess process instance) flow variables, and have Drools Flow Variable Persistence mechanism kick in, and persist them without any explicit / other manual crafted help. Let me know what you think about the later one, as I understand you discussed the first approach as an acceptable as well. 4. As to other approaches you suggested: 4.a Storing a Business ID (task) as a resulting parameter of the work item. I am not sure I fully understand the idea.. The only thing that I am thinking it is going to only solve the work item ID lookup problem, but there are also session and process instance IDs. Although it is definitely a good solution to have an option where framework would link work items to the associated business IDs outside of the box. 4.b Having processInstance.findAllWaitingWorkItems(). I still think this is a nice one to have: no nodes iterations, no worries about whether it is a subflow, main flow, etc.. + the process instance ID is something I would already have, if there is a mechanism to store/retrieve all the needed IDs once the session is reloaded. But again, if the point 3 is resolved, no need for 4.b ( at least for now :) ) 5. As to documentation... Once I figure this problem out, I can definitely contribute back to documentation. I understand that high-level Drools Flow documentation must not be the nice thing to hear (especially after a very hard work you did to create it). Let me tell you that thanks to the existing documentation, I was able to quickly realize / recognize the true potential of Drools Flow, and a clear superiority to something as e.g. jBPM. And that is what allowed me to convince people to use the product. However... :) Once I started to actually implement the business requirements, that is where I had to look back to source code in order to figure out how to: signal events, reload a JPA session and continue, relationship between session, workitems, process instance, spring integration, exception handling, dynamic sub-process dispatch (thanks to your answer), configuring GWT console, BAM, ..., DbLogger configuration, true
[rules-users] change-set (with BRMS/network not available)
Hi everyone, I have a rather simple question, however I couldn't find any answers/examples on the web. Drools 4 allowed you to set the property localCacheDir to make sure that the runtime can startup and load packages even if the BRMS/network is not available. How can I define such a local cache with Drools 5? My approach: I downloaded the package and stored it as some_path/myPackage.pkg. My change-set.xml looks as follows: change-set xmlns='http://drools.org/drools-5.0/change-set' xmlns:xs='http://www.w3.org/2001/XMLSchema-instance' xs:schemaLocation='http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd' add resource source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST' type='PKG' / resource source='file:some_path/myPackage.pkg' type='PKG' / /add /change-set But with the BRMS not running, I always get an exception. So I guess this is the wrong approach having both resources in the change-set.xml? How can I make Drools ignore the http source (in case of the BRMS not being available) and take the local file resource instead? Thank you in advance! -- View this message in context: http://n3.nabble.com/change-set-with-BRMS-network-not-available-tp708334p708334.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do operator such as is one of (xx, yy, zz) in a decision tablee
while using the regular expression in a predicate is our last option, we would like to do it through a dropdown list in a Decision Table column if possible. I am trying something like this. when creating condition column, if I choose literal type and choose a filed type such as amount , one of the operators is is contained in the a (comma) List .This translates to the in operator eventually. By making the ListBox as multiselect through the constructor, I am able to do a multi select in the List, but after I click the Ok button, it still populates the last selected value in the dropdown.It looks like the Record r can take only 1 value. Button ok = new Button( constants.OK() ); ok.addClickListener( new ClickListener() { public void onClick(Widget wg) { for ( int i=0 ;idrop.getItemCount();i++){ if(drop.isItemSelected(i)){ r.set( dataIdx, drop.getValue( i) ); } } w.destroy(); } -- View this message in context: http://n3.nabble.com/How-to-do-operator-such-as-is-one-of-xx-yy-zz-in-a-decision-tablee-tp706475p708530.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do operator such as is one of (xx, yy, zz) in a decision tablee
I got it to work by appending the values and then setting the record to appended string r=value1+,+value2+,+value3 -- View this message in context: http://n3.nabble.com/How-to-do-operator-such-as-is-one-of-xx-yy-zz-in-a-decision-tablee-tp706475p708602.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do Exception Handling???
tolitius wrote: would be cool to address real Java Exceptions (no matter what the approach is) in Exception Handling section of the documentation +1 -- View this message in context: http://n3.nabble.com/How-to-do-Exception-Handling-tp689387p708627.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools version(s) commercially supported by JBoss
I just attended a presentation by JBoss last week on JBoss BRMS. It was stated that by the presenter, Arun Manchanda, that Expert, Guvnor, Flow, and Fusion are all supported in BRMS. Some features of each are not available. -- View this message in context: http://n3.nabble.com/Drools-version-s-commercially-supported-by-JBoss-tp691677p708705.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools version(s) commercially supported by JBoss
Guvnor can be seen as a BRMS or just as a KnowledgeRepository. If you refer to them as KnowledgeRepository you can store, rules, rules with temporal constraints and also flows. But I agree with you, we are trying to improve Guvnor as a BRMS to support more and more features! On Fri, Apr 9, 2010 at 12:32 PM, paulB paul.bor...@sironahealth.com wrote: I just attended a presentation by JBoss last week on JBoss BRMS. It was stated that by the presenter, Arun Manchanda, that Expert, Guvnor, Flow, and Fusion are all supported in BRMS. Some features of each are not available. -- View this message in context: http://n3.nabble.com/Drools-version-s-commercially-supported-by-JBoss-tp691677p708705.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Facts or rules ?
It matters on the nature of the processing. Rules are useful when the algorithm involves iterative change, i.e. a rule fires, changing the data, which cause another rule to fire, changing the dataetc until a resting state has been reached. They're also useful if you want to handle odd cases, or global constraints, especially if these can directly affect the data driven processing. This is what I was talking about when I said you can do both below. Let's say your data driven approach involves generating the pricing rules from the data. (Instead of having generalized rules that act on inserted objects.) Using this approach you (or the business folk) could then define other rules that execute alongside the generated ones for both conditions that don't follow the pattern of the generated rules, and global conditions that affect all price calculation. This is like mixing decision tables and hand written rules together, a rather common practice. That make sense? Including a BRMS is warranted when 1) there's going to be change, and 2) funky processing is anticipated. In my experience both cases are frequent. The marketing folks always come by and say, can your system handle this promotion we want to do? :) --- On Fri, 4/9/10, Bertrand Grottier b_grott...@hotmail.com wrote: From: Bertrand Grottier b_grott...@hotmail.com Subject: Re: [rules-users] Facts or rules ? To: rules-users@lists.jboss.org Date: Friday, April 9, 2010, 10:29 AM Hello I am coming back to this post with new a piece of information regarding the number of rules: this latter may attain 5 * 10^5... This figure confirms the a data driven approach. However, if I represent business rules using facts, is there really an added value in using a brms ? (compared to a hard-coded component). Thank you in advance for yours answers. Regards, Benoît Date: Wed, 7 Apr 2010 07:44:09 -0700 From: greg_bar...@yahoo.com To: rules-users@lists.jboss.org Subject: Re: [rules-users] Facts or rules ? The answer to whether this is a good approach is, It depends. :) Does the 10^4 and 10^5 figure mean there could be that many rules? If so, definitely do the data driven approach. If not, will business folk (i.e. non technical) will be writing pricing rules? If so, do the rules based approach as data driven rules are generally less understandable by business types. (They're a bit more abstract and influenced by the structure of your data model. Business people should not have to deal with either abstraction or the implementation details of a data model.) There's no reason why you can't do both, though. --- On Wed, 4/7/10, Bertrand Grottier b_grott...@hotmail.com wrote: From: Bertrand Grottier b_grott...@hotmail.com Subject: [rules-users] Facts or rules ? To: rules-users@lists.jboss.org Date: Wednesday, April 7, 2010, 9:23 AM #yiv69327948 .ExternalClass #ecxyiv1286396095 .ecxhmmessage P {padding:0px;} #yiv69327948 .ExternalClass #ecxyiv1286396095 .ecxhmmessage {font-size:10pt;font-family:Verdana;} Hello, I am a newbie with business rules systems. I would like to implement a component that compute the price of products. There can be a great number of potential prices (maybe 10^4 or 10^5). My first idea was to create template rules, feeded by a database. In other words, the information about prices would be contained in the rules. Eventually, I decided to create Prices objects, that are also inserted in the Knowledge session (Prices become facts). The rule engine just matches the appropriate price object with each product (there are other rules then to compute the final price). Price { _productId ; _beginDate ; _endDate ; _price ; } Product { _id ; _date ; ... _ } Are my explanations clear enough ? Is this a good approach or is it stupid ? Why ? What are the good practices ? Thank you in advance for your help. Benoît Envie de naviguer sur Internet sans laisser de trace? La solution avec Internet Explorer 8 -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Hotmail débarque sur votre téléphone ! Paramétrez Hotmail sur votre téléphone! Gratuit ! -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] 5.1 JavaDoc
Greetings, I'm working through some issues with flow, and I want to have a look at the (complete) doc, including the impl classes. Is this hosted/available anywhere? I tried to build it from source, and I'm not getting anywhere. Thanks, Dave -- View this message in context: http://n3.nabble.com/5-1-JavaDoc-tp708822p708822.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do Exception Handling???
salaboy wrote: Ed, feel free to contribute with documentation about how you implement your own mechanisms to handle exceptions. I'm a newbie, I've never written a WorkItemHandler, I've just read the doc and tried to understand. I came away from the Exceptions section of the doc with no idea of whether or how it related to Java Exceptions, and they're not covered elsewhere. All I'm looking for (for now) is to simply throw into the docs (maybe in 8.2.4. Executing work items) what Kris said here, which I think boils down to: WorkItemHandlers should not throw exceptions of any kind. If an exception is to be handled at the business process level, convert it into a Fault. The WorkItemHandler should also provide whatever other handling (logging, etc.) is desired. I'd also suggest renaming section 3.8 from Exceptions to Faults, and talk about Fault Handlers, not Exception Handlers. It might make sense to provide an AbstractWorkItemHandler which wraps executeWorkItem() with sensible default behavior of some kind. But this is less important, IMHO. I agree that the mapping from Java exception to business-process semantics is fundamentally the responsibility of the WorkItemHandler. The framework can help, and can make clear that the responsibility exists -that's all. -Ed -- View this message in context: http://n3.nabble.com/How-to-do-Exception-Handling-tp689387p708851.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor Testing Scenarios and Enums Instantiations
blinton wrote: Hello, Using the following imported enum: public enum Status { INCOMPLETE, COMPLETE } And the following rule: when status : Status(this == Status.COMPLETE) then // ... We're attempting to write a guvnor test scenario for this rule. But we can't seem to figure out the syntax for instantiating the given status object. Could someone point us in the correct direction? Many thanks. Hi, you don't need to instantiate Java enum values. In fact, the java syntax simply does not support it, because the enum values specified in the enum declaration are the only allowed instances of the enum class generated by the compiler behind the scenes. How to use them with drools? Just insert one of the enum values into your working memory, like so: workingMemory.insert(Status.INCOMPLETE); This of course also works with variable status values, e. g.: private void insertStatus(Status actualStatus) { workingMemory.insert(actualStatus); } Best regards Ansgar ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] RulesFlow - DroolsFlow - Parallelism - Split Nodes - Help
Greetings for all, We're learning about jboss rules ( drools ), in particular, drools flow by the workflow topic. In the documentation, the parallelism is solved by means of split node of type 1 (AND). However, when we execute the testing ,the execution is sequential. In particular, the idea is that our workflow executes two subflows in parallel. For this target we configured a split node with type 'AND' and a join node with type 'AND', no more configuration, Is it required another configurations? Is it problem of standalone applications? We don't know. This is the case: 0. Drools: Created-By: Apache Maven Built-By: trikkola Build-Jdk: 1.5.0_15 Specification-Title: Drools :: API Specification-Version: 5.0.1 Specification-Vendor: JBoss Inc. Implementation-Title: Drools :: API Implementation-Version: 5.0.1 Implementation-Vendor-Id: org.drools Implementation-Vendor: JBoss Inc. 1. ProcessXML: *?xml version=1.0 encoding=UTF-8? * *process xmlns=http://drools.org/drools-5.0/process* * xmlns:xs=http://www.w3.org/2001/XMLSchema-instance* * xs:schemaLocation=http://drools.org/drools-5.0/processdrools-processes-5.0.xsd; * * type=RuleFlow name=PriDigitalTest id=com.epmbog.esb.drools.mediator.PriDigitalTest package-name=com.epmbog.esb.drools.mediator * * * * header* *variables* * variable name=factsMap * *type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=java.util.HashMap /* * /variable* * variable name=resultsMap * *type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=java.util.HashMap /* * /variable* */variables* * /header* * * * nodes* ** *start id=1 name=Start x=126 y=16 width=48 height=48 /* ** *split id=19 name=AND x=109 y=95 width=80 height=40 type=1 /* ** *subProcess id=17 name=UMGSubFlow x=16 y=168 width=119 height=49 processId=com.epmbog.esb.drools.mediator.UMGFlow waitForCompletion=false independent=false * * mapping type=in from=resultsMap to=resultsMap /* * mapping type=in from=factsMap to=factsMap /* */subProcess* ** *subProcess id=18 name=SoftSwitchSubFlow x=167 y=168 width=119 height=49 processId=com.epmbog.esb.drools.mediator.SoftSwitchFlow waitForCompletion=false independent=false * * mapping type=in from=resultsMap to=resultsMap /* * mapping type=in from=factsMap to=factsMap /* */subProcess* ** *join id=20 name=Join(And) x=110 y=251 width=80 height=40 type=1 /* ** *end id=6 name=End x=112 y=414 width=80 height=40 /* ** * /nodes* * * * connections* * * *connection from=1 to=19 /* ** *connection from=19 to=17 /* *connection from=19 to=18 /* * * *connection from=17 to=20 /* *connection from=18 to=20 /* ** *connection from=20 to=6 /* ** * /connections* * * */process* * * *2. Chart* * * [image: PriDigitalTest.JPG] We greatly appreciate your help, any suggestions? Thank you a lot PEDRO MARIA BUITRAGO MANTILLA Bogotá, Colombia PriDigitalTest.JPG___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] RulesFlow - DroolsFlow - Parallelism - Split Nodes - Help
When we define two parallel branches in a business process we represent a real situation where two task needs to be completed in parallel. We are not expressing something low level as Concurrent (multi threaded) programming. Does this explanation answer your question? 2010/4/9 Pedro Maria Buitrago Mantilla pmbt...@gmail.com Greetings for all, We're learning about jboss rules ( drools ), in particular, drools flow by the workflow topic. In the documentation, the parallelism is solved by means of split node of type 1 (AND). However, when we execute the testing ,the execution is sequential. In particular, the idea is that our workflow executes two subflows in parallel. For this target we configured a split node with type 'AND' and a join node with type 'AND', no more configuration, Is it required another configurations? Is it problem of standalone applications? We don't know. This is the case: 0. Drools: Created-By: Apache Maven Built-By: trikkola Build-Jdk: 1.5.0_15 Specification-Title: Drools :: API Specification-Version: 5.0.1 Specification-Vendor: JBoss Inc. Implementation-Title: Drools :: API Implementation-Version: 5.0.1 Implementation-Vendor-Id: org.drools Implementation-Vendor: JBoss Inc. 1. ProcessXML: *?xml version=1.0 encoding=UTF-8? * *process xmlns=http://drools.org/drools-5.0/process* * xmlns:xs=http://www.w3.org/2001/XMLSchema-instance* * xs:schemaLocation=http://drools.org/drools-5.0/processdrools-processes-5.0.xsd; * * type=RuleFlow name=PriDigitalTest id=com.epmbog.esb.drools.mediator.PriDigitalTest package-name=com.epmbog.esb.drools.mediator * * * * header* *variables* * variable name=factsMap * *type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=java.util.HashMap /* * /variable* * variable name=resultsMap * *type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=java.util.HashMap /* * /variable* */variables* * /header* * * * nodes* ** *start id=1 name=Start x=126 y=16 width=48 height=48 /* ** *split id=19 name=AND x=109 y=95 width=80 height=40 type=1 /* ** *subProcess id=17 name=UMGSubFlow x=16 y=168 width=119 height=49 processId=com.epmbog.esb.drools.mediator.UMGFlow waitForCompletion=false independent=false * * mapping type=in from=resultsMap to=resultsMap /* * mapping type=in from=factsMap to=factsMap /* */subProcess* ** *subProcess id=18 name=SoftSwitchSubFlow x=167 y=168 width=119 height=49 processId=com.epmbog.esb.drools.mediator.SoftSwitchFlow waitForCompletion=false independent=false * * mapping type=in from=resultsMap to=resultsMap /* * mapping type=in from=factsMap to=factsMap /* */subProcess* ** *join id=20 name=Join(And) x=110 y=251 width=80 height=40 type=1 /* ** *end id=6 name=End x=112 y=414 width=80 height=40 /* ** * /nodes* * * * connections* * * *connection from=1 to=19 /* ** *connection from=19 to=17 /* *connection from=19 to=18 /* * * *connection from=17 to=20 /* *connection from=18 to=20 /* ** *connection from=20 to=6 /* ** * /connections* * * */process* * * *2. Chart* * * [image: PriDigitalTest.JPG] We greatly appreciate your help, any suggestions? Thank you a lot PEDRO MARIA BUITRAGO MANTILLA Bogotá, Colombia ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - PriDigitalTest.JPG___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Logging using JSR94 StatelessRuleSession
On 09/04/2010 20:32, madchen wrote: So the reason we're using JSR94 is because we're trying to integrate Drools with Spring to load up all the drl files upon startup and to specify the list of drls in the application context config xml file. use a changeset.xml We have spring integration for this stuff coming in 5.1 Mark I'm not aware of a clean way to do that directly with Drools, but if you know of a way, please tell. Or if I'm stuck using JSR94, is there anything else I can do aside from switching platforms? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users