[rules-users] BaseMinaClient - Session Termination
Hello, I have a simple RuleFlow containing a Human Task, which I start using the following lines of code: WSHumanTaskHandler wsh = new WSHumanTaskHandler(); ksession.getWorkItemManager().registerWorkItemHandler(Human Task, wsh); ksession.startProcess(com.sample.ruleflow); When the workflow has properly ended however, there remain threads (e.g. NioProcessorNioSocketConnector) within the VM. I have tracked this down to BaseMinaClient: public void disconnect() { if ( session!= null session.isConnected() ) { session.close(); session.getCloseFuture().join(); } } Expllicitly calling wsh.dispose(), session.isConnected() (from IoSession) always yields true even when the workflow instance has terminated already and there are no more active human tasks available. Is this an intended behaviour? Thanks and best Markus ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drool Rule Error with or not condition
Hi All, I have the following drool rule that has or not under Entity Block. Basically, the rule tries to check if there either exists an entity object EtsExecutionOrderXref_core00 with the given conditions, or the entity does not exist at all with some other conditions. dialect mvel rule Legacy ETSDB Rule when EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != 0) EtsExecutionOrderXref_core00: ( EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceID != 2 referenceIDType == orderSubCapacity ) or not(EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceIDType == orderSubCapacity )) ) then end But, while compiling the rule, I am getting the following errors: org.drools.compiler.DroolsParserException: [ERR 101] Line 22:16 no viable alternative at input 'entityOID' in rule Legacy ETSDB Rule in pattern not, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:68 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:122 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:176 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID in pattern EtsExecutionOrderHist_core0.entityVID] I think the rule is correct, but am not able to figure out these compilation errors. Could anybody please comment on why this would happen? Thanks Malay Shah -- NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drool Rule Error with or not condition
You are binding the result of the 'or' to EtsExecutionOrderXref_core00 as the second part is a 'not' which returns nothing, how would it be bound to? Shah, Malay wrote: Hi All, I have the following drool rule that has or not under Entity Block. Basically, the rule tries to check if there either exists an entity object EtsExecutionOrderXref_core00 with the given conditions, or the entity does not exist at all with some other conditions. dialect mvel rule Legacy ETSDB Rule when EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != 0) EtsExecutionOrderXref_core00: ( EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceID != 2 referenceIDType == orderSubCapacity ) or not(EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceIDType == orderSubCapacity )) ) then end But, while compiling the rule, I am getting the following errors: org.drools.compiler.DroolsParserException: [ERR 101] Line 22:16 no viable alternative at input 'entityOID' in rule Legacy ETSDB Rule in pattern not, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:68 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:122 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:176 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID in pattern EtsExecutionOrderHist_core0.entityVID] I think the rule is correct, but am not able to figure out these compilation errors. Could anybody please comment on why this would happen? Thanks Malay Shah NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law. ___ 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] Drool Rule Error with or not condition
Thanks Mark. I removed the binding and the rule is compiled now, but while firing the rule over set of objects, I get a Null pointer exception. Here is the updated Drool rule: dialect mvel rule Legacy ETSDB Rule when EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != 0) EtsExecutionOrderXref_core00:EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID, entityRID == EtsExecutionOrderHist_core0.entityRID, entityVID == EtsExecutionOrderHist_core0.entityVID, referenceID != 2 referenceIDType == orderSubCapacity ) or not(EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID, entityRID == EtsExecutionOrderHist_core0.entityRID, entityVID == EtsExecutionOrderHist_core0.entityVID, referenceIDType == orderSubCapacity ) ) then System.out.println(Rule fired); end and here is the stack trace: Exception in thread main org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885) at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:637) at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:203) at com.ms.ruleutils.RuleProcessor.process(RuleProcessor.java:142) at com.ms.ruleutils.RuleProcessor.process(RuleProcessor.java:73) at com.ms.ieddata.dataQuality.dqWithRR.DQCommandLineMain.performDQ(DQCommandLineMain.java:291) at com.ms.ieddata.dataQuality.dqWithRR.DQCommandLineMain.runEngine(DQCommandLineMain.java:196) at com.ms.ieddata.dataQuality.dqWithRR.DQCommandLineMain.main(DQCommandLineMain.java:170) Caused by: java.lang.NullPointerException at org.drools.base.mvel.DroolsMVELFactory.getTupleObjectFor(DroolsMVELFactory.java:182) at org.drools.base.mvel.DroolsMVELFactory.setContext(DroolsMVELFactory.java:176) at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:57) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934) ... 10 more After debugging through, DroolMVELFactory class object is looking for Declaration definition for EtsExecutionOrderXref_core00, not finding it, and hence giving a null pointer exception. I am using Drools 5.0.1. Any idea about why this would happen? Does the rule seem right now? Thanks Malay Shah From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mark Proctor Sent: Tuesday, December 01, 2009 6:56 PM To: Rules Users List Subject: Re: [rules-users] Drool Rule Error with or not condition You are binding the result of the 'or' to EtsExecutionOrderXref_core00 as the second part is a 'not' which returns nothing, how would it be bound to? Shah, Malay wrote: Hi All, I have the following drool rule that has or not under Entity Block. Basically, the rule tries to check if there either exists an entity object EtsExecutionOrderXref_core00 with the given conditions, or the entity does not exist at all with some other conditions. dialect mvel rule Legacy ETSDB Rule when EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != 0) EtsExecutionOrderXref_core00: ( EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceID != 2 referenceIDType == orderSubCapacity ) or not(EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceIDType == orderSubCapacity )) ) then end But, while compiling the rule, I am getting the following errors: org.drools.compiler.DroolsParserException: [ERR 101] Line 22:16 no viable alternative at input 'entityOID' in rule Legacy ETSDB Rule in pattern not, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:68 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:122 mismatched input ',' expecting '(' in rule Legacy ETSDB Rule in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID, org.drools.compiler.DroolsParserException: [ERR 102] Line 22:176 mismatched
[rules-users] command line utility for importing rules
Hi, I'm a systems engineer and I want to import rules to guvnor. I dont want to do this by guvnor web UI (Administration -- import/export). Rather, I want to use a command to upload repository_export.xml file. something like, $java_home/java org.drools.repository.something repository_export.xml Can you help me in finding the command. Thanks, -- View this message in context: http://n3.nabble.com/command-line-utility-for-importing-rules-tp65886p65886.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drool Rule Error with or not condition
Binding a variable to a fact in a branch of an 'or' (as you are doing with EtsExecutionOrderXref_core00) is not useful, since you cannot use this binding in the consequence. (The rule might just as well fire due to the 2nd term (the or not...) being true, and then the variable would not be bound, causing NPE. If you do need this binding to access the fact in the consequence, you should splt the rule. -W 2009/12/2 Shah, Malay malay.s...@morganstanley.com Thanks Mark. I removed the binding and the rule is compiled now, but while firing the rule over set of objects, I get a Null pointer exception. Here is the updated Drool rule: dialect mvel rule Legacy ETSDB Rule when EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != 0) EtsExecutionOrderXref_core00:EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID, entityRID == EtsExecutionOrderHist_core0.entityRID, entityVID == EtsExecutionOrderHist_core0.entityVID, referenceID != 2 referenceIDType == orderSubCapacity ) or not(EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID, entityRID == EtsExecutionOrderHist_core0.entityRID, entityVID == EtsExecutionOrderHist_core0.entityVID, referenceIDType == orderSubCapacity ) ) then System.out.println(Rule fired); end and here is the stack trace: Exception in thread main org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885) at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:637) at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:203) at com.ms.ruleutils.RuleProcessor.process(RuleProcessor.java:142) at com.ms.ruleutils.RuleProcessor.process(RuleProcessor.java:73) at com.ms.ieddata.dataQuality.dqWithRR.DQCommandLineMain.performDQ(DQCommandLineMain.java:291) at com.ms.ieddata.dataQuality.dqWithRR.DQCommandLineMain.runEngine(DQCommandLineMain.java:196) at com.ms.ieddata.dataQuality.dqWithRR.DQCommandLineMain.main(DQCommandLineMain.java:170) Caused by: java.lang.NullPointerException at org.drools.base.mvel.DroolsMVELFactory.getTupleObjectFor(DroolsMVELFactory.java:182) at org.drools.base.mvel.DroolsMVELFactory.setContext(DroolsMVELFactory.java:176) at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:57) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934) ... 10 more After debugging through, DroolMVELFactory class object is looking for Declaration definition for EtsExecutionOrderXref_core00, not finding it, and hence giving a null pointer exception. I am using Drools 5.0.1. Any idea about why this would happen? Does the rule seem right now? Thanks Malay Shah -- *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *Mark Proctor *Sent:* Tuesday, December 01, 2009 6:56 PM *To:* Rules Users List *Subject:* Re: [rules-users] Drool Rule Error with or not condition You are binding the result of the 'or' to EtsExecutionOrderXref_core00 as the second part is a 'not' which returns nothing, how would it be bound to? Shah, Malay wrote: Hi All, I have the following drool rule that has or not under Entity Block. Basically, the rule tries to check if there either exists an entity object EtsExecutionOrderXref_core00 with the given conditions, or the entity does not exist at all with some other conditions. dialect mvel rule Legacy ETSDB Rule when EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != 0) EtsExecutionOrderXref_core00: ( EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceID != 2 referenceIDType == orderSubCapacity ) or not(EtsExecutionOrderXref_core ( entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceIDType == orderSubCapacity )) ) then end But, while compiling the rule, I am getting the following errors: org.drools.compiler.DroolsParserException: [ERR 101] Line 22:16 no viable alternative at