[rules-users] Volcano update
http://blog.athico.com/2011/06/argentina-june-workshop-friday.html ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor unable to display ruleflow properly: Connections between nodes are not shown
also tried with 5.2.0.CR1 version but still the same, no go :( Did you also update the designer war? What version are you using? Could you provide us with your xml process file, so we can try to reproduce? Kris ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] build.xml cannot get drools-5.2.0.M2-eclipse-all.zip
Marcel, The installer should automatically download the following file: https://repository.jboss.org/nexus/content/repositories/releases/org/drools/org.drools.updatesite/5.2.0.M2/org.drools.updatesite-5.2.0.M2-assembly.zip (note that it renames the file it downloads to drools-5.2.0.M2-eclipse-all.zip). Could you check whether this file is available in your jbpm-installer/lib folder? If so, could you check whether you can open it manually successfully (if not, try deleting it and run the installer again)? Kris Marcel Caceres wrote: When install jbpm 5.1, fails when gets drools-5.2.0.M2-eclipse-all.zip, and i can`t find de source of this release. How can i solve to complete the command line: ant install.demo -- see the installation log [echo] Checking JBoss AS download ... download.jboss: install.jboss: [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\lib\jboss-5.1 .0.GA.zip into C:\Archivos de programa\Java\jbpm-installer download.drools.guvnor.check: [echo] Checking Drools Guvnor download ... download.drools.guvnor: install.guvnor.into.jboss: check.jboss.version: install.guvnor.into.jboss.5: [mkdir] Created dir: C:\Archivos de programa\Java\jbpm-installer\target\droo ls-guvnor [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\lib\drools-5. 2.0.M2-guvnor.war into C:\Archivos de programa\Java\jbpm-installer\target\drools -guvnor [zip] Building zip: C:\Archivos de programa\Java\jbpm-installer\target\dro ols-guvnor.war [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\deploy [delete] Deleting directory C:\Archivos de programa\Java\jbpm-installer\targe t check.jboss.version: install.guvnor.into.jboss.other: download.designer.check: [echo] Checking Designer download ... download.designer: install.designer.into.jboss: [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\deploy download.h2.check: [echo] Checking h2 download ... download.h2: check.birt: download.birt.check: download.birt: download.jBPM.gwt-console.check: [echo] Checking jBPM gwt-console download ... download.jBPM.gwt-console: install.jBPM-gwt-console.into.jboss: [mkdir] Created dir: C:\Archivos de programa\Java\jbpm-installer\target [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\lib\jbpm-5.1. 0.M1-gwt-console.zip into C:\Archivos de programa\Java\jbpm-installer\target [mkdir] Created dir: C:\Archivos de programa\Java\jbpm-installer\target\jbpm -gwt-console-server-war [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\target\jbpm-g wt-console-server-5.1.0.M1.war into C:\Archivos de programa\Java\jbpm-installer\ target\jbpm-gwt-console-server-war [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\target \jbpm-gwt-console-server-war\WEB-INF\classes [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\target \jbpm-gwt-console-server-war\WEB-INF\classes\META-INF [copy] Copying 2 files to C:\Archivos de programa\Java\jbpm-installer\targe t\jbpm-gwt-console-server-war\WEB-INF\classes [zip] Building zip: C:\Archivos de programa\Java\jbpm-installer\target\jbp m-gwt-console-server-5.1.0.M1.war [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\deploy [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\deploy [delete] Deleting directory C:\Archivos de programa\Java\jbpm-installer\targe t [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\deploy [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\lib [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\conf [copy] Copying 1 file to C:\Archivos de programa\Java\jbpm-installer\jboss- 5.1.0.GA\server\default\conf check.birt: install.reporting.into.jboss: download.eclipse.check: [echo] Checking Eclipse download ... download.eclipse: download.eclipse.gef.check: [echo] Checking Eclipse GEF download ... download.eclipse.gef: install.eclipse: unzipEclipse: [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\lib\eclipse-j ava-helios-win32.zip into C:\Archivos de programa\Java\jbpm-installer untarEclipse: [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\lib\GEF-SDK-3 .6.1.zip into C:\Archivos de programa\Java\jbpm-installer download.jBPM.eclipse.check: [echo] Checking jBPM Eclipse download ... download.jBPM.eclipse: install.jBPM-eclipse.into.eclipse: [unzip] Expanding: C:\Archivos de programa\Java\jbpm-installer\lib\jbpm-5.1. 0.M1-eclipse-all.zip into C:\Archivos
Re: [rules-users] Qn on BPMN 2 editor (Eclipse plugin): How to display gateway description?
This is currently not possible using the existing plugin. We're working on a new BPMN2-based plugin where this will be possible in the future though: https://hudson.jboss.org/hudson/job/jBPM/lastSuccessfulBuild/artifact/jbpm-distribution/target/jbpm-5.2.0-SNAPSHOT-docs-build/jbpm-docs/html/ch10.html Kris style.x7 wrote: Hi all, When playing with the diverge/converge node of ruleflow editor, I can write and display description of the node. But when I switch to BPMN 2 editor mode, the gateway node (which replaces the diverge/converge node of ruleflow) does not show description anymore. Is there any way to display it? -- View this message in context: http://drools.46999.n3.nabble.com/Qn-on-BPMN-2-editor-Eclipse-plugin-How-to-display-gateway-description-tp2915551p2915551.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/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] what is the difference between process variable global variables?
The most important difference is probably the scope. Variables are scoped to one process instance (so each variable of a process instance can have it's own value, unique to that process instance), where a global is scoped to the session (so shared across all process instances in that session). Kris Esteban Aliverti wrote: These are some of the differences between variables and globals: * You can make inference about your globals using rules * Variables are persisted as part of the process instance info. Globals are not. * I didn't test it in every node type, but at least in Script Tasks, you can access process variables using just its name. Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Apr 13, 2011 at 8:39 AM, gs76pl gstas...@pacemetrics.com mailto:gstas...@pacemetrics.com wrote: hi, this seems like a basic question i should know the answer to after reading some documentation but unfortunately after doing some tests with onExitActions there seems to be some discrepancy between what doc reads and how the process/action behaves. Could anyone verify my observations: 1. while documentation in 4.4. Data reads ...Actions can access variables directly, simply by using the name of the variable as a parameter name in fact this is INCORRECT as at that point actions expect a global object to be in the session!! e.g. below code in onExitAction throws an exception if tracker obj hasn't been defined as a global variable and entered into the session (it doesn't matter that the process has tracker variable defined) tracker.addVisitedNode(dasdf); 2. the only way of accessing process variables is via context object as below context.getVariable(tracker) 3. inserting/updating object in the session can be done a) context.getKnowledgeRuntime().insert(myFact); b) insert(myFact); looks like there is no difference here and the second one is simple a shorter version of doing the same -- View this message in context: http://drools.46999.n3.nabble.com/what-is-the-difference-between-process-variable-global-variables-tp2815658p2815658.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org mailto: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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] completing persisted workItem (the last in a process) doesn't complete a process
A process instance is disconnected once the command is completed. This means that it will represent the state at the end of the command and won't be updated when the process instance actually changes. You can however always get the latest snapshot using ksession.getProcessInstance(id). There are a few reasons for doing this: * It allows a process instance to be updated from two separate sessions, since the process instance will be reloaded from database when it is needed again, so it will take the changes into account that were introduced by another session. * When using persistence, you're not supposed to manipulate the process instance directly (as this will be out of the scope of the transaction and the engine wouldn't be aware), disconnecting the instance means you can't, you're supposed to treat it as a data object. * This also allows remoting where the process instance can be sent to anywhere else (and here the use of a DTO that represents a snapshot it common) Note that this is only when you are using persistence, when using the core engine directly, you get access to the live process instance directly. Kris Dan Nathanson wrote: I ran into this issue also. I was told that the ProcessInstance you are looking at is just a snapshot of what was loaded from the DB. It doesn't get updated after being loaded. I wasn't told why this was the behavior, just that it was expected. Didn't seem intuitive to me. I was told that the way to check for process completion is to try to load the process from the DB again and if it is null, then it is complete. I didn't like that solution so I wrote a ProcessEventListener to detect process completion because I needed to send a JMS message. Regards, Dan Nathanson On Tue, Apr 12, 2011 at 7:18 AM, gs76pl gstas...@pacemetrics.com wrote: for those interested the problem was that i misinterpreted ProcessInstance object as something that always gets updated whenever underlying process changes, whereas in fact that's the version of a process obtained at the specific moment. This is especially true while working with persistence. So the bottom line is that in order to check process status the best way to do it is to create ProcessEventListener object and add it to the created session similar thread http://comments.gmane.org/gmane.comp.java.drools.user/24622 -- View this message in context: http://drools.46999.n3.nabble.com/completing-persisted-workItem-the-last-in-a-process-doesn-t-complete-a-process-tp2810593p2811574.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/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
Re: [rules-users] is it correct that rows in a sessioninfo table in df persistence never get deleted?
Yes, as disposing a session doesn't mean you don't want to restore it at some point later from persistence. You might for example temporarily want to dispose the session since you know it is no longer needed (short-term) and recreate it later whenever necessary. If you don't need the session state anymore, you could just delete it as well. We would probably need to introduce a new method (like delete()?) which would dispose + remove. Kris gs76pl wrote: hi, i'm not sure whether it's OK or not but while using drools flow persistence records in [i]sessioninfo[/i] table never get deleted ? Once i'm done with the process and call knowledgeSession.dispose() previously created record in a table doesn't get removed? Is it correct that sessioninfo table should always grow and there is no deleting rows taking place the same way e.g. processinstanceinfo table has in place? If this is intentional than what is the benefit? -- View this message in context: http://drools.46999.n3.nabble.com/is-it-correct-that-rows-in-a-sessioninfo-table-in-df-persistence-never-get-deleted-tp2812026p2812026.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/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] difference between jBPM and drools?
1. Can jBPM5 process rule flow (.rf) files? Yes, this is supported for backwards compatibility reasons. We do recommend using the BPMN2 format for new processes though (as newer features are not backported to the .rf format). 2. How does the handling of BPMN in jBPM5 compare with Drools Flow 5.1? There were limitations in Drools Flow 5.1 (http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-flow/html_single/index.html#d0e2782). Our flows make use of State nodes, which weren't supported in BPMN - is this still the case? If so, is there an alternative way of implementing similar behaviour in the BPMN spec.? Some of the limitations have already been resolved (globals, imports) using custom extensions. Unfortunately, states are not supported directly in BPMN 2.0. An alternative to model them as an ad-hoc subprocess or using intermediate events might be possible but seems tricky to say the least. So states are not supported in jBPM 5.0. We're looking at adding support for them in 5.1, probably as a custom node type. Kris Many thanks, Alan *Tessella plc* 26 The Quadrant, Abingdon Science Park, Abingdon, Oxfordshire, OX14 3YS E: _Alan.Gairey@tessella.com_ mailto:alan.gai...@tessella.com, T: +44 (0)1235 11, F: +44 (0)1235 553301_ __www.tessella.com_Registered in England No. 1466429 Please consider the environment and do not print this e-mail unless you really need to. This message is commercial in confidence and may be privileged. It is intended for the addressee(s) only. Access to this message by anyone else is unauthorized and strictly prohibited. If you have received this message in error, please inform the sender immediately. Please note that messages sent or received by the Tessella e-mail system may be monitored and stored in an information retrieval system. *Esteban Aliverti esteban.alive...@gmail.com* Sent by: rules-users-boun...@lists.jboss.org 07/04/2011 12:44 Please respond to Rules Users List rules-users@lists.jboss.org To Rules Users List rules-users@lists.jboss.org cc Geoffrey De Smet ge0ffrey.s...@gmail.com Subject Re: [rules-users] difference between jBPM and drools? Drools Flow was separated from drools trunk and re-branded (with additional modifications) to jBPM5. So, drools code 2 will not contain Drools Flow. If you want to use Flow, then just go to jBPM5. Best Regards, Esteban Aliverti - Developer @ _http://www.plugtree.com _ http://www.plugtree.com/ - Blog @ _http://ilesteban.wordpress.com_ http://ilesteban.wordpress.com/ On Thu, Apr 7, 2011 at 6:48 AM, Geoffrey De Smet _ge0ffrey.spam@gmail.com_ mailto:ge0ffrey.s...@gmail.com wrote: _https://issues.jboss.org/browse/JBPM_ Op 07-04-11 10:25, _Alan.Gairey@tessella.com_ mailto:alan.gai...@tessella.com schreef: So to clarify, does Drools 5.2 contain Drools Flow any longer, or has this been superceded by jBPM 5? If I wish to submit feature requests, bugs etc., is there a separate issue tracker for jBPM 5? Thanks, Alan *Mark Proctor _mproctor@codehaus.org_ mailto:mproc...@codehaus.org* Sent by: _rules-users-bounces@lists.jboss.org_ mailto:rules-users-boun...@lists.jboss.org 06/04/2011 22:43 Please respond to Rules Users List _rules-users@lists.jboss.org_ mailto:rules-users@lists.jboss.org To _rules-users@lists.jboss.org_ mailto:rules-users@lists.jboss.org cc Subject Re: [rules-users] difference between jBPM and drools? On 06/04/2011 22:34, Mauricio Salatino wrote: It's the same thing, you can use jBPM5. because Drools Flow and jBPM4 are abandoned right now. Greetings Abandoned isn't the best word. jBPM5 is the successor of the two projects, incorporating aspects of both. It is mostly, if not entirely, api compatible with drools flow. Mark 2011/4/6 _Stephan.Koops@we4it.com_ mailto:_Stephan.Koops@we4it.com_ mailto:stephan.ko...@we4it.com Hi, I don't find much about the difference between jBPM and drools flow, only that jBPM is the official one (__http://www.jboss.org/drools/drools-flow#Drools_Flow_and_jBPM__, first paragraph of the section) and rethinked. I'm interested for the practical site. Can anybody tell me about the advantages or disadvantages? What are the main points to decide which one to use? Maybe I missed a blog entry or something like that, but I don't find more. A pointer or something else would be nice. Thanks in advance. Mit freundlichen Grüssen/Best regards i. A. Stephan Koops Software Engineer We4IT GmbH * Sie wollen aktuelle Informationen zu Lotus-Produkten? Dann besuchen Sie unseren Blog: _ ___http://www.lotus-notes-domino-blog.de__ http://www.lotus-notes-domino-blog.de_/ _http://www.lotus-notes-domino-blog.de/_*
Re: [rules-users] Process instance status not completing when using JPA.
Dan, Once you start using persistence, you should know that the process instance you are retrieving is no longer the internal process instance but a version of the process instance at the moment you requested it. This process instance however is disconnected, meaning that it will not automatically update when the internal process instance changes. The main reason is that, when using persistence, process instances can be removed and reloaded from database at any time, so you basically get a copy. If you register a listener that listens for process instance completion right before inserting the list in testPersistenceState(), you will notice that this process instance gets completed and that the process instance state of the internal process instance is set to completed. The copy you still have from before still is in active state though. Since process instances that are completed are also removed from persistence as no longer necessary, you can't get the process instance in state completed. That's why we test whether a process instance is completed by checking it is null when we try to retrieve it. Another option would be to use a history logger of course. Kris Dan Nathanson wrote: More info... This behavior is reproducible in the Drools JPA test cases. In org.drools.persistence.session.PersistentStatefulSessionTest.testPersistenceState() and testPersistenceRuleSet(), if you add a breakpoint before loading the processInstance the last time (when it is null because the process has completed), you can see that processInstance.getState() returns 1 (ACTIVE) instead of 2 (COMPLETE). I added the ConsoleLogger to the ksession and can see the AFTER RULEFLOW COMPLETED log message. In the other test cases, the state is correctly set to 2 after the process completes. On Mon, Mar 7, 2011 at 11:21 AM, Dan Nathanson d...@ddnconsulting.com mailto:d...@ddnconsulting.com wrote: Hi, I'm seeing some odd behavior in Drools Flow 5.1.1. When using JPA and creating a StatefulKnowledgeSession using JPAKnowledgeService.newStatefulKnowledgeSession(), processes look like they run to completion, but calling RuleFlowProcessInstance.getState() on process instances created froim this knowledge session returns 1 (STATE_ACTIVE). Calling getActiveNodeIds() throws a NullPointerException. If I get a StatefulKnowledgeSession without JPA by calling KnowledgeBase.newStatefulKnowledgeSession(), getState() returns 2 (STATE_COMPLETED). I added KnowledgeRuntimeLoggerFactory.newConsoleLogger(knowledgeSession) and can see in both cases that the process is complete. Has this been seen before? Is it a known bug? Am I doing something wrong? Regards, Dan Nathanson ___ 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
Re: [rules-users] Repackaging of the jar: missing drools.rulebase.conf?
This is specified in the drools-core jar, in the drools.default.rulebase.conf: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-core/src/main/resources/META-INF/ Kris drdaveg wrote: I had several Eclipse projects with customized WorkItem's in 5.1. The latest download of the source code seems to have been reorganized: I see drools.rulebase.conf files that seem unrelated to drools.workDefinitions and all the versions that look like what I would expect are in the example files and their jars; have the drools-process jar's been repackaged without drools.rulebase.conf or might this file have been deprecated? What I had been expecting was to find an entry like: drools.workDefinitions = WorkDefinitions.conf in the file with a corresponding WorkDefinitions.conf file for the email and log WorkItem's. Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] [Drools Flow] checking Properties of supplied variables in constraints
You can download the XSD here: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-processes-5.0.xsd And each node type and their attributes are explained in the docs: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch04.html#d0e515 Kris Gregor Ryba wrote: Hi Kris, You were right - now it's working. i had just copied the rule-constraint from annother sample i was basing my app on. didn't know that a code constraint was existing. is there a more low level documentation available that describes Drools on XML level (what types/keywords are allowed), or is there a possibility to download the http://drools.org/drools-5.0/process drools-processes-5.0.xsd ? when i'm trying to do so - i am always getting redirected to http://www.jboss.org/drools/index.html (using a normal Browser or a Download Manager) Regards Von: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] im Auftrag von Kris Verlaenen [kris.verlae...@cs.kuleuven.be] Gesendet: Montag, 08. November 2010 01:19 An: Rules Users List Betreff: Re: [rules-users] [Drools Flow] checking Properties of supplied variables in constraints Gregor, Is there a reason why you are using rule constraints in your process? It seems you are doing a simple evaluation of a process variable value, in which case a simple code constraint like: return reviewer.equals(ticket.getType()); should work, and you'll have less changes of seeing strange side-effects. The reason why I think you might be seeing some strange behavior with rule constraints is that rules are evaluated on the session scope, not for an individual process instance. So if you insert multiple objects into the session (one Ticket for each process instance), once a rule is valid for one process instance, it will probably be for the other as well (unless you removed the object from the session before the second process instance). Note that you could also refer to the actual value of a process variable if you want to, as explained in the link below, but in this case it seems a simple code constraint should be sufficient. https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch04.html#d0e1348 Kris Gregor Ryba wrote: Hi, i am supplying an object as variable to my workflow. in a split i try to check the property Type of the supplied object and according to it move on to the next actionnode (for testing purposes). in the actionnode i am setting a string, that i am printing out later. my test looks as follows: first i supply a ticket with type reviewer after this i supply a ticket with type developer BUT i'm getting the following output: Output1: processing developer ticket reviewer Output2: processing developer ticket developer so the ticket-object is injected correctly into the workflow, but i have no clue, why the developer constraint is taken both times any hints? -workflow file used ?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/process drools-processes-5.0.xsd type=RuleFlow name=Task Test id=tasktest package-name=workflows routerLayout=2 header variables variable name=ticket type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.openengsb.core.taskbox.model.Ticket / /variable /variables /header nodes start id=1 name=Start x=103 y=26 width=49 height=49 / end id=2 name=End x=107 y=393 width=49 height=49 / split id=7 name=Gateway x=103 y=116 width=49 height=49 type=1 constraints constraint toNodeId=9 toType=DROOLS_DEFAULT name=reviewer priority=2 type=rule dialect=java (ticket.getType()==reviewer)/constraint constraint toNodeId=8 toType=DROOLS_DEFAULT name=developer priority=1 type=rule dialect=java (ticket.getType()==developer)/constraint /constraints /split actionNode id=8 name=dev x=42 y=205 width=80 height=48 action type=expression dialect=java taskbox.setWorkflowMessage(processing developer ticket lt; + ticket.getType() + gt;);/action /actionNode actionNode id=9 name=rev x=150 y=205 width=80 height=48 action type=expression dialect=java taskbox.setWorkflowMessage(processing reviewer ticket lt; + ticket.getType() + gt;);/action /actionNode join id=10 name=Gateway x=104 y=302 width=49 height=49 type=2 / /nodes connections connection from=10 to=2 / connection from=1 to=7 / connection from=7 to=8 / connection from=7 to=9 / connection from=8 to=10 / connection from=9 to=10
Re: [rules-users] process-designer deserialization error
Hi, Yes, the NPE you are getting is because the package as defined in the process is not the same as the package in Guvnor. You can set the package of your process either by changing the XML file as you described, but there is also a package name property on the process (just click the background of your process and check the properties view). You should be able to build your process on Guvnor if package names match. Kris melc wrote: Finally I think I've got something after debugging the source. Well at least the compilation issues as well as viewing and running the process from gwt-console have been resolved for now. I'm not sure if it is something that needs to be corrected or whether i've missed it somewhere. But the story is that the NullPointerException occuring at org.drools.compiler.ProcessBuilder.buildProcess(ProcessBuilder.java:121) and giving in guvnor the following error, unable to parse xml : Exception class java.lang.NullPointerException : null was because the Process object that was built by the org.drools.bpmn2.xml.ProcessHandler had a packageName equal to org.drools.bpmn2, which is the default value given to the packageName attribute if it is null (i.e. not found in the xml bpmn process definition) . However, if the added process is opened in guvnor the information on the right says that the packageName is equal to defaultPackage (i.e. if it has been added to defaultPackage) as someone would expect, but this is not actually the case on compile timeif the xml has not been edited appropriately. So the resolution to this is to add an attribute packageName to the process tag within the bpmn xml file, before adding it to guvnor. Actually, the exact attribute name has to be tns:packageName=the name of the guvnor package that this bpmn will be added to. The question is whether this is actually true or whether i'm missing something and don't really need to edit the xml of each process created in eclipse before adding it in guvnor. I appreciate any help, thank you for your time. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Some Problem with drools-persistence-jpa Library
Hi, If you use persistence, you should use ksession.signalEvent(type, event, processInstanceId) instead of signaling the process instance itself. The reason is that, if you're using persistence, the state of the process instance is stored in the database after processing and the process instance is disconnected (that is why the working memory is null). The process instance object that you are receiving is just a value object (and can for example be sent to a remote machine like the client side). If you use the signalEvent method on the session, the process instance will be reloaded and reconnect again, so I think that should solve your issue. Kris tangrui...@gmail.com wrote: And another tip is that after ksession.startProcess, I get a ProcessInstance pi, but ProcessInstance pi = ksession.startProcess(com.zyeeda.system.TestFlow); org.drools.process.instance.ProcessInstance pi2 = (org.drools.process.instance.ProcessInstance) pi; pi2.getWorkingMemory() // this one returns null Is this a bug or my usage problem? On Sun, Nov 7, 2010 at 5:51 PM, tangrui.cn http://tangrui.cn@gmail.com http://gmail.com tangrui.cn http://tangrui.cn@gmail.com http://gmail.com wrote: Hi list, The attachment is a very simple test case to demonstrate an application using Drools Persistence JPA (5.1.1). Usage: 1. set up a mysql database called framework 2. set the user/password are root/root (or change the bitronix-datasources.properties file) 3. run maven test The core lines are as following: StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, conf, env); ProcessInstance pi = ksession.startProcess(com.zyeeda.system.TestFlow); pi.signalEvent(signal, goon); When executing the 3rd line, an exception occurred java.lang.NullPointerException at org.drools.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.getWorkflowProcess(WorkflowProcessInstanceImpl.java:185) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:346) at com.zyeeda.test.AppTest.testProcessPersistence(AppTest.java:84) I've headed into the code and find that some working memory related to the ProcessInstanceImpl is null. (drools-core/src/main/java/org/drools/process/instance/impl/ProcessInstanceImpl.java) But I cannot get why this does happen. Please give me some tips. I tried to google some solutions, but find only this one (http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Events-Not-Working-td1453738.html), but it seems that he solved this problem by using a custom command. Thank you! -- 唐睿 -- 唐睿 ___ 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
Re: [rules-users] [Drools Flow] checking Properties of supplied variables in constraints
Gregor, Is there a reason why you are using rule constraints in your process? It seems you are doing a simple evaluation of a process variable value, in which case a simple code constraint like: return reviewer.equals(ticket.getType()); should work, and you'll have less changes of seeing strange side-effects. The reason why I think you might be seeing some strange behavior with rule constraints is that rules are evaluated on the session scope, not for an individual process instance. So if you insert multiple objects into the session (one Ticket for each process instance), once a rule is valid for one process instance, it will probably be for the other as well (unless you removed the object from the session before the second process instance). Note that you could also refer to the actual value of a process variable if you want to, as explained in the link below, but in this case it seems a simple code constraint should be sufficient. https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch04.html#d0e1348 Kris Gregor Ryba wrote: Hi, i am supplying an object as variable to my workflow. in a split i try to check the property Type of the supplied object and according to it move on to the next actionnode (for testing purposes). in the actionnode i am setting a string, that i am printing out later. my test looks as follows: first i supply a ticket with type reviewer after this i supply a ticket with type developer BUT i'm getting the following output: Output1: processing developer ticket reviewer Output2: processing developer ticket developer so the ticket-object is injected correctly into the workflow, but i have no clue, why the developer constraint is taken both times any hints? -workflow file used ?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/process drools-processes-5.0.xsd type=RuleFlow name=Task Test id=tasktest package-name=workflows routerLayout=2 header variables variable name=ticket type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.openengsb.core.taskbox.model.Ticket / /variable /variables /header nodes start id=1 name=Start x=103 y=26 width=49 height=49 / end id=2 name=End x=107 y=393 width=49 height=49 / split id=7 name=Gateway x=103 y=116 width=49 height=49 type=1 constraints constraint toNodeId=9 toType=DROOLS_DEFAULT name=reviewer priority=2 type=rule dialect=java (ticket.getType()==reviewer)/constraint constraint toNodeId=8 toType=DROOLS_DEFAULT name=developer priority=1 type=rule dialect=java (ticket.getType()==developer)/constraint /constraints /split actionNode id=8 name=dev x=42 y=205 width=80 height=48 action type=expression dialect=java taskbox.setWorkflowMessage(processing developer ticket lt; + ticket.getType() + gt;);/action /actionNode actionNode id=9 name=rev x=150 y=205 width=80 height=48 action type=expression dialect=java taskbox.setWorkflowMessage(processing reviewer ticket lt; + ticket.getType() + gt;);/action /actionNode join id=10 name=Gateway x=104 y=302 width=49 height=49 type=2 / /nodes connections connection from=10 to=2 / connection from=1 to=7 / connection from=7 to=8 / connection from=7 to=9 / connection from=8 to=10 / connection from=9 to=10 / /connections /process ___ 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
Re: [rules-users] process-designer deserialization error
Alfredo, Yes, the GuvnorAPIServlet seems to be connecting hardcoded to http://localhost:8080/designer/bpmn2_0deserialization;. I'll see if I can update this to something better or at least configurable. Kris AlfredoLatini wrote: Hi, i have a problem with oryx process-designer and drools guvnor. I have created a process with process-designer and i saved it. Then i have opened this file with eclipse and i uploaded this file in guvnor repository. I have opened the process in drools guvnor and the following exception occurred: The server encountered an internal error () that prevented it from fulfilling this request./u/ppexception prejavax.servlet.ServletException: http://localhost:8080/designer/bpmn2_0deserialization org.drools.guvnor.server.GuvnorAPIServlet.service(GuvnorAPIServlet.java:73) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42) How can i fix this problem? My jboss installation runs on port 8580 because 8080 is busy (oracleXE). Thanks in advance Alfredo. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] process-designer deserialization error
Hi, It is possible there are still issues between Oryx and Drools Eclipse plugin, as they are both using the same spec but not necessarily the same version (or interpreting the spec differently). First of all, I would recommend updating to the latest version of the Oryx designer (unfortunately you'll have to use Chrome as browser in that case as it doesn't load on FF, something small we still have to fix) which can be found here: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/1.0.0.026-SNAPSHOT/ The reason is that the first version of the designer (which you were using) was still using the beta1 version of the BPMN2 spec. The eclipse plugin is already using the beta2 version, and so is the latest version of the designer. There is still limited support for the beta1 format, that's why eclipse will be able to open and save a BPMN2 file created in Oryx (it will use beta1 format in that case), but starting from Eclipse won't work in Oryx (as the old version of Oryx won't understand the beta2 format). You can see the difference by looking at the namespace used for bpmn, which will be different for beta1 and beta2. The other problem you mentioned, the g namespace not being added to the BPMN2 file, is indeed a known issue that is already fixed on the latest trunk. I suggest you download a latest version of the Eclipse plugin here: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/ Kris melc wrote: I also get this error when creating a bpmn process in eclipse (galileo) and trying to open/view it in guvnor, having it committed first. I'm using jboss-5.1.0.GA and drools version 5.1 . The application server is running on port 8080 (default configuration). I'm not using any rdbms only what comes bundled (h2 embedded db ) with drools. For oryx designer i'm using designer.war Revision 35836: /labs/jbossrules/contrib/designer as downloaded from url, http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/ as specified in, http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html The only way I have managed to view and edit a bpmn model inside guvnor by using the oryx designer and also being able to open for view and editing in eclipse with commits and updates back and forth with guvnor and everything to work fine is by, 1. creating a model from scratch in oryx designer ( http://localhost:8080/designer/editor ), preferably just a start and end point and maybe also a single task between them (start and end only works fine). 2. download the model from the option of oryx designer Download BPMN 2.0 DI XML 3. import in eclipse from filesystem 4. add/change stuff and add to guvnor Afterwards everything works fine whether edited and committed from guvnor and viewed in eclipse or edited and committed from eclipse and viewed in guvnor. By comparing the bpmn xml files created from oryx and from eclipse there seem to be differences that actually cause this error, since they stop occurring if using the same syntax. I'm still trying to find which different part actually casuses this, when i find it i will post it. Sorry for the long text, any help will be greatly appreciated!! Thank you. p.s. just to make things more annoying I would like to mention that when adding from eclipse to a bpmn model that works a Rule Task element and then close the bpmn model tab in eclipse and reopen it a strange error appears, which occurs because of a strange prefix 'g' character inserted in the xml of the bpmn. If it is removed from the xml everything works fine I suppose everything has to do with the different xml schemas, namespaces and tags used in the xml bpmn.. . . ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] UserTask parameters mapping and gwt-console
Juan, You're pretty close to the actual solution ;) The only problem is that you can't just map values to new work item parameters and expect them to show up in the task somehow. There is one parameter called Content that can be used to put in data that might be needed / relevant during task execution. If you for example have only one variable, you could map that to the Content parameter and access that from inside the form. In case you have multiple values, we recommend you use a Map to put the different values in (you can create that in a simple action node or on-entry action and store it in an additional variable) and then map that to the Content parameter. Note that we've tried to make your life easier by making sure that each of the entries in the map are known as a variable in your form so you should be able to use your forms as you defined them already. Now, I know we could also extend our implementation to generate a Map for all unknown work item parameters and then put that as the Content (or merge with the Content), would people prefer this approach? But then again, it's probably only 5 minutes work to create your own version of the WSHumanTaskHandler and tweak it so it does as I described above, and then use that as your integration code instead of our default one ;) Kris Juan Ignacio Barisich wrote: Hi. I'm using the gwt-console and trying to set a parameter mapping to send some variables from the process to a task. First, the variables are setted in the process like: header variables variable name=myVariableA type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=String / /variable variable name=myVariableB type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=String / /variable /variables /header The parameter mapping is: humanTask id=3 name=Revisar Solicitud x=119 y=143 width=162 height=48 work name=Human Task ... /work mapping type=in from=myVariableA to=myVariableA / mapping type=in from=myVariableB to=myVariableB / /humanTask Then I have a ftl file for the task form like: html ... body A value: ${myVariableA}/br Another value: ${myVariableB}/br ... /body /html With this code, when I select a task and click View, I get the following exception: - org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Failed to process form template org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319) org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) causa raíz java.lang.RuntimeException: Failed to process form template org.drools.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:104) org.drools.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:111) org.drools.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50) org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:203) org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:125) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166) org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
Re: [rules-users] Drools 5.1 Flow in a Clustered environment
It related to this issue: https://jira.jboss.org/browse/JBRULES-2616 Diego, is there something publicly available already? Kris Ken Young wrote: Thank you for the reply. I a not sure where the community effort lives, but would it be possible send a link in order to take a look? Ken On Oct 28, 2010, at 8:28 PM, Kris Verlaenen wrote: Ken, In Drools, timers etc. are linked to a session (where the session can contain process instances, timers, data, rule evaluations, etc.). So, even if you are using Drools Flow in a clustered environment, where you could have a number of independent sessions running simultaneously, the timer will always be associated to that session. There are two possible strategies then: either (1) you keep the session online for ever (your cluster has a number of running sessions and you're possibly using persistence to restore in case of system failure), and the timers will fire in that session only when the time is right or (2) you only keep your session alive when it is necessary so sessions can go offline, where you could then use a scheduler to make sure the session is brought back online (from persistent storage) whenever a timer should fire in an offline session. The latter is currently being implemented as a community contribution. Kris Ken Young wrote: We are looking at embedding Drools 5.1 (specifically Drools Flow) in our application, but I am coming up short on determining how to configure clustering, or the support. Specifically, I want to ensure that background processes that are taking place (reminders, timers, etc.) only happen once on a cluster. Does drools support this and how? In other software that we have clustered (Quartz for example), where a shared database lock is used to ensure the the processing happens in one place. I was wondering if Drools 5.1 worked in a similar fashion. Thanks Ken ___ 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problems with globals in bpmn-flows
Bjorn, Unfortunately, the BPMN2 specification does not define anything that could be used to store globals (or imports for that matter). We've always held back a little on adding custom extensions to the BPMN2 spec but since it is stable now, I guess we will have no other choice. I'll be adding some of the missing features that Drools Flow had as custom extensions of BPMN2 in the next few weeks. You'll be able to do exactly what you describe after that. As an alternative solution, you could however also use a rule task and add that one rule you described to handle calling the service. You can't access working memory objects like that in a script task, but using a rule task with only one rule that should be possible. Kris Mahler wrote: Hello dear list, I currently have problems to access global variables in a drools 5.1 bpmn rule-flow. I have a script-task at the end of my process-flow in which I want to call a method of an external service. I instantiated the service and set it as global in the ksession before starting the process. In the script-task I add global x.y.z.MyService myService with the same name as setted before and call the object with the method with script-type mvel/java: myService.xyz(); Is this the right way doing this? Because I'm receiving the error-message cannot access variable with name 'myService' or similar (can't remember exactly). When adding the service as a process variable in the model and then starting the process, I can access this variable in the script-task... but - I think using globals would be much nicer for accessing the service in some of my rules in the same way under the same variable. After all I also don't know how to access modified process-variables in my task. For example if I change some object in a rule-task before and in a script-task later I want to call a service with the modified object... do I have to read a process variable in the rule, modify it and then in the script-task I access the process-variable or could I access the changed object in the working-memory in the script-task as well? Like or similar because this is just rule-style: when $o : MyObject (withMyChangedParameter == 'x') then service.myMethod($o); TIA Björn Diese E-Mail kann vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ___ 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
Re: [rules-users] Flow Task implementation
The integration code for executing a custom work item is plain old Java. So anything you can implement or invoke using Java code can be used to implement a work item. So using EJBs in the integration code shouldn't be a problem. Kris borg wrote: How are pluggable working items implemented? Can they (or tasks in general) be implemented as EJBs? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5.1 Flow in a Clustered environment
Ken, In Drools, timers etc. are linked to a session (where the session can contain process instances, timers, data, rule evaluations, etc.). So, even if you are using Drools Flow in a clustered environment, where you could have a number of independent sessions running simultaneously, the timer will always be associated to that session. There are two possible strategies then: either (1) you keep the session online for ever (your cluster has a number of running sessions and you're possibly using persistence to restore in case of system failure), and the timers will fire in that session only when the time is right or (2) you only keep your session alive when it is necessary so sessions can go offline, where you could then use a scheduler to make sure the session is brought back online (from persistent storage) whenever a timer should fire in an offline session. The latter is currently being implemented as a community contribution. Kris Ken Young wrote: We are looking at embedding Drools 5.1 (specifically Drools Flow) in our application, but I am coming up short on determining how to configure clustering, or the support. Specifically, I want to ensure that background processes that are taking place (reminders, timers, etc.) only happen once on a cluster. Does drools support this and how? In other software that we have clustered (Quartz for example), where a shared database lock is used to ensure the the processing happens in one place. I was wondering if Drools 5.1 worked in a similar fashion. Thanks Ken ___ 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
Re: [rules-users] Drools Flow Remote API ?
Drools allows remote clients to use exactly the same API by using a command approach. We have a client-side implementation of the drools session api that simply creates command objects that can be serialized and then transported from client to server using most communication channels. At server side, commands can be restored and executed on the session. I assume other solutions are possible as well, but this approach should allow you to get started easily. Kris Quoting magicalpig kingfe...@monarchy.com: I'm considering Drools Flow for a project that requires a workflow enactment engine. One concern I have is how much effort it might take to make remote calls to the engine. I plan on running the engine in its own JVM. I would then like for servlets to talk to the engine, for instance to tell it that Work Item XYZ has been completed successfully. It doesn't seem as though any API is exposed for remote clients though. Would I have to write my own interface which listens for the RMI calls from the servlets and then maps them to calls to the native API of the Drools Flow engine? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Remote-API-tp1767973p1767973.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] GWT Console and WSHT Rendering
This varies a little depending on which application server you are using, but assuming you're using JBoss AS: simply create a jar that contains all your form definitions and add the jar either to the server_installation_dir/default/lib folder or in the /WEB-INF/lib/ folder inside the gwt-console-server-drools-{version}.war in the server_installation_dir/default/deploy folder. Kris Quoting geoff geoffrey@otago.ac.nz: Hi Could you clarify this a little please? You can add your own forms by adding these to your application classpath (either in the same location or any other location which is included into the application classpath). Can I create these form templates in eclipse and then use the guvnor pluggin to 'add' them? or what is the easiest/best way to manage the templates (create, deploy)? Should I jar up all the ftl files and put them in the deploy folder? What is 'Application classpath' in this context? Sorry if it's a dumbass question... thanks in advance Geoff -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/GWT-Console-and-WSHT-Rendering-tp1700905p1750235.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow BAM
Prafull, It all depends on how you want to store the data that you need to do BAM. You could consider the audit logger as an example of how you could do logging (although it might probably be better to not use XML logging for BAM, but rather use a database or feed the events directly into Drools Fusion for processing). Quoting Prafull Kumar to_praf...@yahoo.com: 1. In the ProcessEventListener can we embed required data from the process, global variables? The event listeners provide access to the process instance object, so you can access all runtime information, including variable values, etc. You can then customize how to store that information. Its good, But I would like to log the variables as the workflow executes, so that I can generate the meaningful reports. e.g. If the flow takes one path I would like to log a variable of a object and for another maybe another part of the object. You should probably be looking at the history log (in the drools-bam module) for this kind of features, which maintains a history of what happens at runtime (including variable values) based on the events. Again, you could look at this as an example that you can tweak according to your needs. Depending on whether you use persistence or not, you should be looking at the WorkingMemoryDbLogger or JPAWorkingMemoryDbLogger respectively: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-process/drools-bam/src/main/java/org/drools/process/audit/ It will help me to create the kind of report I am looking for. Please advice. 2. Any idea on the performance impact if we log these events in the database. Does the process waits till the event is written in database or this happens asynchronously as its a event? Please clarify. How your event listener works is up to you. If you use persistence, you should make sure the events are created as part of the transaction the events are generated in. The two default implementations don't use asynchronous handling of events, but this could be added if necessary by updating the listener. When using the JPA version, all updates to the history log are already batched as part of one commit, so this should improve performance. You should also make sure that you only log the data that you are planning to use (at the level of detail you'll be using it) to avoid storing too much data and impacting performance. Kris Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] parallel folw execution
The process engine really doesn't add that much overhead to the actual work that needs to be performed by the process itself. If you're invoking a service that takes 2-3 seconds, you need to make sure you invoke the service asynchronously, so the engine can continue executing other process instances while waiting for the results. In general, you usually start with one session running your process instances in parallel on one CPU. This scales as long as the CPU is capable of doing all the work + some overhead. It is trivial to scale to multiple sessions (possibly on multiple systems) afterwards. Kris Quoting borg nbor...@gmail.com: How would this scale? Having in consideration that: - I would end-up with 20-30 flows and - each flow would would have an event hit rate of 15/sec and - each flow would last for an average of 2-3 sec We can imagine an average of ~1000 flow instances running at any given time. Assuming fairly simple flows and respective components (also containing rules), would the engine cope well with such load scenario? (ex. HW 2x4c CPU; 32GB RAM) Thanks -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/parallel-folw-execution-tp1703319p1726251.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] GWT Console and WSHT Rendering
Quoting Michael Anstis michael.ans...@gmail.com: What project can I find this under http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-process/drools-gwt-form/ On 16 October 2010 22:57, Kris Verlaenen kris.verlae...@cs.kuleuven.bewrote: Forms are separately created using a template-based approach and looked up from the application classpath based on the task name. In this case, the Performance Evaluation.ftl form definition can be found in gwt-console-server-drools-{version}.war/WEB-INF/lib/drools-gwt-form-{version}.jar/Performance Evaluation.ftl You can add your own forms by adding these to your application classpath (either in the same location or any other location which is included into the application classpath). Kris Quoting sam.squ...@paretopartners.com: Hello, Does anyone know where the form data in Evaluation.bpmn comes from? I am referring to the dropdown list and the checkboxes in the displayed form from the gwt-console. They do not seem to come from Evaluation.bpmn itself. Are they inserted into the H2 database? If so, where and when? Sam Squire This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] GWT Console and WSHT Rendering
Sam, Yes, exactly like you said, if you use the FreeMarker templates, you have access to the task variable and the content, which is whatever you want it to be. If your content is a Map, we also allow access to all the values in the Map by using the key as a variable name (just to simplify your work if you have multiple data for one form. Kris Quoting sam.squ...@paretopartners.com: I have worked it out using the sourcecode. To retrieve variables in forms from your process, you can use two Freemarker variables: - Task is for human task information fields. Take a look at the Task class and the TaskData class to see what you can access from your template.# This way you can also get to your task metadata like: ${task.taskData.createdOn?datetime} would get the date the task was created. - Content is for your own mapped fields. You will have to make a dataInputAssociaton that has the name of Content and use a dataInputAssociation to provide it with a HashMap of the values you want to be available in your template. The HashMap you put into content is accessible by content.keyName from the template. Is this the official way to do it or is there a better way? Thanks. Sam Squire This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How do I persist at every node transition?
The engine will store the state of the process instance at any safe state. This means we won't store the state while we're still in the middle of processing it (as that means the state is still changing), but only once we're done processing that one trigger. So if you have a synchronous process that executes synchronously from start to finish based on a trigger, it doesn't really make sense to store the state after each node, as you can easily restore later by replaying the trigger. As soon as you start using asynchronous or stateful processes, the process instance state is stored once it reaches that wait state. You can always restore by restoring the previous state and reapplying the same trigger so you continue exactly where you left off last time. Kris Quoting kirakane kirak...@gmail.com: I setup JPA persistence using a MySQL DB and the BTM transaction manager as a stand alone J2SE application. I'm trying to setup to be able to continue from the last transition on a workflow if a process dies in the middle. I have show sql turned on and I can see the ProcessInstance get saved at the start but not at any of the node transitions. So if I kill the process in the middle or simulate an outage and recover the session using ksession = JPAKnowledgeService.loadStatefulKnowledgeSession( sessionID, kbase, null, env ); the process restarts from the very beginning which is not the behavior I desire. For example for the RulesFlow Start-A-B-C-End and the server dies in B I would like the process to pickup from B. How do I get this behavior? Log: -- create jpa backed stateful ksession Hibernate: insert into SessionInfo (lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (?, ?, ?, ?) Oct 18, 2010 10:56:14 AM bitronix.tm.twopc.Preparer prepare WARNING: executing transaction with 0 enlisted resource SESSIONID:80 Object Persisted Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=? Starting Process... Hibernate: insert into ProcessInstanceInfo (externalVariables, lastModificationDate, lastReadDate, processId, processInstanceByteArray, startDate, state, OPTLOCK) values (?, ?, ?, ?, ?, ?, ?, ?) Hibernate: update ProcessInstanceInfo set externalVariables=?, lastModificationDate=?, lastReadDate=?, processId=?, processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where InstanceId=? and OPTLOCK=? Hibernate: insert into EventTypes (InstanceId, element) values (?, ?) Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=? Fire All Rules... Created Status:VirusScanStatus [count=0, status=null, unquarantineCount=0] Hibernate: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ where ? in (select eventtypes1_.element from EventTypes eventtypes1_ where processins0_.InstanceId=eventtypes1_.InstanceId) Hibernate: select processins0_.InstanceId as InstanceId1_0_, processins0_.externalVariables as external2_1_0_, processins0_.lastModificationDate as lastModi3_1_0_, processins0_.lastReadDate as lastRead4_1_0_, processins0_.processId as processId1_0_, processins0_.processInstanceByteArray as processI6_1_0_, processins0_.startDate as startDate1_0_, processins0_.state as state1_0_, processins0_.OPTLOCK as OPTLOCK1_0_ from ProcessInstanceInfo processins0_ where processins0_.InstanceId=? In virus scanner:DocumentId [doc_id=THIS IS A DOCUMENT ID 1234] did the scan:VirusScanStatus [count=1, status=success, unquarantineCount=0] Hibernate: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ where ? in (select eventtypes1_.element from EventTypes eventtypes1_ where processins0_.InstanceId=eventtypes1_.InstanceId) remove from quarentine:DocumentId [doc_id=THIS IS A DOCUMENT ID 1234] Hibernate: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ where ? in (select eventtypes1_.element from EventTypes eventtypes1_ where processins0_.InstanceId=eventtypes1_.InstanceId) VirusScanStatus [count=1, status=failed, unquarantineCount=1] sleeping:1000 Hibernate: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ where ? in (select eventtypes1_.element from EventTypes eventtypes1_ where processins0_.InstanceId=eventtypes1_.InstanceId) Hibernate: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ where ? in (select eventtypes1_.element from EventTypes eventtypes1_ where processins0_.InstanceId=eventtypes1_.InstanceId) entering state remove from quarentine:DocumentId [doc_id=THIS IS A DOCUMENT ID 1234] Hibernate: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ where ? in (select eventtypes1_.element from EventTypes eventtypes1_ where
Re: [rules-users] GWT Console and WSHT Rendering
Forms are separately created using a template-based approach and looked up from the application classpath based on the task name. In this case, the Performance Evaluation.ftl form definition can be found in gwt-console-server-drools-{version}.war/WEB-INF/lib/drools-gwt-form-{version}.jar/Performance Evaluation.ftl You can add your own forms by adding these to your application classpath (either in the same location or any other location which is included into the application classpath). Kris Quoting sam.squ...@paretopartners.com: Hello, Does anyone know where the form data in Evaluation.bpmn comes from? I am referring to the dropdown list and the checkboxes in the displayed form from the gwt-console. They do not seem to come from Evaluation.bpmn itself. Are they inserted into the H2 database? If so, where and when? Sam Squire This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Can Drools Flow Persistence Work without JTA
Yes, we made the transaction manager pluggable, with a default implementation for JTA and Spring. You can take a look at the drools-persistence-jpa module, there is a org.drools.persistence.session.TransactionManager, that is the interface you would have to implement, with the org.drools.persistence.session.JtaTransactionManager as a sample implementation. Kris Quoting Rui Tang tangrui...@gmail.com: Hi list, According to the documents and some test cases, I found that Drools Flow persistence examples have to work with JTA to enable transaction management. Is there some way to not use JTA as my transaction manager? -- åç¿ Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rule tasks and gwt-console
Juan, By default the gwt-console server instantiates one session that is reused for executing all process instances. This is however just one possible architecture. I think you can easily adapt the current code (take a look at DroolsFlowCommandDelegate in the drools-gwt-console module). 1) register the session that is created (or a registry of sessions) for example to JNDI 2) use a session registry to create one session per process instance and look up or create the session on request. If you would try to make the existing code more powerful so it can be configured / instantiated in different setting, we would gladly accept this and add to the project ;) Kris Quoting Juan Ignacio Barisich juan.baris...@fluxit.com.ar: Hello, I'm working with the gwt-console, and I have two questions: 1) How to get access and add facts the knowledge session ? 2) Is there only one knlowledge session for all the process instances ? I have a process with a Rule Task node. Within the rule I have to access to the process variables. So, I want to add the process instance to the knlowledge session. Then, the rule (in this consecuence) inserts a fact to the knowledge session, so a later gateway can take a desicion rule-based. But, is there only one knlowledge session for all the process, this logic will fail. In this way, it would be better to have one knowledge session instance per process instance. Thanks in advance. -- *Juan Ignacio Barisich* juan.baris...@fluxit.com.ar www.fluxit.com.ar 53 n366, piso 9 La Plata / Buenos Aires / Argentina (54)-221-427-5781 int:308 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow Events Not Working
Hi, The process instance should automatically be reconnected to the session (= working memory) when it is reloaded from the database. It is a little unclear however, from you stacktrace, how you get a reference to your process instance after it has been restored. Particularly: org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent (WorkflowProcessInstanceImpl.java:346) at com.my.poc.PocFlowServiceImpl.processFlow(PocFlowServiceImpl.java:120) Could you share how this PocFlowServiceImpl class gets the process instance it then tries to signal? Does it retrieve the session from the session? Or does it keep a reference from before? Kris - Original Message - From: jawa ago...@gmail.com To: rules-users@lists.jboss.org Sent: Friday, September 10, 2010 7:17 PM Subject: [rules-users] Drools Flow Events Not Working Hi, I am using drools flow 5.1.1 with JPA. I want my flow to stop at a certain point so I use an AND node with one incoming RuleGroup node and one incoming Event node. so as AND guarantees that It executes after both of the nodes are completed. So my flow stops there. Then i load the session from db and use following to raise an event on the session: StatefulKnowledgeSession session = JPAKnowledgeService.loadStatefulKnowledgeSession(9,knowledgeBase, null, environment); ProcessInstance p = session.getProcessInstance(9); System.out.println(Proc Found - + p); if (p != null p.getState()==ProcessInstance.STATE_ACTIVE) { p.signalEvent(Test, vo); } But it fails with following exception: Exception in thread main java.lang.NullPointerException at org.drools.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.getWorkflowProcess(WorkflowProcessInstanceImpl.java:185) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:346) at com.my.poc.PocFlowServiceImpl.processFlow(PocFlowServiceImpl.java:120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69) at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73) at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72) at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_20004366.invoke(InvocationContextInterceptor_z_fillMethod_20004366.java) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88) at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_20004366.invoke(InvocationContextInterceptor_z_setup_20004366.java) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.tx.StatelessBMTInterceptor.handleInvocation(StatelessBMTInterceptor.java:106) at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68) at
Re: [rules-users] ProcessEventListener event order
Carlos, We are explicitly sending out before and after events to make sure you can figure out which events are the result of what other events. This allows us to recreate a tree-view of events (e.g. see the audit logger). The order you are seeing is normal, let me try to explain. If you have a sequence of 2 nodes, the events generated by this will be: beforeNodeTriggered A beforeNodeLeft A beforeNodeTriggered B ... afterNodeTriggered B afterNodeLeft A afterNodeTriggered A Since execution is synchronous (unless you are using async nodes), this means that the after event will only occur once the thread of control returns back to that node, so after all following sync nodes have been executed. You can get your expected behaviour by logging on beforeNodeTriggered and beforeNodeLeft. Kris Quoting Carlos Villegas c...@uniscope.jp: Hi, I'm testing the ProcessEventListener on a simple process and I get the after events in reverse order. For example, Process completed : 1283915643204 Node left: 5: 1283915643268 Node triggered: 5: 1283915643268 Node left: 4: 1283915643268 Node triggered: 4: 1283915643269 Node left: 3: 1283915643269 Node triggered: 3: 1283915643270 Node left: 2: 1283915643270 Node triggered: 2: 1283915643270 Node left: 1: 1283915643270 Node triggered: 1: 1283915643271 Node left: 0: 1283915643271 Node triggered: 0: 1283915643271 Process started : 1283915643271 I'm just printing the node id and the time in milliseconds. Is this the way is supposed to be? I guess technically after could be anytime after, but if I use the afterProcessStarted event, I get it after the whole process has completed!, which it's not useful at all. The before events work as expected I think. I'm using Drools Flow 5.1.0. Thanks, Carlos ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] WorkItem - meaning of abortWorkItem
The difference is that the workitem is set to state aborted instead of completed. And you could for example access the work item state in an on-exit action on the work item and do something in that case (throw an exception, set a process variable). It is correct however that the process continues, regardless of whether you completed or aborted the work item. This is actually something that we have foreseen as a future extension but is not yet implemented in the editor: I would like to make it possible to have a separate outgoing connection for when the work item has been completed. This would then allow you to specify a path that needs to be followed when the work item has been aborted. But we need support for that in the editor before being able to do that. So for now, I would suggest sticking to complete, and simply pass any information using the result parameters, either normal completion information or error information. You can then map this info to process variables and use anytime further in the process. Kris Quoting jschmied nab...@juergenschmied.de: Hi! I implemented a workitem an I call completeWorkItem/abortWorkItem depending on the success of the work. The workflow goes on, nevertheless what I call. How can I handle abortWorkItem in my process? This function is not documented. Thanks juergen (cu at JUDCon in Berlin) -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/WorkItem-meaning-of-abortWorkItem-tp1439653p1439653.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools FLow Persistence and Sessions
You yourself can decide how many sessions you want. Sessions are rather lightweight (so yes, you could simply create a new session for each process instance) and simply act as an independent processing unit. So then the question is, how many sessions do you normally need? Well, simple applications can easily run with only one session. So all process instances simply run in the same session. If your application scales or you have multiple applications, you could decide to create separate sessions, for example for scalability reasons or simply for making sure they work independently. In some cases (for example when you want to make sure process instances don't influence each other unexpectedly or your process instances don't really run centralized but rather locally embedded in your application), creating a new session for each instance is valid as well. Regarding persistence, multiple sessions can write to the same database, or you can configure your sessions to write to different databases as well. All up to your preferences. Kris Quoting Chrystall, Greg gchryst...@nds.com: Hi, When using persistence what is the best approach to creating sessions? I can resume a session if the service was shutdown based on the session ID, but how often should I be creating new sessions? Can I have multiple sessions writing to the same database? Any guidance appreciated. Greg ** 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 ** Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Question about BPMN2 and Drools
Cristiano, Drools Flow allows you to run executable BPMN2 processes. The example you are showing is actually a choreography, which describes the interaction between different actors, in this case probably a human actor using some kind of (web) application to send / receive data and an auctioning service. You probably then want to automate a part of that choreography (in this case the auctioning service). The most common approach is probably to generate an executable process for that part that you want to automate. You then probably have to add the necessary details to make the process executable, as the choreography usually only focuses on the communication between the actors and does not include the internal actions that need to be performed. Once you have completed this executable process, you can execute it on the Drools Flow engine. Your (web) application simply communicates with the engine by sending / receiving data, and the execution of the auctioning service is handled by the engine. By the way, if you're interested in the entire life cycle from requirements / choreography all the way to implementation and runtime validation, you might want to take a look at the Savara project as well. While this does not yet include automatic generation of BPMN2 executable models, this is something we're definitely going to be looking at. http://www.jboss.org/savara Hope this clears it up a bit ! Kris Quoting Cristiano Gavião cvgav...@gmail.com: Hi Mark, I'll investigate more... and maybe in future if my little knowledge allow me I could contribute with something ;-) But for now I need to learn more, because I'm a bit confused... :-[ I'm investigating to use Flow in a next project and I would like to know... and just to minimize future reworks... Could you tell me how could be the best way to implement this example (http://blog.bpmn.info/wp-content/uploads/2008/10/chor1.png) using Drools today ? cheers Mark Proctor escreveu: On 03/09/2010 22:48, Cristiano Gavião wrote: Hi, I'm investigating the new Oryx editor... I'm delighted with it. It's a such nice work :-) and I would like to know how will Drools to address BPMN2 diagrams with more than one pool/ swimlanes. Something like this: http://blog.bpmn.info/wp-content/uploads/2008/10/chor1.png, will be runnable by Drools flow and editable at eclipse editor? both are a work in progress, we'll keep improving them and adding more features. The more community members that get involved, the faster it'll happen :) Mark thanks cheers Cristiano ___ 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow inconsistancies
Paul, Do you use the same KnowledgeBuilder for adding all your processes to the KnowledgeBase? That should make sure that any potential conflict in generated java classes is resolved automatically. Kris - Original Message - From: paulB paul.bor...@sironahealth.com To: rules-users@lists.jboss.org Sent: Wednesday, August 18, 2010 7:03 PM Subject: Re: [rules-users] Drools Flow inconsistancies Thanks, Alan. My problem was slightly similar. I found that the generated classes and methods for the returnValueEvaluators (and other generated classes/methods) were being overwritten for every process in the same package. Thus, the last compiled process in my changeset for a given package worked fine, and the preceding processes were exhibiting the strange behavior. The reason it worked on my local machine was due to the fact that I was only debugging with one process in my changeset. A workaround for this is to have every process in a different package. But this makes me believe there is something still very wrong, here. I have yet to determine if this is an issue in the trunk or 5.1, or if it's simply something in my local configurations and/or loaded classes. I may drill further to determine that. I would highly recommend these debugging tools and parameters to anyone trying to debug a server side issue with these generated classes: drools.dump.dir http://blog.athico.com/2008/02/looking-under-drools-skirt.html Eclipse Remote Debugging http://www.eclipsezone.com/eclipse/forums/t53459.html Cheers. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-inconsistancies-tp862p1209881.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Instructions for upgrading designer.war?
Han Ming, Here is the full list of changes that were made to the original war that is located here: http://www.intalio.org/public/maven2/com/intalio/bpms/web/designer/1.0.0.010/ Note that most of the changes in the src dir (as described below) were to get the import/export functionality of Oryx working. If you're serious about helping out, just let me know, there is lots you could help with, like improving the import/export for other cases, maybe updating to the BPMN 2.0 beta 2 format, etc. Kris -- Changes -- unzip in deploy folder, in folder designer.war in WEB-INF/web.xml, enable tomcat settings for DirectoryListingServlet removed WEB-INF/lib/javax.servlet-*.jar added slf4j-api and slf4j-jdk14 to WEB-INF/lib remove console.log statement from oryx.js replace enterprise-repository in oryx.js with drools-guvnor moved designer.war/lib/bpmn2 to designer.war/WEB-INF/lib/bpmn2 small fragment in oryx.js in construct of ORYX.Editor for setting id as uuid remove oryx_editor_header init + ref from Oryx.js Replace some BPMN2 import/export classes in WEB-INF/classes: de/hpi/bpmn2_0/model/FlowElement.java de/hpi/bpmn2_0/model/activity/Task.java de/hpi/bpmn2_0/model/activity/type/BusinessRuleTask.java de/hpi/bpmn2_0/model/activity/type/ReceiveTask.java de/hpi/bpmn2_0/model/activity/type/SendTask.java de/hpi/bpmn2_0/model/activity/type/UserTask.java de/hpi/bpmn2_0/model/activity/type/ManualTask.java de/hpi/bpmn2_0/model/activity/type/ScriptTask.java de/hpi/bpmn2_0/model/activity/type/ServiceTask.java de/hpi/bpmn2_0/model/diagram/BpmnNode.java de/hpi/bpmn2_0/model/gateway/ComplexGateway.java de/hpi/bpmn2_0/model/gateway/ExclusiveGateway.java de/hpi/bpmn2_0/model/gateway/InclusiveGateway.java de/hpi/bpmn2_0/model/gateway/EventBasedGateway.java de/hpi/bpmn2_0/model/gateway/Gateway.java de/hpi/bpmn2_0/model/gateway/ParallelGateway.java de/hpi/bpmn2_0/transformation/BPMN2DiagramConverter.java de/hpi/bpmn2_0/model/gateway/Diagram2BpmnConverter.java org/oryxeditor/server/EditorHandler.java org/oryxeditor/server/diagram/JSONBuilder.java - Original Message - From: Han Ming Low To: rules-users@lists.jboss.org Sent: Wednesday, August 04, 2010 12:09 PM Subject: [rules-users] Instructions for upgrading designer.war? Hi, I understand that the designer.war is a project by intalio. When looking at the source for the war at http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/designer-src.war, I saw the changes to be made to make it compatible with Drools. I think I can do some of the steps like 1) changing the web.xml to use tomcat instead of jetty 2) added slf4j library 3) move lib/bpmn2 library to web-inf/lib 4) changes to oryx.js that involve - commenting out the header - commenting out the log - change the repository url from /designer/uuidRepository?uuid=+ uuid to /drools-guvnor/org.drools.guvnor.Guvnor/guvnorAPI?action=loaduuid=+ uuid However, I'm not sure what is the BPMN2 import/export classes to replace in WEB-INF/classes Can someone could tell me which are the classes? I can also help to update the designer. :) Thanks. Han Ming -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5 for process simulation
Jonathan, Drools supports a simulated clock (unified for rules and processes), so this should allow you to build a simulator. The code that Mark is referring to is just something built on top that allows you to define a simulation as a sequence of commands that are sent to the session at specific time points etc. You could try to reuse this as is if it would be useful in your case, or simply try to do something similar. In any case, there shouldn't be any technical difficulties that should prevent you from doing something like you described I think (just not all out-of-the-box). Kris - Original Message - From: Labin, Jonathan W. To: Rules Users List Sent: Wednesday, August 04, 2010 7:22 PM Subject: Re: [rules-users] Drools 5 for process simulation Mark, Thanks for the link. I'll look into it. I'm not sure I'll have time to learn enough about Drools to actually modify it for this project. Do you think it's not practical to attempt to build a simulator without modifying Drools? Thanks, Jonathan From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mark Proctor Sent: Wednesday, August 04, 2010 11:33 AM To: rules-users@lists.jboss.org Subject: Re: [rules-users] Drools 5 for process simulation On 04/08/2010 16:20, Labin, Jonathan W. wrote: Drools users, I am currently researching Drools 5 as a potential toolkit to enable my nextproject. I have read through the Documentation for Drools Expert, Flow andskimmed through Fusion and I believe that Drools looks it provides manyfeatures we need. However, I am concerned about one aspect of the way thatthe system seems to operate and was wondering if anyone could point me to asection of documentation (chapter of the manual / wiki / external how-toblog post... whatever) that will clear things up for me. I would like to use Drools Flow to define behaviors of agents as FlowProcesses to create an agent-based simulation. This application requiresthat the processes are kept synchronized with each other by a simulated(faster than real time) clock. Is there a Drools mechanism that enables this? Would I need to create a setof WorkItemHandler classes that perform the synchronization manually? Iswhat I want to do not really practical within the Drools Flow framework?I have something prototyped and it works, but I need to refactor the api and make it much simpler. so if you use it, expect it to change a lot and get a lot simpler and better :) http://blog.athico.com/2009/07/drools-simulation-and-test-framework.html Mark Thanks in advance, Jonathan Labin ___rules-users mailing listrules-us...@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Edit global imports through eclipse plugin
Imports are always defined globally (i.e. at the process level). So simply opening up any expression editor and adding the imports there should allow you to add imports. Kris - Original Message - From: drooRam rajeshr...@yahoo.com To: rules-users@lists.jboss.org Sent: Thursday, August 05, 2010 8:24 PM Subject: [rules-users] Edit global imports through eclipse plugin how can i edit global imports in workflow rf file through eclipse plugin... not manually... I would like to add global imports to workflow file through eclipse ?? -drooRam -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Edit-global-imports-through-eclipse-plugin-tp1027368p1027368.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] MinaTaskClientHandler Reference Object
Why do you need that specific client? I think you should just create your own client if you want to do operations like complete and claim? Kris - Original Message - From: drooRam rajeshr...@yahoo.com To: rules-users@lists.jboss.org Sent: Thursday, August 05, 2010 8:05 PM Subject: [rules-users] MinaTaskClientHandler Reference Object How can I obtain reference to MinaTaskClientHandler through drools config tags? I mean .. we have drools:kbase tag for KnowledgeBase...similarly, do we have anything for MinaTaskClientHandler... I basically need to call the methods, TaskClient.claim, TaskClient.complete etc thro MinaTaskClientHandler.getClient(). Please let me know how can i obtain MinaTaskClientHandler thro config or snippet ? -drooRam -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/MinaTaskClientHandler-Reference-Object-tp1027255p1027255.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools IDE Update site link for 5.1 CR1
We don't really expose an update site, but you can simply download the eclipse artefact and unzip in your eclipse folder. Since Drools is also part of JBoss Tools, you can use the nightly builds to get the latest snapshot release as well. http://www.jboss.org/tools/download/ Kris - Original Message - From: drooRam rajeshr...@yahoo.com To: rules-users@lists.jboss.org Sent: Friday, July 30, 2010 4:49 PM Subject: [rules-users] Drools IDE Update site link for 5.1 CR1 Do we have Drools IDE update site link for the candidate release version 5.1 CR1??? ( could be a silly question, but i am not sure how to update the eclipse plugin for 5.1 without downloading manually) -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-IDE-Update-site-link-for-5-1-CR1-tp1009065p1009065.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 401 error when attempting to get PKG for changeset.
Stephen, Something like this: 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/defaultPackage/LATEST' type='PKG' basicAuthentication=enabled username=admin password=admin / /add /change-setKris - Original Message - From: Stephen Mcgruer s0840...@sms.ed.ac.uk To: rules-users@lists.jboss.org Sent: Wednesday, July 28, 2010 1:09 PM Subject: [rules-users] 401 error when attempting to get PKG for changeset. I have the following changeset: 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:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/TEST/v0.1' type='PKG' / /add /change-set I just updated to the RC of Guvnor, and my PKG address now demands a username and password when I try and access it. Anything works, which is fine, but how do I edit the changeset so that it gives the details? At the moment when I run my Java WAR it just moans that it gets a 401 from that URL... Thanks! -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] GWT Console - Drools Flow problems.
Tom, The first error is simply because you don't have a human task server running (so it can't find any human tasks). Some info on starting the human task service can be found here: http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch.Human_Tasks.html#d4e1215 Have you maybe tried the installer? That should allow you to setup an environment (including eclipse, human task service, guvnor and gwt-console). Check the readme inside for more details how to: http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/drools-5.1.0.SNAPSHOT-install.zip The second is probably related to the same issue. Regarding the missing ProcessEnginePlugin, you can ignore that, that is normal. Kris - Original Message - From: tom ska To: rules-users@lists.jboss.org Sent: Tuesday, July 27, 2010 10:24 AM Subject: [rules-users] GWT Console - Drools Flow problems. Hello, I am trying to use Drools Flow with GWT Console v.2.1. I use Guvnor and Eclipse too. I am new in server applications, and jBoss is for me something new, so please be patient :) What I did are: 1.)Creating processes in Eclipse. They work. 2.)Exporting them to Guvnor - I can see them, everything is OK. Then I try to start GWT-Console. When I log in, I get this: a.. URL: 'http://localhost:8080/gwt-console-server/rs/tasks/admin' b.. Action: 'org.jboss.bpm.console.client.task.LoadTasksAction' c.. Exception: 'class com.google.gwt.http.client.RequestException' HTTP 500: HTTP Status 500 - -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalArgumentException: Could not connect task client org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319) org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) root cause java.lang.IllegalArgumentException: Could not connect task client org.drools.integration.console.DroolsFlowTaskManagement.connect(DroolsFlowTaskManagement.java:43) org.drools.integration.console.DroolsFlowTaskManagement.getAssignedTasks(DroolsFlowTaskManagement.java:112) org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:99) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166) org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)note The full stack trace of the root cause is available in the JBoss Web/2. When I click on Process Overwiev, I get: a.. URL: 'http://localhost:8080/gwt-console-server/rs/process/definitions' b.. Action: 'org.jboss.bpm.console.client.process.UpdateDefinitionsAction' c.. Exception: 'class
Re: [rules-users] Exception when use Human Task
It doesn't seem to be able to find a query, which should be defined in the orm.xml. Do you have the orm.xml file in your META-INF folder on your classpath? http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-process/drools-process-task/src/main/resources/META-INF/orm.xml Kris - Original Message - From: XiaoMiTang dingyongch...@hotmail.com To: rules-users@lists.jboss.org Sent: Tuesday, July 27, 2010 11:06 AM Subject: [rules-users] Exception when use Human Task I got an exception when using Human Task ,caused by the following code: ===code=== EntityManagerFactory emf = Persistence.createEntityManagerFactory(); TaskService taskService = new TaskService(emf,SystemEventListenerFactory.getSystemEventListener()); ===code end=== the error info in the Eclipse's Console llike this: ===error info= 严重: Unsuccessful: create table Notification_EmailNotificationHeader (Notification_id numeric(19,0) not null, emailHeaders_id numeric(19,0) not null, mapkey varchar(255) null, primary key (Notification_id, mapkey), unique (emailHeaders_id)) 2010-7-27 16:39:38 org.hibernate.tool.hbm2ddl.SchemaExport create 严重: 无法在表 'Notification_EmailNotificationHeader' 中可为 Null 的列上定义 PRIMARY KEY 约束。 2010-7-27 16:39:38 org.hibernate.tool.hbm2ddl.SchemaExport create 严重: Unsuccessful: alter table Notification_EmailNotificationHeader add constraint FK92169CC0379F97EA foreign key (emailHeaders_id) references EmailNotificationHeader 2010-7-27 16:39:38 org.hibernate.tool.hbm2ddl.SchemaExport create 严重: 找不到对象 Notification_EmailNotificationHeader,因为它不存在或者您没有所需的权限。 2010-7-27 16:39:38 org.hibernate.tool.hbm2ddl.SchemaExport create 严重: Unsuccessful: alter table Notification_EmailNotificationHeader add constraint FK92169CC01B1E66DC foreign key (Notification_id) references Notification 2010-7-27 16:39:38 org.hibernate.tool.hbm2ddl.SchemaExport create 严重: 找不到对象 Notification_EmailNotificationHeader,因为它不存在或者您没有所需的权限。 2010-7-27 16:39:38 org.hibernate.tool.hbm2ddl.SchemaExport execute 信息: schema export complete java.lang.IllegalArgumentException: Named query not found: UnescalatedDeadlines at org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:108) at org.drools.task.service.TaskService.init(TaskService.java:65) at org.drools.task.service.TaskService.init(TaskService.java:48) at com.demo.action.loginController.HumanTask(loginController.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:174) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at
Re: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object
Vijay, I've taken a look and you are correct, the work item object should not be reset on completion as that way, listeners or on-exit actions might not have access to it anymore. I've used another approach to solve the issue that resulted in me adding this reset to -1. Let me know if this works for you using the latest trunk (r34218, JBRULES-2598). Kris - Original Message - From: Vijay K Pandey To: Rules Users List Sent: Wednesday, July 21, 2010 5:28 PM Subject: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object Hi @Salaboy, Did you get a chance to look into this? Thanks Vijay From: Vijay K Pandey Sent: Thursday, July 15, 2010 1:26 PM To: 'rules-users@lists.jboss.org' Subject: FW: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object Hi @Salaboy, I am not sure if you received the email below. Thanks for looking into this. Vijay From: Vijay K Pandey Sent: Tuesday, July 13, 2010 8:53 AM To: 'Mauricio Salatino' Subject: RE: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object Thanks for a quick response. I added the Transaction Manager piece of code but the problem still persists. Also it uses the attached persistence.xml file which is placed under META-INF directory that has the correct transaction manager look up class. Thanks Vijay From: Mauricio Salatino [mailto:sala...@gmail.com] Sent: Tuesday, July 13, 2010 6:40 AM To: Vijay K Pandey Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object I've just take a quick look to your file and I notice (without running it) that you didn't set the TransactionManager property to your Environment: env.set( EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager() );You also need to have the reference to bitronix inside your persistence.xml file: property name=hibernate.transaction.manager_lookup_class value=org.hibernate.transaction.BTMTransactionManagerLookup/ Can you try this and let me know if it fix your problem? Greetings On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey vpan...@mdes.ms.gov wrote: Thanks Salaboy for looking into this. Here is the Junit Test case(java file attached) I created for this problem. Line # 129 fails. Please do let me know if I am doing something wrong or the fix has some issues or maybe there is some other way out to get hold of the WorkItem object in the process event listener. Thanks Vijay From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Salaboy Sent: Friday, July 09, 2010 11:11 AM To: Rules Users List Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object I would like to take a look on this issue. Can you provide me a test case that show the problem? - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jbug.com.ar - Mauricio Salaboy Salatino - On Jul 9, 2010, at 12:43, Vijay K Pandey vpan...@mdes.ms.gov wrote: I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the correct behavior? If yes how do we get hold of WorkItem instance in the attached listeners? http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801r2= Thanks Vijay From: Vijay K Pandey Sent: Tuesday, June 15, 2010 9:20 AM To: 'Rules Users List' Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object Any one on this issue? Any Drools Flow expert? Appreciate your time for taking a look at it. Thanks Vijay From: Vijay K Pandey Sent: Thursday, June 10, 2010 12:03 PM To: 'Rules Users List' Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object Should I log this as a JIRA ticket. Thanks Vijay From: Vijay K Pandey Sent: Wednesday, June 09, 2010 9:57 AM To: 'Rules Users List' Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object Hi, There is a change done in Drools 5.1.0.M2 - org.drools.workflow.instance.node.WorkItemNodeInstance class in the method public void triggerCompleted(WorkItem workItem) at line 196 which is setting the workItemId as -1 this.workItemId = -1; Due to the above change the listeners which are attached to the complete event of
Re: [rules-users] Drools Flow - users authentication.
There's a small section in the documentation about this: http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch14.html#d4e2489 If you use the installer, these files will be in the auth directory where you can then customize them. Sample files can be found here: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/install/auth/ Kris - Original Message - From: tom ska To: rules-users@lists.jboss.org Sent: Monday, July 26, 2010 11:47 AM Subject: [rules-users] Drools Flow - users authentication. Hello, I want to try Drools Flow software (Eclipse plugin works). I have installed Guvnor. Then I have installed console (two wars). I type http://localhost:8080/gwt-console/app.html in my web browser. Then I get a dialog, and I have to authenticate. But I don't know default Username and Password. As far as I know, I have to create a XML file, and manually create a user and his pass... Am I right? I use Drools Flow Console v.2.1. Please help me, and do it slowly and like for no-IT person ;) Thanks, tom. -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how to access process variables within wait statenode timers?
Reto, I think this is because you don't notify the engine when the DroolsTimer object has been changed (using update). You should always notify the engine of any state changes (using update(..) if your rules depend on this state). Otherwise the engine will assume the state is still the same and won't re-evaluate the rules. Kris - Original Message - From: retoy reto.lampre...@allianz-suisse.ch To: rules-users@lists.jboss.org Sent: Monday, July 26, 2010 2:26 PM Subject: Re: [rules-users] how to access process variables within wait statenode timers? Kris, Thanks a lot! It's true that I do have access to process variables if I assign them already when I'm starting the process (passing the value as a parameter of the startProcess() method). In my first code sample above, I assigned the timer variable only in an OnEntry action of the wait state node, which had no effect... (Maybe this is only true for version 5.0 (?)) But anyway my timer with a variable delay still doesn't work as I expected: The process stays in the wait state until my application terminates, although the constraint condition is met after 3 seconds (I print it out each time the timer fires). So it looks as if the constraint condition is not continuously evaluated... although I'm calling context.getProcessInstance().getWorkingMemory().fireAllRules() after every update... do you see a reason for that in this updated small code sample? http://drools-java-rules-engine.46999.n3.nabble.com/file/n996108/demo.variableTimer.v2.zip demo.variableTimer.v2.zip It's interesting that if I don't insert the timer variable into the working memory, the timer even continues firing after my application terminated (since the constraint is never true and the process stays in the wait state)... So inserting it does have some kind of effect on the evaluation of the constraint, simply not immediately. Reto -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/how-to-access-process-variables-within-wait-state-node-timers-tp987504p996108.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how to access process variables within wait state node timers?
Reto, You should have access to process variables and globals in your timer action. There's even a junit test that shows this, testTimerState (last one on link below): http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessStateTest.java Looking at your code, the timer with event seems to generate a NPE simply because the timer variable is null so the action ((DroolsTimer)timer).updateStop(); fails. By the way, if you define timer of type Object with classname the fully qualified classname of DroolsTimer, you won't have to cast it. Kris Quoting retoy reto.lampre...@allianz-suisse.ch: That timer properties can not be changed dynamically is one thing. The other thing is that in the code that is executed each time a wait state timer fires, you seem to have no access to any process variables. Would you agree on this, Kris? If yes, is this planned to change in the future? I guess you could at least implement a wait state that continues after a variable delay if you could access variables in the timer code. Namely by updating some fact in the working memory i.e. influence the rule constraint of the wait state. I also tried signalling an event from within the wait state timer and update the working memory from a subsequent action node where I do have access to process variables. This although didn't work with me because of a strange NullPointerException... In case anyone is interested: Here is a small project with three approaches for a wait state node that continues after a variable delay. Neither of them works, but maybe someone can fix that... Reto http://drools-java-rules-engine.46999.n3.nabble.com/file/n989829/demo.variableTimer.zip demo.variableTimer.zip -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/how-to-access-process-variables-within-wait-state-node-timers-tp987504p989829.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.NoSuchMethodError on every Action node
Reto, This seems to be a conflict with similar actions in different processes overriding each other. I'll take a look at this and try to fix it asap, and keep you updated. Kris Quoting retoy reto.lampre...@allianz-suisse.ch: Hi Kris Here is a small project which demonstrates a similar problem with two actions. Unfortunately i could not reproduce the noSuchMethodError in this setup yet, but i still think the behavior is not as it should be. http://drools-java-rules-engine.46999.n3.nabble.com/file/n986527/demo.action.problem.zip demo.action.problem.zip If both ruleflow packages have the same name and the two ruleflows are added in this order: addRuleFlow(kbuilder, demo.rf); addRuleFlow(kbuilder, subflow.rf); the output is: execute subflow... execute subflow... If the two flows are added in reverse order, the output is: demo ruleflow started... demo ruleflow started... If one of the package names is changed, the output is what I would expect: demo ruleflow started... execute subflow... What do you think about that? Reto -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/java-lang-NoSuchMethodError-on-every-Action-node-tp60886p986527.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Deserialization Error from Designer when Process Opened in Gunvor
Hi, Regarding the designer integration, it is probably important to know that Oryx is still using the BPMN2 beta 1 format, while Drools Flow has already updated to a more recent BPMN2 format. As a result, you probably can't open the processes that are generated by the Drools Flow graphical editor in Eclipse. We do still support the editing and execution of processes using the BPMN2 beta 1 format. So it might probably be best to just: * use the Oryx editor to create a new version of your process and use that in your example * manually change the namespace of your process to the beta 1 namespace and then use the editor (if you use the beta1 namespace, the editor will also save in that format) * manually construct / update to a BPMN2 beta1 file (or look for beta 1 examples in previous milestone releases of Drools Flow). Note that the Oryx integration is still experimental and proof of concept, and we hope to improve this significant once Oryx moves to the BPMN2 final format. Kris Quoting Han Ming hanmin...@gmail.com: Hi, I'm using guvnor build 4173 from the trunk. In addition, I have install the designer web application downloaded from http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/ I have uploaded the Evaluation.bpmn from the install/sample directory However, when I tried to open the Evaluation process in Gunvor, a deserialization error is thrown. I have captured the screenshot at http://img231.imageshack.us/g/oryxerror2.jpg/ and, attached the stacktrace at the end of the mail. Also, there is a small glitch in that the oryx frame does not occupied the whole page on FireFox 3.5.30729. In addition, I notice there is a consistent message in the console (not just in this build) when guvnor is first started that it mention that The serialization policy file was not found and later You may experience SerializationExceptions as a result This is the log I have captured in an earlier installation. I still see it in build 4173 but can't locate it in the logs INFO: guvnorService: ERROR: The serialization policy file '/org.drools.guvnor.Guvnor/8C09DDC749E5C9386FC25E9AAE396D31.gwt.rpc' was not found; did you forget to include it in this deployment? Jul 14, 2010 1:54:02 PM org.apache.catalina.core.ApplicationContext log SEVERE: guvnorService: WARNING: Failed to get the SerializationPolicy '8C09DDC749E5C9386FC25E9AAE396D31' for module 'http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/'; a legacy, 1.3.3 compatible, serialization policy will be used. You may experience SerializationExceptions as a result. Jul 14, 2010 2:02:10 PM org.apache.catalina.core.ApplicationContext log Any help is greatly appreciated. Thanks. Han Ming 2010-07-22 13:37:35,109 ERROR [STDERR] javax.xml.bind.UnmarshalException: unexpected element (uri:http://www.omg.org/spec/BPMN/20100524/MODEL;, local:definitions). Expected elements are {http://schema.omg.org/spec/BPMN/2.0}activityResource,{http://bpmndi.org}activityShape,{http://schema.omg.org/spec/BPMN/2.0}adHocSubProcess,{http://schema.omg.org/spec/BPMN/2.0}association,{http://bpmndi.org}associationConnector,{http://schema.omg.org/spec/BPMN/2.0}boundaryEvent,{http://bpmndi.org}bpmnCompartment,{http://schema.omg.org/spec/BPMN/2.0}businessRuleTask,{http://schema.omg.org/spec/BPMN/2.0}callActivity,{http://schema.omg.org/spec/BPMN/2.0}callConversation,{http://bpmndi.org}callConversationShape,{http://bpmndi.org}calledSubprocessShape,{http://schema.omg.org/spec/BPMN/2.0}cancelEventDefinition,{http://schema.omg.org/spec/BPMN/2.0}choreography,{http://bpmndi.org}choreographyActivityShape,{http://bpmndi.org}choreographyDiagram,{http://schema.omg.org/spec/BPMN/2.0}choreographySubProcess,{http://schema.omg.org/spec/BPMN/2.0}choreographyTask,{http://schema.omg.org/spec/BPMN/2.0}collaboration,{http://bpmndi.org}collaborationDiagr! am,{http://schema.omg.org/spec/BPMN/2.0}communication,{http://bpmndi.org}communicationShape,{http://schema.omg.org/spec/BPMN/2.0}compensateEventDefinition,{http://schema.omg.org/spec/BPMN/2.0}complexBehaviorDefinition,{http://schema.omg.org/spec/BPMN/2.0}complexGateway,{http://schema.omg.org/spec/BPMN/2.0}conditionalEventDefinition,{http://schema.omg.org/spec/BPMN/2.0}conversation,{http://bpmndi.org}conversationDiagram,{http://schema.omg.org/spec/BPMN/2.0}conversationLink,{http://bpmndi.org}conversationLinkConnector,{http://bpmndi.org}dataAssociationConnector,{http://schema.omg.org/spec/BPMN/2.0}dataInput,{http://schema.omg.org/spec/BPMN/2.0}dataInputAssociation,{http://bpmndi.org}dataInputShape,{http://schema.omg.org/spec/BPMN/2.0}dataObject,{http://bpmndi.org}dataObjectShape,{http://schema.omg.org/spec/BPMN/2.0}dataOutput,{http://schema.omg.org/spec/BPMN/2.0}dataOutputAssociation,{http://bpmndi.org}dataOutputShape,{http://schema.omg! .org/spec/BPMN/2.0}dataStore,{http://schema.omg.org/spec/BPM! N/2.0}da
Re: [rules-users] Wait state constriant
Reto, State nodes only support rule constraints. The reason is that a constraint in a wait state should be continuously evaluated (while the state is active), and the only way to do that efficiently is to use a rule for that (as that is basically what a rules engine is good at). I know the docs on the state node are outdated, will be updating this in the next few days, as this was updated as one of the new 5.1 features. For some simple examples, you can currently check out the junit tests though: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessStateTest.java Kris Quoting retoy reto.lampre...@allianz-suisse.ch: Can anyone tell me what's wrong with this wait state constraint? System.currentTimeMillis() = (startWait + 3000) The exception I'm getting ist: [5,33]: [ERR 102] Line 5:33 mismatched input '=' expecting 'then' in rule RuleFlow-Milestone-drools.test.timer-6 but I don't think that is really getting to the heart of the problem... -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Wait-state-constriant-tp986768p986768.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] DroolsFlow with foreach node stops execution of entire flow on empty collection
Ivan, You are correct, if the collection is empty, the process waieds for these elements to complete, even though there are none. I just committed a fix for this on trunk. Now, the for each node continues if the collection is empty (or null). Kris - Original Message - From: vasilievip vasilie...@ukr.net To: rules-users@lists.jboss.org Sent: Monday, July 19, 2010 3:05 PM Subject: Re: [rules-users] DroolsFlow with foreach node stops execution of entire flow on empty collection I've just tried 5.1.M2 - problem still exists. Thanks, Ivan -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/DroolsFlow-with-foreach-node-stops-execution-of-entire-flow-on-empty-collection-tp978149p978416.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Implementing Timers With Drools PersistenceEnabled
Santosh, Based on your description, different processes should be started. Do you have a simple standalone example that shows this behaviour, so I can take a look? If not, using an audit logger might help in determining which rules are fired and which processes are being started. Kris - Original Message - From: santosh mukherjee To: Rules Users List Sent: Tuesday, July 20, 2010 10:03 AM Subject: Re: [rules-users] Implementing Timers With Drools PersistenceEnabled Hi, I have a sample drl file in which I have written multiple rules. For each different rules when get fired I have started different processes. for eg: Rule1 when: some condition then: drools.getWorkingMemory.startprocess(id1); Rule2 when: some condition then: drools.getWorkingMemory.startprocess(id2); But the problem is that only that rule flow process gets fired every time which I have added to builder last. Also it is clear that it goes inside the then clause of Rule2 suppose but then again it starts process with id1. Any help on how to resolve this or why is it happening is welcom, Thanks Santosh Mukherjee On Tue, Jul 13, 2010 at 3:39 AM, nanic23 nani...@hotmail.com wrote: Hi cafebabe, Thanks for your comment. I agree with you that work item ids are database primary keys but in this simple (very simple) case I just decided to harcoded as I know for a fact that the work item id is 1 because that is the only work item and each time I run the test the tables are dropped and recreated. So, there is never more than one row in the workItemInfo table and the only row always has 1 as its id. I could have stored the work item id or a work item object as a variable (like you mentioned) but in this case wouldn't make a difference for the timers. Are timers working for you when you use persistence? I do complete work items by workItem.getId() in all my code (other than this simple example :)). My problem is NOT completing the work item, my problem is triggering timers when persistence is enabled. The timers don't even trigger, thing that should happen before even trying to complete the work item. Thanks, Nick. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Implementing-Timers-With-Drools-Persistence-Enabled-tp923142p961658.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 -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway (Diverge) : Split Node - Priority Does not Work
Vijay, This is a known limitation when using BPMN2. Check out the documentation, that describes which features are implemented already in the BPMN2 implementation: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch13.html Priorities are not yet implemented as it seems the BPMN2 spec simply does not define something like this. If we want to support something like this, we will probably have to define a custom extension (but we didn't do this yet as we wanted to wait until the spec was final before starting to add too much custom extensions). A workaround would be to use mutually exclusive conditions for now ... Kris - Original Message - From: Vijay K Pandey To: rules-users@lists.jboss.org Sent: Wednesday, July 21, 2010 5:45 AM Subject: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway (Diverge) : Split Node - Priority Does not Work Hi All, In the Drools Flow 5.1 latest snapshot , for the node (Gateway (Diverge) : Split Node), somehow priority does not work. If we set some value, lets say 100 and open the process file(BPMN2) again and check the priority - somehow it doesn't retains the priority value and reports the value always as 0. I am trying to make use one of the feature of XOR type node where one of the constraint is always true with the highest priority. I hope my understanding is right. This is what the Drools Flow Doc says: XOR means that exactly one of the outgoing connections will be chosen. The decision is made by evaluating the constraints that are linked to each of the outgoing connections. Constraints are specified using the same syntax as the left-hand side of a rule. The constraint with the lowest priority number that evaluates to true is selected. Note that you should always make sure that at least one of the outgoing connections will evaluate to true at runtime (the ruleflow will throw an exception at runtime if it cannot find at least one outgoing connection). For example, you could use a connection which is always true (default) with a high priority number to specify what should happen if none of the other connections can be taken. Has anyone faced this issue? Thanks Vijay -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.NoSuchMethodError on every Action node
Hi, This indeed seems to be related to a conflict of actions. I assume you are using the same knowledge builder for adding both the main and the sub process (as that is responsible for resolving possible conflicts)? If so, could you provide a simple, standalone example that demonstrates this behaviour so I can take a look? Kris - Original Message - From: retoy reto.lampre...@allianz-suisse.ch To: rules-users@lists.jboss.org Sent: Monday, July 19, 2010 12:45 PM Subject: Re: [rules-users] java.lang.NoSuchMethodError on every Action node I've been struggling with a NoSuchMethodError as well whenever I added any simple Action to my ruleflow: java.lang.NoSuchMethodError: my.package.Process_my_package_0.action0(Lorg/drools/spi/KnowledgeHelper;Ljava/lang/Object;Lorg/drools/spi/ProcessContext;)V at my.package.Process_my_package_0Action0Invoker.execute(Process_my_package_0Action0Invoker.java:21) at org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.executeAction(ExtendedNodeInstanceImpl.java:66) at org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerEvent(ExtendedNodeInstanceImpl.java:45) at org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.internalTrigger(ExtendedNodeInstanceImpl.java:28) at org.drools.workflow.instance.node.EventBasedNodeInstance.internalTrigger(EventBasedNodeInstance.java:30) at org.drools.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:80) at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:111) at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:141) at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:128) at org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) at org.drools.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:111) at org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:16) at org.drools.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:185) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:230) at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1639) at org.drools.process.command.StartProcessCommand.execute(StartProcessCommand.java:46) at org.drools.process.command.StartProcessCommand.execute(StartProcessCommand.java:10) at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:229) at org.drools.process.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:163) In my scenario I have two ruleflows in the knowledge base. One is the subflow of the other one and both contain an action. To localize the cause of the problem, I only started the subflow separately and finally found that the NoSuchMethodError does NOT occur if - the subprocess is added to the knowledge base AFTER the main process. - the two processes don't have the same package name So it seems like there is a name collision. The generated action of the second ruleflow seems to overwrite the generated action of the first one. Since both processes dont just execute the same action after that, but instead the action of the first process is not found, I assume this is a bug... The workaround is to simply use different package names. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/java-lang-NoSuchMethodError-on-every-Action-node-tp60886p978186.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway(Diverge) : Split Node - Priority Does not Work
Santosh, I think you need to add it as part of a META-INF directory inside a source dir. There's a screencast that shows you how to get a simple example working, try following that and let me know if you still have issues with that: http://people.redhat.com/kverlaen/DomainSpecificWorkItem.swf Kris - Original Message - From: santosh mukherjee To: Rules Users List Sent: Wednesday, July 21, 2010 8:54 AM Subject: Re: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway(Diverge) : Split Node - Priority Does not Work Hi, I have added my MyWorkDefinitions.conf and drools.rulebase.conf file in a source folder named resources inside my project. But then also my work items are not showing in the flow editor. Can anybody tell me why this is so? Thanks Santosh Mukherjee. 2010/7/21 Vijay K Pandey vpan...@mdes.ms.gov Hi All, In the Drools Flow 5.1 latest snapshot , for the node (Gateway (Diverge) : Split Node), somehow priority does not work. If we set some value, lets say 100 and open the process file(BPMN2) again and check the priority – somehow it doesn’t retains the priority value and reports the value always as 0. I am trying to make use one of the feature of XOR type node where one of the constraint is “always true” with the highest priority. I hope my understanding is right. This is what the Drools Flow Doc says: XOR means that exactly one of the outgoing connections will be chosen. The decision is made by evaluating the constraints that are linked to each of the outgoing connections. Constraints are specified using the same syntax as the left-hand side of a rule. The constraint with the lowest priority number that evaluates to true is selected. Note that you should always make sure that at least one of the outgoing connections will evaluate to true at runtime (the ruleflow will throw an exception at runtime if it cannot find at least one outgoing connection). For example, you could use a connection which is always true (default) with a high priority number to specify what should happen if none of the other connections can be taken. Has anyone faced this issue? Thanks Vijay ___ 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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow - Human Task
How about simply reusing the human task node for this. Your process is then a simple sequence of 2 human task nodes. You can use the properties of the human task node (like name, description, content and input/output mapping to add the necessary information). Instead of using the default human task service for executing these tasks, you can then just write your own work item handler that notifies your UI when a task is created. Your UI should also notify the handler when a task is completed. Regarding continuing where you stopped last time, this happens automatically. When a work item is encountered, the process will halt until that work item has been completed. You should just keep your session alive, or if you use persistence you can simply restore the state from db as well. Kris - Original Message - From: jawa ago...@gmail.com To: rules-users@lists.jboss.org Sent: Wednesday, July 21, 2010 1:02 PM Subject: Re: [rules-users] Drools Flow - Human Task Hi, Thanks for your reply. What I am trying to do is create a task which needs human input. Like I said above my post that there will be two tasks. One will be 'Ask User a Question', this will let my front end know to display next question to user. We'll have to wait for user's answer and flow should stop here until user answers the question and front end let drools flow know that an answer is received. So I want my flow to continue where it stopped last time which I think I can do with StatefulKnowledgeSession and store it in db? The Other task will be 'Record Answer', this will record answer to db. So I need to write that Ask question handler somehow to let drools flow know to stop at this task and when an answer is received just mark this task as complete and move to next node. Thanks -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Human-Task-tp966015p983956.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Timers' Week :)
I probably missed quite a few emails on the mailing list lately (sorry), but what's the exact problem with timers and persistence (and does it still exist in the latest trunk, as I know various improvements / bug fixes have been applied in the last few weeks as well)? There's a simple test that shows the use of timers and persistence together: testPersistenceTimer() in http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-persistence-jpa/src/test/java/org/drools/persistence/session/PersistentStatefulSessionTest.java If you are having issues, please let me know (and if possible provide a test case like the one above that shows this behaviour ;)) and I'll take a look. Kris - Original Message - From: nanic23 nani...@hotmail.com To: rules-users@lists.jboss.org Sent: Wednesday, July 21, 2010 3:33 PM Subject: Re: [rules-users] Timers' Week :) Hi retov, Given that the timers do not work when using persistence I haven't been able to test the scenario you described. I did test timer behavior when an exception is thrown from within the workItemHandler that has a timer attached to it. And in this case the timer keeps working, that is, it does not stop if you exit workItemHandler abnormally. But remember, this is without persistence enabled. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Timers-Week-tp912807p984236.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools IDE and Eclipse Helios
There were some minor changes necessary to get everything working for Helios, but the latest version should just work. Kris Quoting Mark Kremer m...@without-brains.net: I tried it and I was unable to edit some of the preferences, after searching on Google for a bit I found that the bug is supposedly fixed for Drools 5.1 The version of Drools IDE that you can download through the update site didn't work for though, that's probably because it's the Drools 5.0 version of the Drools IDE On 29-6-2010 15:01, Hitoshi Ozawa wrote: Just wondering if anybody tested using the Drools IDE on Eclipse Helios. H.Ozawa ___ 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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] WorkItemNodeInstance and the on exit action
Chris, Yes, we can only assure you the work item exists between it is triggered and completed (or aborted). So if you want to access any data related to it in an on-exit action or any further part of the process, it's probably best to simply map that data to a process variable. This will make you action code a lot simpler as well. Kris Quoting Chris Raschl c.raschl-mailingli...@dyless.com: Hi Kris, we experienced some troubles with our drools flow integration today (we upgraded to the lastest snapshot) and I found out that is has to do with a fix (see [1]) you commited some time ago. Our problem is, that we access the data submitted by the user to finish a human task in the on exit action of the human task node like this: WorkItemNodeInstance wini = (WorkItemNodeInstance)context.getNodeInstance(); MapString, Object result = (MapString, Object)wini.getWorkItem().getResult(Result); This results in a NPE because the workItemId is set to -1 in the WorkItemNodeInstance before getWorkItem() is called. So getWorkItem() returns null. Is there a better (recommended) way to work with human task data? Maybe using an out-mapping? Thanks, chris [1] http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801r2= ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Debug as within Eclipse
There was an issue where an update in the core prevented the .drl to show up. This should be fixed now, if you try the latest snapshot build. Kris Quoting fsauer fsa...@dsthealthsolutions.com: Hi, I am running 5.1 M2 on Galileo as well and when I create a breakpoint it actually stops but eclipse does NOT bring up the .drl rule source file with the highlighted line as shown in all the examples. The debugger shows a stacktrace into some (generated?) java code but I have no clue how to correlate that with the rule source code? What did I miss? Thanks, Frank -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Debug-as-within-Eclipse-tp66651p949115.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Flow with Rules (RuleFlowGroup): how to shareparameters/facts
Nol, Process variables are local to your process instance. Rules work based on data inserted in the session. So you should probably make sure your process inserts the data in the session at the appropriate time (e.g. using an action that does kcontext.getKnowledgeRuntime().insert(..). Kris - Original Message - From: Nol de Wit nolde...@gmail.com To: rules-users@lists.jboss.org Sent: Wednesday, April 07, 2010 4:32 PM Subject: [rules-users] Flow with Rules (RuleFlowGroup): how to shareparameters/facts (using Flow and Rules 5.0) In a small pilot we are considering to replace part of the work in some of the subprocesses with rules. I can't seem to figure out how to transport the parameters within the flow to the data the rules should act upon. In the Flow-only model, parameters are added as a parametermap at the point the flow is started using: parameterMap.put(report, report); ksession.startProcess(myModule, parameterMap); A 'standalone' rule model is given its data by feeding it some 'facts' using: ksession.insert(report); ksession.fireAllRules(); (..right? Haven't done to much of that, but I believe that is the way it is done) So if I combine Flows and Rules (using RuleFlowGroup), how do I make sure the rules are given the correct data? My data (report) first needs to go through a couple of flow actions, next through an XOR, of which each output is connectedand then after each XOR output contraint a Currently I still use the first option, but the rules don't get fired (the flow is started, and runs untill the RuleFlowGroup). If I add a ksession.fireAllRules() I see no difference. Thanks, Nol ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow: Skipping some LHS evaluations attime of insert
Another alternative would be to use an activation group, that way only one rule of that group will be able to fire. Kris - Original Message - From: Mauricio Salatino To: Rules Users List Sent: Wednesday, April 07, 2010 11:18 PM Subject: Re: [rules-users] Drools Flow: Skipping some LHS evaluations attime of insert you can insert a control object in the first rule that it's activated and fired and add another restriction to the rest of the rules, using that control object. Greetings On Wed, Apr 7, 2010 at 5:06 PM, madchen k.che...@accenture.com wrote: Hi, According to my understanding of Drools Flow, when you insert an object into drools, it tries to match it against all the existing rules and every rule, for which the 'When' clause conditions are met, becomes activated. I was wondering if it was possible, that when an object is inserted into drools, drools stops trying to match that object against the rules once the first rule is activated. Or in other words, drools would go through the list of rules comparing the object with the 'When' clause conditions and then when it finds a rule that matches, it stops going through the rest of the rules for that object. Thanks! Kevin -- View this message in context: http://n3.nabble.com/Drools-Flow-Skipping-some-LHS-evaluations-at-time-of-insert-tp704324p704324.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Logging and BIRT
There is a little bit of documentation about how to create a history log: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch05.html#d0e1593 ... and how to do reporting: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch12.html Kris - Original Message - From: Amit Kumar To: Rules Users List Sent: Thursday, April 08, 2010 6:26 PM Subject: Re: [rules-users] Logging and BIRT Thanks Kris! Where are the docs for this module located. Couldn't find them in javadocs I downloaded. Thanks Amit 2010/4/8 Kris Verlaenen kris.verlae...@cs.kuleuven.be File logging is mostly for testing purposes. If you want to create a history log for reporting, take a look at the drools-bam module. This allows you create a logger that will create history information about the execution of your processes in a database, so that can be used as a data source in your reports. There are also a few sample reports in that module. new WorkingMemoryDbLogger(ksession); Kris - Original Message - From: Amit Kumar To: Rules Users List Sent: Monday, March 29, 2010 5:02 PM Subject: [rules-users] Logging and BIRT Hi Folks, I tried simple logging by using this code KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test); It logs only basic stuff. How can I log rule runtime, etc. Trying to generate a report using BIRT as mentioned here http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html_single/index.html#d0e2353 Thanks in advance, Amit -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more information. ___ 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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ 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
42. 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?] Yes 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. I believe the first option (explicitly creating an entry in a table that maps all these ids) will be easier. The second approach (persisting as process variables) is also possible but: - could result in conflicts (variables containing ids being overridden) if you have multiple tasks - there's no clean api to support automatic retrieval of a process instance based on variable values - performance of the first approach will be better I think 5. As to documentation... Documentation is always difficult as it takes a lot of time to write, and as a developer I usually make assumptions and don't see the issues new users are faced with. Was thinking about creating a new policy: for every question I answer on the mailing list or irc, the user that I helped should try to improve the documentation so that the next user will find it easier to do the same ;) Kris Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ 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???
The main problems I see when translating a java exception to a process exception automatically: - the exceptions are too low level, no business user understands NumberFormatException or ClassCastException, and the error could come from deep inside the invoked service - by making it automatic, the user is not forced to think about it and thus might forget about it, so you might end up with aborted process instances (default behaviour if no exception handler can be found) and the user won't even notice - the handler is actually the link between the process engine and the environment, I see it as a contract between the two, and what data is exchanged (input/output) is defined It is trivial to simply create an AbstractWorkItemHandler that would transform a Java exception to a process fault with the same name. If you want this as the default behaviour, I suggest you do that. But if we build this into the framework, it will be more difficult to change it if you don't want this behaviour (and we try to keep the maximum flexibility possible). Kris If every workitem needs to have a try / catch block, just to make sure that all possible exceptions are handled gracefully, would not that be a framework concern to have a mechanism that _converts_ these exceptions to some return error parameters (just contemplating here) OR to allow a workitem node to take an ExceptionHandler that would signal an event or convert it to the result parameter, etc..? I understand that you are coming from the fact that Java Exceptions are too low level, and are not Process Exceptions, but they really are :) [something went kaboom within the _Process_] just need to be converted to ones, and it would be a natural concern for a Java framework. One custom approach that I am thinking about so far is to wrap all workitems with AfterThrowing advice to do just that, but again this rather feels like a work around. Thank you, /Anatoly P.S. By the way, would be cool to address real Java Exceptions (no matter what the approach is) in Exception Handling section of the documentation :) -- View this message in context: http://n3.nabble.com/How-to-do-Exception-Handling-tp689387p707668.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] errors with GWT-console
Guvnor was changed recently to add authentication when downloading packages. The console was not yet updated for this in 5.1.0.M1, so you'll need to update to the latest trunk. Luckily, there's now also an installation script that should simplify things as well. Take a look at http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/install/readme.txt Kris - Original Message - From: laurence vignollet To: rules-users@lists.jboss.org Sent: Friday, April 09, 2010 2:25 PM Subject: [rules-users] errors with GWT-console I am a new to Drools Flow, guvnor, and GWT-console-server-drools. I am trying to deploy Gwt-console-server and to get a process running in it. I am using Drools 5.1.0.M1, JBoss-AS 4.2.3.GA. I have followed all the instruction in the Drools Flow 5.1.0 Documentation, the chapter about Console. When I start the aplication server I get the following errors: 10:31:16,957 INFO [TomcatDeployer] deploy, ctxPath=/gwt-console-server, warUrl= .../deploy/gwt-console-server-drools-5.1.0.M1.war/ 10:31:17,275 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.s erver.servlet.ResteasyBootstrap contextInitialized WARNING: The use of javax.ws.rs.core.Application is deprecated, please use javax .ws.rs.Application as a context-param instead 10:31:17,277 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.s erver.servlet.ResteasyBootstrap setProviders INFO: Adding listed @Provider class org.jboss.bpm.report.FileWriter 10:31:17,309 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider DataSourceProvider 10:31:17,312 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider DefaultTextPlain 10:31:17,315 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider org.jboss.resteasy.plugins.providers.StringTextSta r 10:31:17,319 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider org.jboss.resteasy.plugins.providers.InputStreamPr ovider 10:31:17,323 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider org.jboss.resteasy.plugins.providers.ByteArrayProv ider 10:31:17,327 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider org.jboss.resteasy.plugins.providers.FormUrlEncode dProvider 10:31:17,330 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider org.jboss.resteasy.plugins.providers.FormUrlEncode dProvider 10:31:17,334 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin register INFO: Added built in provider org.jboss.resteasy.plugins.providers.StreamingOutp utProvider 10:31:17,342 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalReader INFO: Adding built in provider org.jboss.resteasy.plugins.providers.multipart.Mu ltipartReader 10:31:17,361 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalReader INFO: Adding built in provider org.jboss.resteasy.plugins.providers.multipart.Li stMultipartReader 10:31:17,364 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalReader INFO: Adding built in provider org.jboss.resteasy.plugins.providers.multipart.Mu ltipartFormDataReader 10:31:17,369 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalReader INFO: Adding built in provider org.jboss.resteasy.plugins.providers.multipart.Ma pMultipartFormDataReader 10:31:17,373 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalWriter INFO: Adding built in providerorg.jboss.resteasy.plugins.providers.multipart.Mul tipartWriter 10:31:17,380 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalWriter INFO: Adding built in providerorg.jboss.resteasy.plugins.providers.multipart.Mul tipartFormDataWriter 10:31:17,385 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalWriter INFO: Adding built in providerorg.jboss.resteasy.plugins.providers.multipart.Lis tMultipartWriter 10:31:17,388 ERROR [STDERR] Apr 9, 2010 10:31:17 AM org.jboss.resteasy.plugins.p roviders.RegisterBuiltin optionalWriter INFO: Adding built in providerorg.jboss.resteasy.plugins.providers.multipart.Map
Re: [rules-users] DROOLS FLOW: Accessing the Map parameter object in a Java constraint evaluation function
If you add a map when starting a process, those values will be set as process variables. For example: [ a : SomeString; b : 3 ]. Simplest way to access these variables in a constraint is using a code constraint, something like: return SomeOtherString.equals(a); or return b 2; So you can just use process variables in your code constraints as if they were local variables. You just have to make sure you define them as process variables (click on the background of your flow and edit the variables property to do this). Kris - Original Message - From: jeanjvr jean...@live.co.za To: rules-users@lists.jboss.org Sent: Monday, April 12, 2010 12:17 PM Subject: [rules-users] DROOLS FLOW: Accessing the Map parameter object in a Java constraint evaluation function I cannot find an example of this in the documentation and a search on the mailing list was fruitless. Right now my test process works fine - the constraints in Split Nodes are set always true with different priorities. I need to access the variables inside the Map parameter sent into the process when it is started by using a Java evaluation function in a Split Node: _processinstance = _ksession.startProcess(flow0, _parameters); I just don't know how to reference that Map parameter in the Java code in a Split node. Thanks for any advice. -- View this message in context: http://n3.nabble.com/DROOLS-FLOW-Accessing-the-Map-parameter-object-in-a-Java-constraint-evaluation-function-tp713135p713135.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Logging and BIRT
File logging is mostly for testing purposes. If you want to create a history log for reporting, take a look at the drools-bam module. This allows you create a logger that will create history information about the execution of your processes in a database, so that can be used as a data source in your reports. There are also a few sample reports in that module. new WorkingMemoryDbLogger(ksession); Kris - Original Message - From: Amit Kumar To: Rules Users List Sent: Monday, March 29, 2010 5:02 PM Subject: [rules-users] Logging and BIRT Hi Folks, I tried simple logging by using this code KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test); It logs only basic stuff. How can I log rule runtime, etc. Trying to generate a report using BIRT as mentioned here http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html_single/index.html#d0e2353 Thanks in advance, Amit -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow: looking for a Fault Node / Handlerexample
There are some examples in the junit tests: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessExceptionHandlerTest.java Kris - Original Message - From: Nol de Wit nolde...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, March 30, 2010 8:45 AM Subject: [rules-users] Drools Flow: looking for a Fault Node / Handlerexample Hi all, In the documentation and other articles I reed about the Fault Node, and how it acts as a bit of an End Node in Flow. I've been searching on the net in general, and the mail-list archive in particular for an example on how to use this, but without much success. In mostly interessted in the 'Exception Handlers' that apperently can be used for this. What is the format of such handler, and how to register it... Thanks, Nol ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Error When changing persistence from H2 to Oracle forTaskService
It is possible that the default mapping is not accepted by Oracle because it uses too long table names or keywords. Iùve recently submitted a fix for similar issues with drools-persistence-jpa (basically reduced column names manually). Could you maybe assist me in doing the same for the task service? You can basically change the table or column name using a @table or @column (name=...) annotation. If you could pinpoint the table/column names that are causing problems, I'm more than happy to apply these changes. Kris - Original Message - From: ramram ramram...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, March 30, 2010 11:15 AM Subject: [rules-users] Error When changing persistence from H2 to Oracle forTaskService Hi All, I am trying to change the persistence of the HumanTaskService from the in memory database to Oracle and I am having the below errors if some one can help. I have posted my persistence,xml and the Error that I am having. Persistence.xml --- ?xml version=1.0 encoding=UTF-8 standalone=yes? persistence version=1.0 xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd; xmlns:orm=http://java.sun.com/xml/ns/persistence/orm; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/persistence; persistence-unit name=org.drools.task providerorg.hibernate.ejb.HibernatePersistence/provider classorg.drools.task.Attachment/class classorg.drools.task.Content/class classorg.drools.task.BooleanExpression/class classorg.drools.task.Comment/class classorg.drools.task.Deadline/class classorg.drools.task.Delegation/class classorg.drools.task.Escalation/class classorg.drools.task.Group/class classorg.drools.task.I18NText/class classorg.drools.task.Notification/class classorg.drools.task.EmailNotification/class classorg.drools.task.EmailNotificationHeader/class classorg.drools.task.PeopleAssignments/class classorg.drools.task.Reassignment/class classorg.drools.task.Status/class classorg.drools.task.Task/class classorg.drools.task.TaskData/class classorg.drools.task.SubTasksStrategy/class classorg.drools.task.OnParentAbortAllSubTasksEndStrategy/class classorg.drools.task.OnAllSubTasksEndParentEndStrategy/class classorg.drools.task.User/class properties property name=hibernate.dialect value=org.hibernate.dialect.OracleDialect/ property name=hibernate.connection.driver_class value=oracle.jdbc.OracleDriver/ property name=hibernate.connection.url value=. my databse url is placed here... / property name=hibernate.connection.username value=drools/ property name=hibernate.connection.password value=drools/ property name=hibernate.connection.autocommit value=false / property name=hibernate.max_fetch_depth value=3/ property name=hibernate.hbm2ddl.auto value=create-drop / property name=hibernate.show_sql value=true / /properties /persistence-unit /persistence ERROR: SEVERE: Unsuccessful: create table Attachment (id number(19,0) not null, name varchar2(255), accessType number(10,0), contentType varchar2(255), attachedAt date, si number(10,0) not null, attachmentContentId number(19,0) not null, attachedBy_id varchar2(255), TaskData_Attachments_Id number(19,0), primary key (id)) Mar 30, 2010 12:10:37 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: ORA-00904: : invalid identifier Mar 30, 2010 12:10:37 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: Unsuccessful: create table Comment (id number(19,0) not null, text clob, addedAt date, addedBy_id varchar2(255), TaskData_Comments_Id number(19,0), primary (id)) Mar 30, 2010 12:10:37 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: ORA-00903: invalid table name Mar 30, 2010 12:10:38 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: Unsuccessful: create table Deadline (id number(19,0) not null, date date, escalated number(1,0) not null, Deadlines_EndDeadLine_Id number(19,0), Deadlines_S tDeadLine_Id number(19,0), primary key (id)) Mar 30, 2010 12:10:38 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: ORA-00904: : invalid identifier Mar 30, 2010 12:10:39 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: Unsuccessful: create table Notification_BusinessAdministrators (task_id number(19,0) not null, entity_id varchar2(255) not null) Mar 30, 2010 12:10:39 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: ORA-00972: identifier is too long Mar 30, 2010 12:10:39 PM org.hibernate.tool.hbm2ddl.SchemaExport create SEVERE: Unsuccessful: create
Re: [rules-users] How to do Exception Handling???
Miguel, I think your work item handler should not be throwing an exception, just because a java exception is low-level and linked to one specific implementation and we try to keep the processes a little higher-level. So what could you do then to model exceptional situations when executing a work item? I suggest you use a try-catch block to catch the java exception and translate that into something higher-level, like: - your work item can contain result parameters, in case of some failure you could fill in a special result parameter with some data, the process instance can then map this result data to some process variable which will allow you to use this data, for example in a XOR split node immediate after this work item node to check for exceptional situations, or in an on-exit action linked to the workItemNode (which could then for example also throw a fault so that the nested exception handler mechanism kicks in) - your work item handler could decide to send a signal to the process instance to signal the occurrence of some exceptional event, and you could use an event handler to listen to that event Depending on your exact use case, I can probably think of a few more alternatives (like using abortWorkItem instead of completeWorkItem), but they might not be all ready to use out-of-the-box. Kris - Original Message - From: miguel machado To: Rules Users List Sent: Thursday, April 01, 2010 1:57 PM Subject: Re: [rules-users] How to do Exception Handling??? Hi, I'm not sure this will help you out, but in what comes to the system i'm currently developing (using drools expert), i've got this method runRuleEngine that collects facts and fire rules on them and i am able to catch any sort of error within the drools execution by surrounding that with try {} catch (Exception e) {}. The important part is that it took me a while to figure that out cuz eclipse didn't force me handle that, as if the called method didn't have throws (it usually shows a compilation error otherwise, right?). Just a thought. _ miguel On Wed, Mar 31, 2010 at 9:44 PM, nanic23 nani...@hotmail.com wrote: I have a ruleflow that handles exceptions when they are raised by a Fault node but I am not being able to accomplish the same if an exception is thrown by a workItem or an action node instead. I have a workItem node with a work item handler that throws a RuntimeException. My exception handler in the composite node is not catching this exception. So, question 1) how can I handle runtime exceptions thrown by my workItemHandlers? 2) how can I get a hold of the exception to log the stack trace? Any ideas or tips are very appreciated. Nick. -- View this message in context: http://n3.nabble.com/How-to-do-Exception-Handling-tp689387p689387.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 -- 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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ 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
Anatoly, I've not been able to check the user list for about a week, and it seems you have been wondering about this issue for a while, so let me try to summarize a little. I'm sure I won't be able to answer all questions in one email, but I'll give it a shot ;) First of all, your use case seems to be that you want to write your own handler for managing human tasks, and that is just fine, the system is implemented to support this. That said, what you are trying to do is (from an architectural perspective) probably quite similar to how we implemented the default human task service implementation (and handler associated with it). So recommendations to take a look at that are probably very good ones, you might not be able to reuse code directly, but understanding how that works might give you a better understanding of your own use case as well. So how does it work? It's actually not that difficult. A work item is created when some unit of work needs to be executed externally (either synchronously or asynchronously, like for example a human task that needs to be performed by a human actor). That work item is then handed to the work item handler for execution. The work item handler should simply notify the session when that work item has been completed using ksession.getWorkItemManager().completeWorkItem(..). How you do that is totally up to you. But let's take a look at a human task service as an example. Basically, what usually happens is, when a work item is passed along for executing, some kind of user task is created somewhere (in a persistent manner) so that, whenever the human actor uses some kind of human task client to access his task list, the task will show up there. Since you decided to not use the default implementation, you're completely free in deciding how to do that. There is however one important integration point, as the engine needs to know when the task has been completed (to continue the flow). So you need to make sure that, if the human actor somehow indicates that the task has been completed, that you notify the session that the task has been completed using ksession.getWorkItemManager().completeWorkItem(workItemId, results). Only one question left I think: what is this ksession and what is the workItemId? First about the ksession: this all depends on your architecture, basically how many independent instances of the engine are you running? For example, if you use a centralized process engine, you for example only have one session (executing all processes), which is active all the time. That session is for example registered in JNDI, can be accessed as a web service, or whatever. If you have multiple sessions (like for example on session per active user), than the session you are looking for could either be already active (in which case you have some session pooling mechanism, so you should use that) or you should recreate the session from the state that was persisted in the database last time it was active. To do that, you need the session id. The session id is usually linked to the context (e.g. if you have one session per user, user-id and session-id are linked and should be stored somewhere for lookup in case the session needs to be restored). Next, the work item id. This is simple, as whenever a work item needs to be executed, it has a unique id. When it has been completed, you need to use that id to tell the engine to continue. So how do we know this workItemId? There are numerous options: a) Set workItemId as a property of the user task. This is what we do in our implementation, we just create a human task and that object contains the workItemId, so whenever the task is completed, we simply take the associated workItemId and tell the engine. Now it seems that your use case would not allow you to store the workItemId as part of the user task that you are creating (you seem to indicate that this would be a terrible choice, to add low-level data like this to your domain objects, but you shouldn't see it like that, your domain objects don't need to know what it means, it's just a way to add correlation data). Too bad, as that is the easy solution, but still, no harm done. b) In this case, I assume that your user task object has some kind of unique id as well. So we need to make sure that we can map that unique task id back to the workItemId. Since you refuse to put the correlation info in your domain objects, two alternatives are left: put it in the work item (our model) or put it in neither of the models but store the correlation external to both models * In theory it is possible to simply store the unique task id as a (result) parameters of the work item, so it gets stored as part of the work item object. If a task has been completed, you should look up the work item that has a task id parameter equal to the one that has been completed, and then complete that work item. Problem with this approach is that it is not a common use case (at
Re: [rules-users] Oryx exported BPMN not properly opened in Eclipse Drools.
Robert, I tried to open your file and it seems to open just fine in the latest version. If it only opens with a start node, do you also get an exception dialog when that happens? There will probably also be an exception trace in the error log, that might be useful. But I guess this might have been a bug that has been fixed already. Could you try out with the latest trunk version? http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/ Kris Quoting Robert robert.weissm...@web.de: Hi Mauricio, that would be great. Here is the definition (only a small test definition), exported using Download BPMN 2.0 DI XML : ?xml version=1.0 encoding=UTF-8 standalone=yes? definitions id=oryx_37da1dc5-14cc-4849-856a-44eff9c96832 typeLanguage=http://www.w3.org/2001/XMLSchema; expressionLanguage=http://www.w3.org/1999/XPath; targetNamespace=http://www.omg.org/bpmn20; xmlns=http://schema.omg.org/spec/BPMN/2.0; xmlns:bpmndi=http://bpmndi.org; process id=oryx_11d9ebf0-622b-4961-ad3d-769327e59339 laneSet id=oryx_7b93b969-906f-4cbc-ada5-b7dd3349f778 lane name=DefaultLane id=oryx_db52d7c8-8229-427a-ac44-90bdc318802f flowElementReforyx_3F4C72AA-F186-4555-999A-C9AC6955BB1D/flowElementRef flowElementReforyx_F17912E1-B44A-481C-83AB-79B3419DF496/flowElementRef flowElementReforyx_76708B75-B83A-40F4-95E1-82BA9D40A895/flowElementRef flowElementReforyx_F8929AA3-E575-45B6-9949-2BA1A06C6229/flowElementRef flowElementReforyx_F96C89FB-AB28-4A39-89EE-82A426815CA3/flowElementRef flowElementReforyx_C10F8B29-3C8D-404D-A066-5E5C923A003B/flowElementRef flowElementReforyx_6836E914-0EC4-4A5C-B149-02153F9F58B6/flowElementRef /lane /laneSet startEvent name=Start id=oryx_3F4C72AA-F186-4555-999A-C9AC6955BB1D/ task name=Pizza order id=oryx_F17912E1-B44A-481C-83AB-79B3419DF496/ exclusiveGateway gatewayDirection=diverging name= id=oryx_76708B75-B83A-40F4-95E1-82BA9D40A895/ task name=Coke order id=oryx_F8929AA3-E575-45B6-9949-2BA1A06C6229/ exclusiveGateway gatewayDirection=converging name= id=oryx_F96C89FB-AB28-4A39-89EE-82A426815CA3/ task name=Sprite order id=oryx_C10F8B29-3C8D-404D-A066-5E5C923A003B/ endEvent name=End id=oryx_6836E914-0EC4-4A5C-B149-02153F9F58B6/ sequenceFlow targetRef=oryx_F17912E1-B44A-481C-83AB-79B3419DF496 sourceRef=oryx_3F4C72AA-F186-4555-999A-C9AC6955BB1D name= id=oryx_9E693E6D-4FE9-4795-9827-D0D7BAC99B46/ sequenceFlow targetRef=oryx_76708B75-B83A-40F4-95E1-82BA9D40A895 sourceRef=oryx_F17912E1-B44A-481C-83AB-79B3419DF496 name= id=oryx_B846F5A5-2063-43D0-9656-96DB28BF4627/ sequenceFlow targetRef=oryx_F8929AA3-E575-45B6-9949-2BA1A06C6229 sourceRef=oryx_76708B75-B83A-40F4-95E1-82BA9D40A895 name= id=oryx_FFF05CBD-DB90-4D68-9BD0-D04FA898A098/ sequenceFlow targetRef=oryx_C10F8B29-3C8D-404D-A066-5E5C923A003B sourceRef=oryx_76708B75-B83A-40F4-95E1-82BA9D40A895 name= id=oryx_09A31CD6-0D95-47FA-9D8F-94F6C81A7D5D/ sequenceFlow targetRef=oryx_F96C89FB-AB28-4A39-89EE-82A426815CA3 sourceRef=oryx_C10F8B29-3C8D-404D-A066-5E5C923A003B name= id=oryx_EE42562E-D5FF-411E-B8DC-B64FA311B483/ sequenceFlow targetRef=oryx_F96C89FB-AB28-4A39-89EE-82A426815CA3 sourceRef=oryx_F8929AA3-E575-45B6-9949-2BA1A06C6229 name= id=oryx_993496A8-52CC-4797-92C0-7ED96E61328D/ sequenceFlow targetRef=oryx_6836E914-0EC4-4A5C-B149-02153F9F58B6 sourceRef=oryx_F96C89FB-AB28-4A39-89EE-82A426815CA3 name= id=oryx_081B7B3D-07A4-4185-9C4C-8E30C5A49D59/ /process bpmndi:processDiagram processRef=oryx_11d9ebf0-622b-4961-ad3d-769327e59339 id=oryx_11d9ebf0-622b-4961-ad3d-769327e59339_gui bpmndi:laneCompartment isVisible=false height=0.0 width=0.0 y=0.0 x=0.0 name=DefaultLane id=oryx_db52d7c8-8229-427a-ac44-90bdc318802f_gui bpmndi:eventShape eventRef=oryx_3F4C72AA-F186-4555-999A-C9AC6955BB1D height=30.0 width=30.0 y=60.0 x=0.0 name=Start id=oryx_3F4C72AA-F186-4555-999A-C9AC6955BB1D_gui/ bpmndi:activityShape activityRef=oryx_F17912E1-B44A-481C-83AB-79B3419DF496 height=80.0 width=100.0 y=35.0 x=105.0 name=Pizza order id=oryx_F17912E1-B44A-481C-83AB-79B3419DF496_gui/ bpmndi:gatewayShape gatewayRef=oryx_76708B75-B83A-40F4-95E1-82BA9D40A895 height=40.0 width=40.0 y=55.0 x=254.0 name= id=oryx_76708B75-B83A-40F4-95E1-82BA9D40A895_gui/ bpmndi:activityShape activityRef=oryx_F8929AA3-E575-45B6-9949-2BA1A06C6229 height=80.0 width=100.0 y=0.0 x=328.0 name=Coke order id=oryx_F8929AA3-E575-45B6-9949-2BA1A06C6229_gui/ bpmndi:gatewayShape gatewayRef=oryx_F96C89FB-AB28-4A39-89EE-82A426815CA3
Re: [rules-users] marshal ActionNodeInstance
Heath, Actually, you shouldn't be marshaling an action node instance (hence the exception). The marshaling should only occur when the engine is not actively executing. But action nodes always execute immediately. So no action node instances should exist when you are marshaling. Are you invoking the marshaling manually during execution yourself? This exception could also occur if you are marshaling while another thread is still executing (in which case a command handler might help). Kris Quoting heldeen held...@overstock.com: Hello List, I am marshalling using the DefaultMarshaller in drools and get the following error: java.lang.IllegalArgumentException: Unknown node instance type: org.drools.workflow.instance.node.actionnodeinsta...@d20c43 at org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeNodeInstanceContent(AbstractProcessInstanceMarshaller.java:243) at org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeNodeInstance(AbstractProcessInstanceMarshaller.java:117) at org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeProcessInstance(AbstractProcessInstanceMarshaller.java:106) at org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeProcessInstance(AbstractProcessInstanceMarshaller.java:52) at org.drools.marshalling.impl.OutputMarshaller.writeProcessInstances(OutputMarshaller.java:750) at org.drools.marshalling.impl.OutputMarshaller.writeSession(OutputMarshaller.java:97) at org.drools.marshalling.impl.DefaultMarshaller.marshall(DefaultMarshaller.java:117) The action node has some very basic java code that I have verified works outside of the node. Is there a trick to get around this error or do I need to report a bug? -Heath -- View this message in context: http://n3.nabble.com/marshal-ActionNodeInstance-tp467573p467573.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how can we find next nodes from current node in rule flow
You could access this info through the process model as Mauricio showed, but this leads to a lot of pretty low-level code, which you might want to avoid in your process. Could you give an example of why you want to do that? Kris Quoting KiranP phadatareki...@gmail.com: suppose i have a rule flow which has a split node and before that split there is action node as below start -- action1 -- Split -- ** --END now if i want to find all transitions after split that can happen then is tere some api available if not please provide some workaround.waiting eagerly for response. thanks - Keep Working :working: KiranP -- View this message in context: http://n3.nabble.com/how-can-we-find-next-nodes-from-current-node-in-rule-flow-tp519949p519949.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ 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
You should basically only know the workItemId. Whenever you have some task that needs to be executed externally (and could take some time), a new work item will be created. When that work is finished, the work item manager should be notified (using manager.completeWorkItem(workItem.getId(), null)). If you need to know what work needs to be completed, you should probably make sure that your work item handler knows this. For example, our work item handler implementation for human tasks creates a new task in the database every time a human task work item needs to be executed (and stores the associated work item id in the db as well). That allows a user to ask the human task service for all tasks that still need to be executed. If the user completes the task, the manager is also signaled that the work item has been completed (using manager.completeWorkItem). So while you could use the code fragments that other have provided in related mails already, I'm not sure you actually need those, as the handler should be storing most info and signal the completion of the work item using the work item id. Kris Quoting tolitius webaka...@gmail.com: Hi Flow Crew, This is about reloading the session and resuming the flow. Let's say the flow reached one of its wait states, and was persisted. Two days later an assigned actor does his/her duties, and the flow can be resumed. At this point, we need to call something, let's call it a WorkflowService, that would have a resumeFlow( someBusinessId ) method that will be called. Here is where the question starts... I understand there are three pieces in this puzzle: SESSION_ID, PROCESS_INSTANCE_ID and WORKITEM_ID I also understand that in order to resume the flow, I need to get a hold of that certain work item that is ready to be completed, and let the flow know it is completed. But at the point, where I should resume the flow, I have no reference to neither SESSION_ID, PROCESS_INSTANCE_ID or WORKFLOW_ID. 1. How are these three related to each other? 2. How do I find these three associated IDs? 2. Which one(s) do I need to resume the flow? 3. If I (somehow) get the reference to SESSION and PROCESS_INSTANCE ids, how do I know which work item is ready to be completed? Thank you, /Anatoly -- View this message in context: http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p607507.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] OutOfMemoryError with non-existence check in flow XOR split
Heath, This seems to be caused by an issue in persisting the current rule state when using a Not rule in a specific combination (and not specifically to your use of ruleflows). I have opened a JIRA for you and we will fix this asap. https://jira.jboss.org/jira/browse/JBRULES-2453 Kris Quoting heldeen held...@overstock.com: I am using drools marshalling for persistence and am getting an OOME with my simple rule flow. I have a custom CommandService that persists at the end of each execution. (I am not using JPA :-( ). In the rule flow I have a split that checks for the non-existence of a simple pojo using not ValidationResult() as one of the constraints. The other constraint is ValidationResult(valid == false). I get an OutOfMemoryError using the not in one of the constraints. Changing not ValidationResult() to ValidationResult(valid == true) results in normal operation. The flow is essentially Start-ValidationRuleFlowGroup-XOR Split-Valid Action XOR Invalid Action - End. The ValidationRuleFlowGroup has a simple set of rules that will insert a ValidationResult() fact if something is not valid. Anyone have any idea why checking for the non-existence of a fact causes this error. I'll post the pojo and the stack trace below. public class ValidationResult { private boolean isValid; private String message; public boolean isValid() { return isValid; } public void setValid(boolean isValid) { this.isValid = isValid; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2786) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838) at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1769) at java.io.DataOutputStream.writeInt(DataOutputStream.java:182) at java.io.ObjectOutputStream$BlockDataOutputStream.writeInt(ObjectOutputStream.java:1904) at java.io.ObjectOutputStream.writeInt(ObjectOutputStream.java:769) at org.drools.marshalling.impl.OutputMarshaller.writeLeftTuple(OutputMarshaller.java:459) at org.drools.marshalling.impl.OutputMarshaller.writeInitialFactHandleLeftTuples(OutputMarshaller.java:356) at org.drools.marshalling.impl.OutputMarshaller.writeFactHandles(OutputMarshaller.java:251) at org.drools.marshalling.impl.OutputMarshaller.writeSession(OutputMarshaller.java:85) at org.drools.marshalling.impl.DefaultMarshaller.marshall(DefaultMarshaller.java:117) Thanks, Heath -- View this message in context: http://n3.nabble.com/OutOfMemoryError-with-non-existence-check-in-flow-XOR-split-tp443126p443126.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Persistence issue using Oracle
I have changed the default table and column names that were causing issues. https://jira.jboss.org/jira/browse/JBRULES-2448 If there are additional issues, please add a comment on this JIRA. Kris Quoting wytten dale.wyttenb...@gmail.com: The changes I made for Oracle were: 1. Add ojdbc5 11.1.0.7.0 to classpath 2. Change the hibernate.dialect in persistence.xml to org.hibernate.dialect.Oracle9Dialect 3. Use oracle.jdbc.xa.client.OracleXADataSource for the PoolingDataSource class name The tables will be created depending on how you have persistence.xml configured (I used hibernate.hbm2ddl.auto value 'create') However, I did experience a problem with the eventTypes member of ProcessInstanceInfo: 'create table ProcessInstanceInfo_eventTypes' yields the error 'ORA-00972: identifier is too long'. The team is aware of this but I haven't seen a fix yet. Hope this helps. ramram wrote: Hi All, I have been using the H2 in memory database to test all my Drools Flow scenarios using Guvnor and Gwt Console provided. And I have some questions to ask and was wondering if someone can help. The main plan now is to switch from using the H2 in memory database to Persist using the Oracle database. 1- What are the files that should be affected in this switch? or where should I be looking into? 2- Are the tables created dynamically? and under which schema? 3- is there any test case implemented using this technology? Thnx in advance for your help Regards, Ram -- View this message in context: http://n3.nabble.com/Persistence-issue-using-Oracle-tp417257p422087.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] gwt-console-drools - link 2 download
Ram, Did you do changes to the gwt-console source code? (as the 2.0.1 artefacts are already published on the maven repo). Anyway, to use the latest version, simply update the 5 poms on the drools-process/drools-gwt-* projects and do a full build, this should generate the new drools-gwt-server war and drools-gwt war, that you should use when installing the console (see Drools Flow documentation, but I assume you already successfully did that with the previous version so simply replace your wars with these new versions). If you have made changes to the gwt-console code, if it's only in the UI you should be able to simply replace the drools-gwt-console.war. If you also changed the server code, I suggest you build that locally as a 2.0.2.SNAPSHOT version and change the drools build to use that version instead of 2.0.1, then do the same as before. This will allow you to use the drools build system with your custom gwt-console code. Kris - Original Message - From: ramram ramram...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, March 09, 2010 3:55 PM Subject: Re: [rules-users] gwt-console-drools - link 2 download Hi Kris, I have changed the POM.xml so that the default profile will be the Drools instead of the JBPM and I built the war and I had the gwt-console-drools.war generated as a result. But I am still having the same error upon login. Please kris can u state for me the steps that I should follow in order to correctly build gwt-console-drools.war file and to be able to log in to the application. Inaddition I have changed the 5 pom.xml files that u mentioned in your previous mail but I didn't try them yet. Regards, Ram -- View this message in context: http://n3.nabble.com/gwt-console-drools-link-2-download-tp428289p437567.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] XStream
Bertrand, You're probably missing the org.drools.runtime.pipeline.impl.XStreamTransformerProviderImpl class in your classpath? Make sure you add the drools-transformer-xstream-5.x.jar to your classpath. Kris - Original Message - From: Bertrand Grottier To: rules-users@lists.jboss.org Sent: Tuesday, March 09, 2010 2:14 PM Subject: [rules-users] XStream Hello, My general aim is to load facts from a xml file. I tried to modify an example furnished in the documentation (Example 3.37. Constructing a pipeline). I get an exception on the following line: Transformer transformer = PipelineFactory.newXStreamFromXmlTransformer( xstream ); The message is the following: org.drools.ProviderInitializationException: Provider org.drools.runtime.pipeline.impl.XStreamTransformerProviderImpl could not be set. Am I going in the right direction ? (I am a newbie) If yes, have you got an explanation for my problem. Otherwise, what is the simplest way to achieve my goal ? Thank you in advance for your help. Regards, Benoît PS : I am using Drools 5.0 -- Envie de naviguer sur Internet sans laisser de trace? La solution avec Internet Explorer 8 -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] ClassCastException when debugging as a drools unit test with a ruleflow
I've just tried debugging a unit test with the latest snapshots and don't have any issues. So if you can reproduce so I can take a look, please let me know. Other than that, I can only recommend to take a fresh eclipse, install the latest snapshot plugin and create a new runtime (based on the jars included in the plugin). That really should work. Kris - Original Message - From: H.C. canterbu...@gmail.com To: rules-users@lists.jboss.org Sent: Friday, March 05, 2010 4:00 AM Subject: Re: [rules-users] ClassCastException when debugging as a drools unit test with a ruleflow Kris, Thanks but same error. I tried both the 5.1.0.M1 plug-in and the trunk snapshot you gave me. Same error every time. I have also made sure my drools runtime is 5.1.0.M1 jars. -- View this message in context: http://n3.nabble.com/ClassCastException-when-debugging-as-a-drools-unit-test-with-a-ruleflow-tp423325p429839.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to add a SkinProvider for the Drools Flow Eclipse Plugin, since the SkinManager does not have any possiblities for adding one ?
Rob, At this point, you'll need to modify the existing one in the Eclipse plugin and simply add your own one. Ideally, this would need to be transformed into an Eclipse extension point, so you can use that to register your own skin providers as part of a separate, additional plugin. If you're serious about adding your own skin provider, I can definitely help you out on how to do this. Kris - Original Message - From: Robert robert.weissm...@web.de To: rules-users@lists.jboss.org Sent: Tuesday, March 09, 2010 1:11 PM Subject: [rules-users] How to add a SkinProvider for the Drools Flow Eclipse Plugin, since the SkinManager does not have any possiblities for adding one ? How to add a SkinProvider for the Drools Flow Eclipse Plugin, since the SkinManager does not have any possiblities for adding one ? Cheers, Rob. -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] gwt-console-drools - link 2 download
Ram, You actually need a combination of the gwt-console war (and you need the drools profile here, not the jbpm one), the gwt-console server war and the drools integration jar that links the console to our engine. The drools build system should do all that for you automatically though. I'm currently upgrading that to use the latest gwt-console version 2.0.1 (all you have to do is change the 5 poms in the drools-process/gwt-* projects to use version 2.0.1 instead of 1.1.2 and it should build and open up just fine). There are still two issues left though, which I'm trying to fix asap: - the generated server war contains two javassist jars that conflict with the server ones, but you can just remove those from the jar, trying to get maven to not put them in there using provided scope - the latest guvnor requires authentication for accessing built packages and the console is not yet using that, so need to fix that first, otherwise no process list will show up Kris - Original Message - From: ramram ramram...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, March 09, 2010 1:11 PM Subject: Re: [rules-users] gwt-console-drools - link 2 download Hi Kris, Please check the following: 1- I downloaded the code from the SVN 2- generated the gwt-console-jbpm war using MAVEN 3- deployed the war using the JBOSS server 4- Log in screen of the JBPM console appears where I used the user name and password to login 5- If wrong username and password provided I have authentication error 6- If correct username and password provided and after loading the workspace I have the following ERROR any idea. 11:58:03,660 ERROR [STDERR] java.lang.NoSuchMethodError: org.jboss.errai.bus.client.api.builder.MessageBuildParms.noErrorHandling() Lorg/jboss/errai/bus/client/api/builder/MessageBuildSendable; 11:58:03,661 ERROR [STDERR] at org.jboss.errai.bus.server.ServerMessageBusImpl$2.callback(ServerMessageBusImpl.java:202) 11:58:03,663 ERROR [STDERR] at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:322) 11:58:03,668 ERROR [STDERR] at org.jboss.errai.bus.server.AsyncDispatcher.dispatchGlobal(AsyncDispatcher.java:45) 11:58:03,669 ERROR [STDERR] at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:176) 11:58:03,672 ERROR [STDERR] at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:96) 11:58:03,675 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) 11:58:03,676 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 11:58:03,679 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 11:58:03,682 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 11:58:03,682 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 11:58:03,683 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 11:58:03,684 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 11:58:03,686 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 11:58:03,686 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 11:58:03,687 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 11:58:03,687 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 11:58:03,688 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 11:58:03,688 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 11:58:03,692 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 11:58:03,694 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 11:58:03,695 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) 11:58:03,695 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 11:58:03,696 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 11:58:03,715 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) 11:58:03,716 ERROR [STDERR] at java.lang.Thread.run(Unknown Source) Regards, Ram -- View this message in context: http://n3.nabble.com/gwt-console-drools-link-2-download-tp428289p437310.html Sent from the Drools -
Re: [rules-users] gwt-console-drools - link 2 download
Ram, Good, you seem to be able to open the user interface, so that's the first step. The error you are getting now is caused by a library conflict between the jars in the war and on your application server classpath. In this case, I assume the application war is containing a javax.persistence jar that conflicts with the version used by hibernate on your application server classpath. Is there any chance you could join our irc channel to discuss this? As things like your AS, version, server classpath etc. can vary a lot depending on your context. Kris - Original Message - From: ramram ramram...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, March 09, 2010 4:54 PM Subject: Re: [rules-users] gwt-console-drools - link 2 download Hi Kris, The problem was that the taskservice was off. But I have reached an exception when I press on the Process Tab. I think that you have mentioned about this issue in your previous mail what do you think should I do to avoid having this error. Or is there a fix for it. Thnx again for your help rg.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: org.hibernate.ejb.HibernatePersistence cannot be st to javax.persistence.spi.PersistenceProvider at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319) at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230) at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Unknown Source) aused by: java.lang.RuntimeException: Could not initialize stateful knowledge session: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.Pe istenceProvider at org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:69) at org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:77) at org.drools.integration.console.DroolsFlowCommandDelegate.init(DroolsFlowCommandDelegate.java:35) at org.drools.integration.console.DroolsFlowProcessManagement.init(DroolsFlowProcessManagement.java:20) at
Re: [rules-users] gwt-console-drools - link 2 download
The GWT console is a separate project, you can find the source code here: http://anonsvn.jboss.org/repos/soag/bpm-console/trunk/ And more info here: http://community.jboss.org/wiki/bpmconsole Note that the drools build is currently using version 1.1.2, which can be found here: http://anonsvn.jboss.org/repos/soag/bpm-console/tags/bpm-console-1.1.2/ Kris Quoting ramram ramram...@gmail.com: Hi All, I am trying to download the source code of the gwt-console-drools but I couldn't find the source code for it. All what I want is to add a button to the UI of the drools so that I could apply a new functionality. Can someone help and give me the link of the source code of the gwt-console-drools I already have the war file but I need the source code. Thnx for the help. Regards, Ram -- View this message in context: http://n3.nabble.com/gwt-console-drools-link-2-download-tp428289p428289.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Unable to see Rules Debugging info in Drools IDE
I've recently created a screencast that shows you how to get the debug views working for the hello world example. Could you try doing the same thing as this screencast and let me know whether reproducing this still does give you empty debug views? http://blog.athico.com/2009/12/screencasts-on-some-faq.html Kris - Original Message - From: H.C. canterbu...@gmail.com To: rules-users@lists.jboss.org Sent: Monday, March 01, 2010 10:54 PM Subject: Re: [rules-users] Unable to see Rules Debugging info in Drools IDE Hey, I am having the same problem. I have tried dubugging both as a Drools Application and a Drools Unit Test and in either case, I get no agenda, working memory or globals in the views even when I select an data item from Variables view in the Debug perspective. I saw some posts recommending switching back and forth between views and that does not seem to help. Platform and JBoss Tools drools version Eclipse 3.4.2 (stable and development - 5.1.0.v201002254M-H277-31764) Eclipse 3.5 (stable, development and latest from nightly build v20100022613N-H20-31746) No difference. Would very much appreciate some help. -- View this message in context: http://n3.nabble.com/Unable-to-see-Rules-Debugging-info-in-Drools-IDE-tp73243p422721.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using DeadLines in Human Task
Caused by: java.lang.ClassNotFoundException: org.hibernate.PersistentObjectException You have this class on the client side as well? Anyway, this class contains some tests on how to use deadlines in human tasks: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-process/drools-process-task/src/test/java/org/drools/task/service/TaskServiceDeadlinesTest.java Is this similar to how you are doing this? If you could reproduce this somehow on a similar way, I can take a look for you. Kris - Original Message - From: ramram ramram...@gmail.com To: rules-users@lists.jboss.org Sent: Wednesday, February 24, 2010 12:59 PM Subject: [rules-users] Using DeadLines in Human Task Hi All, I am trying to use the DeadLine option in the human task but I am having the following exception once trying to run the task: I am trying to run the task from the eclipse. Any Ideas [2010:02:55 13:02:118:exception] Uncaught exception on client org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.mina.core.buffer.BufferDataException: java.io.InvalidClassException: failed to read class descriptor (Hexdump: ...) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:231) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$5(DefaultIoFilterChain.java:426) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:787) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431) at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:423) at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:635) at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:595) at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:584) at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$7(AbstractPollingIoProcessor.java:581) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:966) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:61) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.mina.core.buffer.BufferDataException: java.io.InvalidClassException: failed to read class descriptor at org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1984) at org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder.doDecode(ObjectSerializationDecoder.java:92) at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:178) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:221) ... 15 more Caused by: java.io.InvalidClassException: failed to read class descriptor at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.util.ArrayList.readObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1982) ... 18 more Caused by: java.lang.ClassNotFoundException: org.hibernate.PersistentObjectException at java.net.URLClassLoader$1.run(Unknown Source) at
Re: [rules-users] ClassCastException when debugging as a drools unit test with a ruleflow
That is strange ... Only thing I can image is that you are using the internal drools jars that are shipped as part of the eclipse plugin in the Drools JUnit case and not in the normal JUnit case. Could you try updating to the latest snapshot version of the Eclipse plugin (this will update your internal Drools jars)? https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/ Kris - Original Message - From: H.C. canterbu...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, March 02, 2010 6:32 AM Subject: [rules-users] ClassCastException when debugging as a drools unit test with a ruleflow Hi, I have a unit test written which tests my rules. In my setup, I am loading my drl and rf files via a changeset into an agent and getting my knowledge base. The test then sets globals and facts on my stateful session and execute my ruleflow. I can execute this unit test in JUnit and debug. My drl and rf files build ok and I can step through my java breakpoints. However, when I execute the very same Junit test using debug as Drools Junit Test, I get the following exception when the knowledge agent is building my drl and rf files in my junit setup. The only difference between the two scenarios is that I am using the debug as Drools Unit Test in the exception scenario and plain debug as junit test in the first. I make no configuration or code changes. java.lang.ClassCastException: org.drools.workflow.core.node.RuleSetNode cannot be cast to org.drools.workflow.core.node.StateBasedNode at org.drools.process.builder.EventBasedNodeBuilder.build(EventBasedNodeBuilder.java:21) at org.drools.compiler.ProcessBuilder.processNodes(ProcessBuilder.java:185) at org.drools.compiler.ProcessBuilder.buildNodes(ProcessBuilder.java:171) at org.drools.compiler.ProcessBuilder.buildProcess(ProcessBuilder.java:139) at org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.java:222) at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:448) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:504) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:386) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:120) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:109) at com.ac.logistics.usps.IQ.UspsIQEngine.init(UspsIQEngine.java:21) at com.ac.logistics.usps.transformation.UspsRateRequestTransformer.init(UspsRateRequestTransformer.java:25) at com.ac.logistics.usps.transformation.TestUspsRateRequestTransformer.setUp(TestUspsRateRequestTransformer.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:24) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at
Re: [rules-users] Drools Flow / Declarative process definition
Jaroslav, Yes, if you execute your processes in advanced mode, we are translating procedural constructs like sequence into a more declarative rule like the one you described as an example. Note we are currently not doing that for all procedural constructs (like branch / joins) but we plan to extend these integration points over time. This does allow you to execute a process without having explicit connections between all nodes. We like to describe this as process fragments, where you have small, not-connected flow fragments and where the rules or the user can define when each fragment should be executed, etc. This could then be event-based, data-based, user-triggered, etc. Instead of the process controlling everything, we see this as an inversion where your rules will be controlling the process fragments. This is however still work in progress (meaning a lot is already possible if you dive into it, but we definitely need to extend the tooling etc. to better harness this power before we unleash this to our users). I'm hoping to do a blog entry about this soon, to show some direction. If you're interested in this, it's also related to flexible or ad-hoc processes, adaptible case management, etc. Drools currently targets the Java space primarly. But this doesn't mean you can't use if for XML processing. At this stage, this could become rather complex as we don't provide high-level constructs yet to manipulate this XML data, so you'd have to either build this yourself or do more low-level XML manipulation. As part of our move to BPMN2, we are however planning to seriously enhance this, by adding XPath as a constraint language dialect, better web service integration (as part of our integration with the ESB and the entire SOA platform), etc. Kris - Original Message - From: Jaroslav Pullmann jaroslav.pullm...@fit.fraunhofer.de To: rules-users@lists.jboss.org Sent: Friday, February 26, 2010 2:47 PM Subject: [rules-users] Drools Flow / Declarative process definition Dear Drools team, I like much the approach of Drools Flow and would appreciate to learn more. The documentation states the extended rule engine having knowledge of the process model and instance state derives the next process execution step. I am wondering, whether the overall flow is reactive, even the procedural constructs like sequence, branching/joining are implemented through firing rule actions ? For example, does Drools Flow converts the sequence of steps A - B into sth. like when A.passed then B.start() ? When the prevoius holds, does Drools Flow allows to create (desgin) and execute declarative processes omiting any explicit sequencing ? The steps/tasks were ordered partially by data- or event-based dependency conditions or even activated independently of each other. Drools Flow/Expert provide a thight integration with Java (e.g. representing facts as Java classes). Are there future plans for supporting a higher-level processing with XML/XPath/XQuery like in YAWL ? Many thanks Jaro -- Jaroslav Pullmann Web Compliance Center - Fraunhofer FIT Schloss Birlinghoven, D-53757 Sankt Augustin, Germany Phone: +49-2241-142623Fax: +49-2241-142065 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Process with subprocesses don't continue after finish work items in the subprocesses
Dirk, I tested out your example and I think this is working with the latest trunk, below is the output I received. Could you try your test case with the latest snapshot release, as this might be related to an issue that has already been fixed? http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/ Kris Super - Action (1/3) Execute Human Task: WorkItem 1 [name=Human Task, state=0, processInstanceId=1, parameters{}] Started process instance 1 Sub1 - Action (1/2) Execute Human Task: WorkItem 2 [name=Human Task, state=0, processInstanceId=2, parameters{}] Sub1 - Action (2/2) Super - Action (2/3) Sub2 - Action (1/3) Execute Human Task: WorkItem 3 [name=Human Task, state=0, processInstanceId=3, parameters{}] Sub1 - Action (1/2) Execute Human Task: WorkItem 4 [name=Human Task, state=0, processInstanceId=4, parameters{}] Sub1 - Action (2/2) Sub2 - Action (2/3) Execute Human Task: WorkItem 5 [name=Human Task, state=0, processInstanceId=3, parameters{}] Sub2 - Action (3/3) Execute Human Task: WorkItem 6 [name=Human Task, state=0, processInstanceId=1, parameters{}] Super - Action (3/3) - Original Message - From: Dirk dro...@dirkp.de To: rules-users@lists.jboss.org Sent: Tuesday, February 23, 2010 4:39 PM Subject: Re: [rules-users] Process with subprocesses don't continue after finish work items in the subprocesses Hey Kris, I created a little demo-process with two subprocesses which covers my problem. The flow should be Start - Super - Sub1 - Sub2 - Sub1 - Super - End. But at runtime it is only Start - Super - Sub1 - End. I think the test case is self-explanatory. Thank you for your efforts! Regards Dirk http://n3.nabble.com/file/n404348/testcaseSubprocesses.zip testcaseSubprocesses.zip -- View this message in context: http://n3.nabble.com/Process-with-subprocesses-don-t-continue-after-finish-work-items-in-the-subprocesses-tp326801p404348.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools flow persistence
Maxi, Which version of Drools are you using? I believe this was an issue with transaction managers that do not support nested transactions and that has already been fixed on trunk. Could you try out the latest snapshot to check whether the problem still exists? http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/ Kris Quoting Maxi maxibate...@gmail.com: Hello I'm trying to configure persitence with drools. I'm working on a project using spring/hibernate/mysql. I'm using tomcat 6.0.16 as container. After configuring all stuff I'm getting this exception: javax.transaction.NotSupportedException: nested transactions not supported at bitronix.tm.BitronixTransactionManager.begin(BitronixTransactionManager.java:83) at org.drools.persistence.session.SingleSessionCommandService.(SingleSessionCommandService.java:103) Please let me know what config files do you want to review. Cheers Maxi Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem calling rules from a flow
Strange, I just tried your code and it does seem to print out the Hello world statement when executing the rule. I attached the Eclipse project that I created from this, could you try this? It might be valuable to figure out the differences in the log files (I included mine in the zip file as well). I'm using the latest snapshots though, which can be downloaded here: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/ Kris Quoting Todd Pagni todd.pa...@datacert.com: For some reason I cannot get the most basic rule to fire from a flow. Not sure what is going on, but would appreciate some help. This is in Drools 5.1.0.M1. I pretty much followed the example at http://www.developer.com/java/ent/article.php/10933_3821101_4/Rev-Up-the -Drools-5-Java-Rule-Engine.htm, but it did not work for me.I don't get an error message and I don't see the rule fire and print the system.out. .rf ?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/process drools-processes-5.0.xsd type=RuleFlow name=flow id=com.sample.bpmn.hello package-name=com.sample header /header nodes end id=4 name=End x=561 y=140 width=48 height=48 / start id=1 name=Start x=66 y=88 width=48 height=48 / ruleSet id=3 name=Rule x=368 y=159 width=80 height=48 ruleFlowGroup=helloGroup / /nodes connections connection from=3 to=4 / connection from=1 to=3 / /connections /process .dlr package com.sample import com.sample.DroolsTest.Message; rule Hello World Message ruleflow-group helloGroup when m : Message( status == Message.HELLO, myMessage : message ) then System.out.println( myMessage + *** ); m.setMessage( Goodbye cruel world Message ); m.setStatus( Message.GOODBYE ); update( m ); end Java package com.sample; import org.drools.KnowledgeBase; import org.drools.KnowledgeBaseFactory; import org.drools.bpmn2.xml.BPMNSemanticModule; import org.drools.builder.KnowledgeBuilder; import org.drools.builder.KnowledgeBuilderConfiguration; import org.drools.builder.KnowledgeBuilderError; import org.drools.builder.KnowledgeBuilderErrors; import org.drools.builder.KnowledgeBuilderFactory; import org.drools.builder.ResourceType; import org.drools.compiler.PackageBuilderConfiguration; import org.drools.io.ResourceFactory; import org.drools.logger.KnowledgeRuntimeLogger; import org.drools.logger.KnowledgeRuntimeLoggerFactory; import org.drools.runtime.StatefulKnowledgeSession; /** * This is a sample class to launch a rule. */ public class DroolsTestFlowAndRule { public static final void main(String[] args) { try { // load up the knowledge base KnowledgeBase kbase = readKnowledgeBase(); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test); // start a new process instance' Message message = new Message(); message.setMessage(Hello World Message); message.setStatus(Message.HELLO); ksession.insert(message); ksession.startProcess(com.sample.bpmn.hello); ksession.fireAllRules(); logger.close(); } catch (Throwable t) { t.printStackTrace(); } } private static KnowledgeBase readKnowledgeBase() throws Exception { KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource(hello.rf), ResourceType.DRF); kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl), ResourceType.DRL); KnowledgeBuilderErrors errors =
Re: [rules-users] UserTask Question?
We kept the set of properties that are supported for human tasks (name, actor, priority, etc.) small by default (for simplicity). But it should be straightforward to extend this with additional properties if you want to use more advanced features of the WS-HT service. Take a look at the WSHumanTaskHandler. This contains the logic that translates the work item parameters to invocations of the WS-HT service. You can already assign tasks to users (or a group of users) using the actorId property. I guess you could add start and end date properties there as well (and I assume they map to activation and expiration times in the WS-HT service?). Similarly, a deadlines or escalation property could contain a description that can be translated to escalation elements in the WS-HT service. Feel free to find me on our #drools irc channel (on freenode) if you have more questions. We would be very interested if you would consider contributing features like this back to the project. Kris Quoting ramram ramram...@gmail.com: Hi ALL, How can we assign for a user task (start by date and end by date)??? And how can we configure the task so that if the deadlines is not met the task to be re-assigned or escalated? Regards, Ram -- View this message in context: http://n3.nabble.com/UserTask-Question-tp93032p93032.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using work items in the Eclipse ruleflow editor
I suppose you are seeing the Email and Log work item again but not your own? That's basically the only name you shouldn't be using ;) The reason is that drools-core already contains a WorkDefinitions.conf file which is used by default and contains the Email and log work items (and has precendence over the user-specified one in the IDE). Kris PS: using a resources source folder instead of src/main/resources should also work (as long as it's a Java source folder, not just a regular folder in the project). Quoting bbking badillo.br...@gmail.com: As followup, I should note that when trying to change the MyDefinitions.conf name to WorkDefinitions.conf (and reflecting the change in the drools.rulebase.conf file), the work item disappears. Does anyone know why this may be happening? bbking wrote: Thanks so much! Following this screencast worked like a charm for me! My problem was that I had been creating a resources folder under root (which shows up as resources src folder in eclipse) rather than src/main/resources (which shows up as src/main/resources src folder in eclipse). Thanks again, BB Kris Verlaenen wrote: I created a screencast of how to define a domain-specific work item. Could you verify this works for you? http://people.redhat.com/kverlaen/DomainSpecificWorkItem.swf Kris Quoting bbking badillo.br...@gmail.com: I've been attempting to contribute my own work item following the instructions on this post and the drools flow user guide to no avail. I'm using Drools 5.0.1 in Eclipse which I added as a plugin using the software updates. (checking the plugins folder I only have org.drools.eclipse_5.0.1 org.drools.eclipse.task_5.0.1; i'm not sure if that has anything to do with it) I've created a new drools project and created the resources directory as a source directory and created the META-INF directory and put the necessary files in the directory. along with an icons package. Any insight? Jeremy Ary wrote: Mike, I ran into a similar issue when I began working with ruleflows a few weeks ago. Some of this may not be necessary and it's certainly not all causal, but this was what I noted when working my issue out: 1) If you're working in JBoss Dev Studio, it's possible that you have a conflict between the code you added as a runtime and what's already there, so try the process with a fresh install of eclipse 2) Ensure that any projects you currently have open do not have build/lib/classpath issues (I had the drools projects checked out and open and build errors caused unnecessary complications for me) 3) Be sure that your project has a META-INF on the classpath and that it's set up correctly 4) Place your drools.rulebase.conf custom definitions .conf that it looks for are both in your META-INF under resources (src/main/resources/META-INF ) 5) Once you're sure this much is correct, give Eclipse a restart - my project did not pick up my custom WI's until I restarted If you're still having issues, I'll be on the IRC channel for the next 5 hours or so as jary - feel free to reply here or look me up there. (well, I'm heading to lunch very soon, so back in around an hour) Jeremy - Original Message - From: Mike Gill mg...@modusoperandi.com To: rules-users@lists.jboss.org Sent: Monday, September 21, 2009 11:27:46 AM GMT -06:00 US/Canada Central Subject: [rules-users] Using work items in the Eclipse ruleflow editor I am using Eclipse to build my Drools rulefow file. I am trying to add custom work items, but I cannot seem to get anything (other than Email and Log) to show up in my Work Items palette. Does anyone know how to get the existing work items (such as FileFinder or Exec) to show up on the palette in eclipse? Eventually I will need to add custom work items to the flow, so this is make-or-break Drools functionality for my team. In pursuit of a solution to this I have combed the documentation, this mailing list archive, as well as endless Google results to no avail. Any help would be very valuable! Thanks, Mike ___ 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 -- View this message in context: http://n3.nabble.com/Re-Using-work-items-in-the-Eclipse-ruleflow-editor-tp61081p73373.html Sent from the Drools - User mailing list archive at Nabble.com
Re: [rules-users] ProcessInstance Does Not Complete With User Task and Rule Task
Hi, I executed the process you provided and do not seem to have any problems with it. This is the output: ### Starting process ### ### Completing second work item ### Finished!!! Could you try your code with the latest snapshot releases? Kris Quoting nfox241 n...@dragonflyware.com: I have a flow: start -- User Task - Rule Task - User Task - Action - end. I complete the 1st User Task, next the rules which are part of the RuleFlowGroup in the Rule Task fire correctly, then I complete the next User Task. However, my final action node is never reached and the processInstance never completes. Here is my Rule Flow: ?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/process drools-processes-5.0.xsd type=RuleFlow name=droolsflow id=org.plugtree.labs.droolsflow package-name=org.plugtree.labs header imports import name=org.plugtree.labs.variablepersistence.MyEntity / import name=org.plugtree.labs.variablepersistence.MyVariableSerializable / /imports /header nodes ruleSet id=17 name=ruleMe x=410 y=123 width=80 height=48 ruleFlowGroup=fox / start id=1 name=Start x=16 y=16 width=48 height=48 / end id=3 name=End x=665 y=312 width=48 height=48 / humanTask id=23 name=User Task x=279 y=237 width=100 height=48 work name=Human Task parameter name=ActorId type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Comment type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Content type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Priority type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Skippable type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=TaskName type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter /work /humanTask humanTask id=22 name=User Task x=145 y=86 width=100 height=48 work name=Human Task parameter name=ActorId type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Comment type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Content type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Priority type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Skippable type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=TaskName type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter /work /humanTask actionNode id=12 name=Finish x=494 y=254 width=80 height=48 action type=expression dialect=mvel System.out.println(Finished!!!);/action /actionNode /nodes connections connection from=22 to=17 / connection from=12 to=3 / connection from=17 to=23 / connection from=1 to=22 / connection from=23 to=12 / /connections /process And test code: KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( new ClassPathResource( VariablePersistenceStrategyProcess.rf ), ResourceType.DRF ); kbuilder.add( new ClassPathResource( myRules.drl ), ResourceType.DRL ); for (KnowledgeBuilderError error: kbuilder.getErrors()) { System.out.println(error); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() ); EntityManagerFactory emf = Persistence.createEntityManagerFactory(org.drools.persistence.jpa); Environment env = KnowledgeBaseFactory.newEnvironment(); env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf); StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env ); int id = ksession.getId(); System.out.println(### Starting process ###); WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.startProcess( org.plugtree.labs.droolsflow /*,parameters*/ ); TestWorkItemHandler handler = TestWorkItemHandler.getInstance(); WorkItem workItem =
Re: [rules-users] Unable to see Rules Debugging info in Drools IDE
Created a screencast showing simple debugging at work. Could you try whether this works for you? http://people.redhat.com/kverlaen/Debug.swf Kris Quoting Pritam infinity2hea...@gmail.com: I don't see any debugging views enabled in debug drools application mode as described in the http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e6947 docs It just runs as a normal java debugging applications and the Agenda, Working Memory sections are empty. Suggestions/ -- View this message in context: http://n3.nabble.com/Unable-to-see-Rules-Debugging-info-in-Drools-IDE-tp73243p73243.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Starting ruleflow on event
The start node triggers based on a rule or an event are not yet exposed as properties in the graphical editor. You can already specify them in the XML though. Check out http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessStartTest.java for an example of both. Kris Quoting bbking badillo.br...@gmail.com: I'm using Drools 5.0.1 and have read in the online documentation that i can start a process on event: Events could also be used to start a process. Whenever a Start node defines an event trigger of a specific type, a new process instance will be started every time that type of event is signalled to the process engine. However, I cannot find a property on the Start activity that exposes this functionality. Am I missing something? -- View this message in context: http://n3.nabble.com/Starting-ruleflow-on-event-tp73368p73368.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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Human Task Work Item - Activation Time
We just try to follow what is defined in the WS-HumanTask specification. Could you check whether this is a limitation of the spec itself or whether we did not implement that feature correctly? Kris Quoting Vijay K Pandey vpan...@mdes.ms.gov: Hi, If a human task once in Reserved state is released it goes in the Ready state and then if claimed by a potential owner - should the activation time of the task change or not? If not is there any way to identify that at what time the task was claimed by another potential owner. Thanks Vijay Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users