Re: [rules-users] rules update not working properly .
Hi All, If i modify the rule as follows it will work . what could be the issue . Is it bug in rules 5.1 rule Referback when $workflow : Workflow(workflowActorId==2) $workflow1 : Workflow() $workflowactor11 : WorkflowActor(actorId== 1) $workflowactor : WorkflowActor( $actoremail :actorEmail ) $workflowaction : WorkflowActions(currentUser==$actoremail actions=='referback', $prevActions : prevActions ) $workflowactor1 : WorkflowActor( actorId== 1 actorSign!=null) then System.out.println(drl2 action finally + $workflowaction.getActions() + $actoremail +$workflowactor1.getActorEmail() + $prevActions + $workflow.getWorkflowActorId() ); $workflow.setWorkflowActorId(1); $workflowactor1.setActorSign(null); $workflowaction.setActions(not need further actions); System.out.println(worklfow id + $workflow.getWorkflowActorId() + $workflowactor1.getActorId() ++ $workflowactor1.getActorSign()); $workflow1.setWorkflowActorId(0); $workflowactor11.setActorSign(null); update($workflowactor1); update($workflowaction); update($workflow); update($workflow1); update($workflowactor11); end Thanks in advance. sony.j...@kie.com .sg Sent by: To rules-users-bounc rules-users@lists.jboss.org e...@lists.jboss.or cc g Subject [rules-users] rules update not 08/25/2010 02:02 working properly . PM Please respond to Rules Users List rules-us...@list s.jboss.org Hi All, When i try to update three object in rules its changes the values in rules . But after update its not reflecting on my calling code. But workflowAction object has been updated. What could be the problem anything i missed out here. Please help me . rule Referback when $workflow : Workflow(workflowActorId==2) $workflowactor : WorkflowActor( $actoremail :actorEmail ) $workflowaction : WorkflowActions(currentUser==$actoremail actions=='referback', $prevActions : prevActions ) $workflowactor1 : WorkflowActor( actorId== 1 actorSign!=null) then System.out.println(drl2 action finally + $workflowaction.getActions() + $actoremail +$workflowactor1.getActorEmail() + $prevActions + $workflow.getWorkflowActorId() ); $workflow.setWorkflowActorId(1); $workflowactor1.setActorSign(null); $workflowaction.setActions(not need further actions); System.out.println(worklfow id + $workflow.getWorkflowActorId() + $workflowactor1.getActorId() ++ $workflowactor1.getActorSign()); update($workflowactor1); update($workflowaction); update($workflow); end Thanks in advance Regards Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner.
Re: [rules-users] Referenced file contains errors (http://drools.org/schema/drools-spring.xsd)
Hi, I used spring 3.0 with drools 5.1 ?xml version=1.0 encoding=windows-1252? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd drools:resource id=resource1 type=DRL source=classpath:springtest.drl/ drools:resource id=resource2 type=DRL source=classpath:springtest1.drl/ drools:kbase id=kbase1 drools:resources drools:resource type=DRL source=classpath:springtest.drl/ drools:resource ref=resource1/ drools:resource ref=resource2/ /drools:resources /drools:kbase drools:ksession id=ksession2 type=stateful kbase=kbase1 / nanic23 nani...@hotmail. com To Sent by: rules-users@lists.jboss.org rules-users-bounc cc e...@lists.jboss.or g Subject [rules-users] Referenced file contains errors 08/26/2010 01:05 (http://drools.org/schema/drools-sp AMring.xsd) Please respond to Rules Users List rules-us...@list s.jboss.org I wasn't getting this error before but all of a sudden eclipse started showing this error message. I'm using drools 5.1.1 (it also happens with 5.1.0). Here is how my schema definition looks: http://drools-java-rules-engine.46999.n3.nabble.com/file/n1335740/drools-xsd.jpg and here is the eclipse error message [ 10, 1 for each flow I have :) ] http://drools-java-rules-engine.46999.n3.nabble.com/file/n1335740/drools-xsd-error-message.jpg Drools Spring integration is working fine and all my flows run without problems but nonetheless the error messages are annoying and I would like to have a clean project. I saw in other posts that a couple of ppl had the same problem. Anyone has been able to solve it? I appreciate the comments! Thanks, Nick. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Referenced-file-contains-errors-http-drools-org-schema-drools-spring-xsd-tp1335740p1335740.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] rules update not working properly .
Hi All, When i try to update three object in rules its changes the values in rules . But after update its not reflecting on my calling code. But workflowAction object has been updated. What could be the problem anything i missed out here. Please help me . rule Referback when $workflow : Workflow(workflowActorId==2) $workflowactor : WorkflowActor( $actoremail :actorEmail ) $workflowaction : WorkflowActions(currentUser==$actoremail actions=='referback', $prevActions : prevActions ) $workflowactor1 : WorkflowActor( actorId== 1 actorSign!=null) then System.out.println(drl2 action finally + $workflowaction.getActions() + $actoremail +$workflowactor1.getActorEmail() + $prevActions + $workflow.getWorkflowActorId() ); $workflow.setWorkflowActorId(1); $workflowactor1.setActorSign(null); $workflowaction.setActions(not need further actions); System.out.println(worklfow id + $workflow.getWorkflowActorId() + $workflowactor1.getActorId() ++ $workflowactor1.getActorSign()); update($workflowactor1); update($workflowaction); update($workflow); end Thanks in advance Regards Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules un end looping when update
hi thomas, Thanks for reply , I want to set values in workflow Object. How i can do it. I try without update(m) but pojo is not updated. How i can accomplish the below after calling rules i need to get workflowid that has been updated in rules. { ksession.insert(workflow); ksession.fireAllRules(); System.out.println( workflow.getWorkflowId()); } rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowId(0); update(m); end On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas tswinde...@nds.com wrote: You are calling update(m), which means that you are telling drools that m has changed, which means that any rule that has a condition based upon that rule gets re-evaluated, which causes Your First Rule to be fired again, which will then update m again... Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:28 To: rules-users@lists.jboss.org Subject: [rules-users] rules un end looping when update Hi all, Iam using rules 5.1 iam getting un endded printout in my console. What could be the issue. Thanks in advance. #created on: Aug 16, 2010 package com.test.supplier #list any import classes here. #declare any global variables here import com.test.supplier.dao.Workflow; rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); update(m); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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] rules un end looping when update
Hi Thomas, thanks Its my mistake i am able to solve it . rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowActorId(0); update(m); end On Tue, Aug 17, 2010 at 6:47 PM, sony john sonyt...@gmail.com wrote: hi thomas, Thanks for reply , I want to set values in workflow Object. How i can do it. I try without update(m) but pojo is not updated. How i can accomplish the below after calling rules i need to get workflowid that has been updated in rules. { ksession.insert(workflow); ksession.fireAllRules(); System.out.println( workflow.getWorkflowId()); } rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowId(0); update(m); end On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas tswinde...@nds.com wrote: You are calling update(m), which means that you are telling drools that m has changed, which means that any rule that has a condition based upon that rule gets re-evaluated, which causes Your First Rule to be fired again, which will then update m again... Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:28 To: rules-users@lists.jboss.org Subject: [rules-users] rules un end looping when update Hi all, Iam using rules 5.1 iam getting un endded printout in my console. What could be the issue. Thanks in advance. #created on: Aug 16, 2010 package com.test.supplier #list any import classes here. #declare any global variables here import com.test.supplier.dao.Workflow; rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); update(m); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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] rules un end looping when update
Thanks Thomas, I am able to update now. One more question i would like to ask you. I i need to insert one more object called WorkflowMail and call WorkflowMail when the above rule condition is True how i can do it. I can insert the object but how i can call that object in rules. REgards Sony John On Tue, Aug 17, 2010 at 7:05 PM, Swindells, Thomas tswinde...@nds.com wrote: I prefer using modify rather than update but that is a minor issue. Your key problem is that your rule fires regardless whether it needs to or not, you need to write your rule so it only fires when it is valid for the action to be performed. In your current rule you seem to be doing a null check against workflowActorId and then setting workflowId; you probably want to make these consistent so you do a null check and then set that same property to an appropriate value. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:47 To: Rules Users List Subject: Re: [rules-users] rules un end looping when update hi thomas, Thanks for reply , I want to set values in workflow Object. How i can do it. I try without update(m) but pojo is not updated. How i can accomplish the below after calling rules i need to get workflowid that has been updated in rules. { ksession.insert(workflow); ksession.fireAllRules(); System.out.println( workflow.getWorkflowId()); } rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowId(0); update(m); end On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas tswinde...@nds.com wrote: You are calling update(m), which means that you are telling drools that m has changed, which means that any rule that has a condition based upon that rule gets re-evaluated, which causes Your First Rule to be fired again, which will then update m again... Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:28 To: rules-users@lists.jboss.org Subject: [rules-users] rules un end looping when update Hi all, Iam using rules 5.1 iam getting un endded printout in my console. What could be the issue. Thanks in advance. #created on: Aug 16, 2010 package com.test.supplier #list any import classes here. #declare any global variables here import com.test.supplier.dao.Workflow; rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); update(m); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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 ** 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 ** ___ rules-users mailing list rules-users
[rules-users] Rule flow persistence MY SQL
Hi , Iam trying to persistence drools workflow using my sql as back end . But iam getting Could not commit sessions Iam trying with example code, drool.session.conf file contains drools.workItemHandlers = MyWorkItemHandlers.conf #drools.commandService = org.drools.persistence.session.SingleSessionCommandService #drools.processInstanceManagerFactory = org.drools.persistence.processinstance.JPAProcessInstanceManagerFactory #drools.workItemManagerFactory = org.drools.persistence.processinstance.JPAWorkItemManagerFactory #drools.processSignalManagerFactory = org.drools.persistence.processinstance.JPASignalManagerFactory Folllwoing are my rf file My RF file ?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.kie.lab.variablepersistence.MyEntity / import name=org.kie.lab.variablepersistence.MyVariableSerializable / /imports variables variable name=x type name=org.drools.process.core.datatype.impl.type.StringDataType / /variable variable name=y type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyEntity / /variable variable name=z type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyVariableSerializable / /variable variable name=a type name=org.drools.process.core.datatype.impl.type.StringDataType / /variable variable name=b type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyEntity / /variable variable name=c type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyVariableSerializable / /variable /variables /header nodes humanTask id=4 name=Human Task x=208 y=16 width=93 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=9 name=Human Task x=713 y=16 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=8 name=Action x=601 y=20 width=80 height=40 action type=expression dialect=java System.out.println(x = + x); System.out.println(y = + y); System.out.println(z = + z); System.out.println(a = + a); System.out.println(b = + b); System.out.println(c = + c); kcontext.setVariable(a, Some changed String); kcontext.setVariable(b, new MyEntity(This is a changed test Entity)); kcontext.setVariable(c, new MyVariableSerializable(This is a changed test SerializableObject));/action /actionNode actionNode id=6 name=Action x=333 y=20 width=80 height=40 action type=expression dialect=java System.out.println(x = + x); System.out.println(y = + y); System.out.println(z = + z); kcontext.setVariable(a, Some new String); kcontext.setVariable(b, new MyEntity(This is a new test Entity)); kcontext.setVariable(c, new MyVariableSerializable(This is a new test SerializableObject));/action /actionNode start id=1 name=Start x=16 y=16 width=48 height=48 / end id=3 name=End
Re: [rules-users] How to use Drools Flow?
Hi Xiao , Could you explain to me also how done the workflow , becuase iam also looking same solutions. If you have sample code please update tha too. Regards Sony John XiaoMiTang dingyongch...@ho tmail.com To Sent by: rules-users@lists.jboss.org rules-users-bounc cc e...@lists.jboss.or g Subject Re: [rules-users] How to use Drools Flow? 08/04/2010 09:38 AM Please respond to Rules Users List rules-us...@list s.jboss.org I have omitted DefaultProcessEventListener,so the workflow can not be finished automatically when user B finished the task. now all is ok,thank you~ -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flow-tp1014591p1021025.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users