Workbench not Working in Resilient Environment
by Zahid Ahmed
Hi,
I am trying to setup Drools6 Workbench ion a resilient mode but am unable to sync the assets amongst the resilient members. Kindly have a look at the detailed question posted earlier.
Subject in Drools Forum "Drools Workbench | VFS Clustering Error | NoNode for jbpm-cluster"
Regards,
Zahid Ahmed
11 years, 9 months
Possible problem in PathMemory
by rjh
Hello,
I developed a system where dynamic salience for some particular rules
doesn't rules. However, it is very hard for me to create a simple test case
unless I publish the entire rule files. In the system, some rules using
dynamic salience work and some don't, but I don't know why.
I debugged into the drools-core source code, and found out the following
code in branch 6.0.x.
(https://github.com/droolsjbpm/drools/blob/6.0.x/drools-core/src/main/java...)
Line 98 - org.drools.core.reteoo.PathMemory::doLinkRule
int salience = ( rtn.getRule().getSalience() instanceof
MVELSalienceExpression)
? 0
: rtn.getRule().getSalience().getValue(null,
rtn.getRule(), wm);
Line 113 - org.drools.core.reteoo.PathMemory::doUnlinkRule
int salience = ( rtn.getRule().getSalience() instanceof
MVELSalienceExpression)
? 0
: rtn.getRule().getSalience().getValue(null,
rtn.getRule(), wm);
I wonder if this is a bug that put the first value and the second value
reversed. At least I fixed my problem after reversing them.
Thanks.
Jinghai
--
View this message in context: http://drools.46999.n3.nabble.com/Possible-problem-in-PathMemory-tp403002...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Noob question: graph searching, query, root node for a given node
by Borris
I'm after a quick bit of help on how to do something that I think should be
easy but I can't work out how.
I have a Java-side class that essentially is something like
declare Datum
description: String
broader: List <Datum>
narrower: List <Datum>
end
These are arranged in a graph. Root nodes have no items in their broader
list. I want a query that takes a datum and yields the root nodes for that
datum. I think this should look something like
query rootDatumsFor( Datum datum, Datum result )
not Datum() from $datum.broader
or
rootDatumsFor( $datum.broader, $result )
end
but I then get confused. When there are no broader items, I am unclear how
to assign $datum to $result. And I'm not convinced I'm doing the recursion
correctly either.
If an experienced Drools author could spend a minute and show me how to do
this sensibly, I would be very grateful.
--
View this message in context: http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-roo...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Need help in understanding Data enumeration’s drop down list configuration
by Shrinath Managuli
Hi Drools,
Need help in understanding Data enumeration’s drop down list configuration,
I had created a simple data enumeration as,
[cid:image001.png@01CF8A37.D4053860]
For this, I also created a Customer object with a code field as String at org.kie.example.project1 package.
While creating guided rule, I’m unable to view the enumeration as drop down as like below,
[cid:image002.png@01CF8A37.D4053860]
I had tried this scenario with JBoss BRMS 6. Please help me to understand on how to populate the drop down using data enumeration.
Thanks,
srinath
[Aspire Systems]
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
11 years, 9 months
NPE spring-boot project via a jar
by rogerL
Hi,
Running into NPE on application boot up. It appears to be related to a
previous topic. I didn't add to it as the last entry appears to veer off
topic and didn't want it lost in the wash.
http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-k...
Using kie-spring-6.1.0.Beta4.jar, spring 4. As per the former topic, the
application starts up without issue in IDE env, etc. but fails on jar boot
up.
The stack is as follows:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'kiePostProcessor' defined in class path resource
[qres/callManager.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.kie.spring.KModuleBeanFactoryPostProcessor]: Constructor
threw exception; nested exception is java.lang.NullPointerException
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1021)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1121)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:682)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at com.s.c.util.ConfigUtility.loadProfileContext(ConfigUtility.java:42)
at com.s.c.manager.CallManager.init(CallManager.java:19)
at com.s.c.manager.CallManager.main(CallManager.java:46)
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.kie.spring.KModuleBeanFactoryPostProcessor]:
Constructor threw exception; nested exception is
java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:164)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1069)
... 13 more
Caused by: java.lang.NullPointerException
at
org.kie.spring.KModuleBeanFactoryPostProcessor.initConfigFilePath(KModuleBeanFactoryPostProcessor.java:83)
at
org.kie.spring.KModuleBeanFactoryPostProcessor.<init>(KModuleBeanFactoryPostProcessor.java:68)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 15 more
--
View this message in context: http://drools.46999.n3.nabble.com/NPE-spring-boot-project-via-a-jar-tp403...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Re: [rules-users] Fuse ESB & Drools 6 - Fire-until-halt configuration using persistence
by Sergio Besada
Maybe I'm wrong and I cannot use this configuration because in some case
fail
2014-06-17 13:57 GMT+02:00 Sergio Besada <scerquido(a)gmail.com>:
> Hi,
>
> I have seen that in the drools version 6.1.0.Beta4, the command
> fire-until-halt is developed using persistence but drools doesn't let me
> test it because this command implement the interface
> "UnpersistableCommand" so I have eliminated this interface and I have
> tested this configuration.
>
> Surprisingly, Drools works as I expected and doesn't throw any exception,
> ¿Where is the problem in this configuration?
>
> Here my camel context
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:kie="http://drools.org/schema/kie-spring"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
> http://drools.org/schema/kie-spring
> http://drools.org/schema/kie-spring.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
>
>
>
> <kie:kmodule id="kModule">
> <kie:kbase name="rules" packages="rules">
> <kie:ksession name="ksession1" type="stateful">
> <kie:batch>
> <kie:fire-until-halt/>
> </kie:batch>
> <kie:configuration>
> <kie:jpa-persistence>
> <kie:transaction-manager ref="txManager"/>
> <kie:entity-manager-factory ref="myEmf"/>
> </kie:jpa-persistence>
> </kie:configuration>
>
>
> </kie:ksession>
> </kie:kbase>
> </kie:kmodule>
>
> <kie:environment id="env">
> <kie:entity-manager-factory ref="myEmf"/>
> <kie:transaction-manager ref="txManager"/>
> </kie:environment>
>
>
> <bean class="org.postgresql.ds.PGPoolingDataSource" id="jbpm-ds">
> <property name="serverName" value="localhost"></property>
> <property name="databaseName" value="drools"></property>
> <property name="portNumber" value="5432"></property>
> <property name="user" value="DWP"></property>
> <property name="password" value="DWP"></property>
> </bean>
>
>
> <bean id="myEmf"
> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
> <property name="dataSource" ref="jbpm-ds"/>
> <property name="persistenceUnitName"
> value="org.jbpm.persistence.jpa.local"/>
> </bean>
>
> <bean id="txManager"
> class="org.springframework.orm.jpa.JpaTransactionManager">
> <property name="entityManagerFactory" ref="myEmf"/>
> </bean>
>
> <bean id="kiePostProcessor"
> class="org.drools.osgi.spring.OsgiKModuleBeanFactoryPostProcessor"/>
>
> <bean id="fireALlRulesCommand"
> class="com.execute.command.FireAllRules"/>
>
> <bean id="fireUntilHaltCommand"
> class="com.execute.command.FireUntilHalt"/>
>
> <bean id="factStudent" class="com.test.facts.Student"/>
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
> <route trace="false" id="testRoute">
> <from uri="timer:testRoute?period=10s"/>
> <to uri="log:message"/>
> <bean method="initStudent" ref="factStudent"/>
> <to uri="kie:ksession1?action=insertBody" id="AgeVerification"/>
> <!--
> <bean method="fireUntilHalt" ref="fireUntilHaltCommand"/>
>
> <to uri="kie:ksession1?action=execute"/>
> -->
> </route>
> </camelContext>
>
> </beans>
>
>
> PD: I have attached my example , it's a maven project
>
>
>
>
> 2014-06-04 19:04 GMT+02:00 Sergio Besada <scerquido(a)gmail.com>:
>
>> Thank you in advance.
>>
>>
>> 2014-06-04 18:29 GMT+02:00 Charles Moulliard <ch007m(a)gmail.com>:
>>
>>> I will have a look to your use case as it is not yet covered and will
>>> perhaps require that we modify the kie-camel component
>>>
>>>
>>> On Wed, Jun 4, 2014 at 6:02 PM, s b <scerquido(a)gmail.com> wrote:
>>>
>>>> I'm testing the drools new version (6.1.0.Beta4) but I have a problem
>>>> with the Stateful Drools Session.
>>>>
>>>> I have deployed in JBoss Fuse ESB the last versión of the drools
>>>> (drools camel, jbpm, spring, etc), I have atached my camel context bundle
>>>> (It's a maven project).
>>>>
>>>> This is my camel-context
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>> xmlns:kie="http://drools.org/schema/kie-spring"
>>>> xsi:schemaLocation="
>>>> http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>>>> http://drools.org/schema/kie-spring
>>>> http://drools.org/schema/kie-spring.xsd
>>>> http://camel.apache.org/schema/spring
>>>> http://camel.apache.org/schema/spring/camel-spring.xsd">
>>>>
>>>>
>>>>
>>>> <kie:kmodule id="kModule">
>>>> <kie:kbase name="rules" packages="rules">
>>>> <kie:ksession name="ksession1" type="stateful">
>>>> <!--<kie:batch>
>>>> <kie:fire-all-rules/>
>>>> </kie:batch> -->
>>>> <kie:configuration>
>>>> <kie:jpa-persistence>
>>>> <kie:transaction-manager ref="txManager"/>
>>>> <kie:entity-manager-factory ref="myEmf"/>
>>>> </kie:jpa-persistence>
>>>> </kie:configuration>
>>>>
>>>>
>>>> </kie:ksession>
>>>> </kie:kbase>
>>>> </kie:kmodule>
>>>>
>>>> <kie:environment id="env">
>>>> <kie:entity-manager-factory ref="myEmf"/>
>>>> <kie:transaction-manager ref="txManager"/>
>>>> </kie:environment>
>>>>
>>>>
>>>> <bean class="org.postgresql.ds.PGPoolingDataSource" id="jbpm-ds">
>>>> <property name="serverName" value="localhost"></property>
>>>> <property name="databaseName" value="drools"></property>
>>>> <property name="portNumber" value="5432"></property>
>>>> <property name="user" value="DWP"></property>
>>>> <property name="password" value="DWP"></property>
>>>> </bean>
>>>>
>>>>
>>>> <bean id="myEmf"
>>>> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
>>>> <property name="dataSource" ref="jbpm-ds"/>
>>>> <property name="persistenceUnitName"
>>>> value="org.jbpm.persistence.jpa.local"/>
>>>> </bean>
>>>>
>>>> <bean id="txManager"
>>>> class="org.springframework.orm.jpa.JpaTransactionManager">
>>>> <property name="entityManagerFactory" ref="myEmf"/>
>>>> </bean>
>>>>
>>>> <bean id="kiePostProcessor"
>>>> class="org.drools.osgi.spring.OsgiKModuleBeanFactoryPostProcessor"/>
>>>>
>>>> <bean id="fireALlRulesCommand"
>>>> class="com.execute.command.FireAllRules"/>
>>>>
>>>> <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>> <route trace="false" id="testRoute">
>>>> <from uri="timer:testRoute?period=10s"/>
>>>> <to uri="log:message"/>
>>>> <to uri="kie:ksession1?action=insertBody"
>>>> id="AgeVerification"/>
>>>>
>>>> <bean method="fireAllRules" ref="fireALlRulesCommand"/>
>>>> <to uri="kie:ksession1?action=execute"/>
>>>>
>>>> </route>
>>>> </camelContext>
>>>>
>>>> </beans>
>>>>
>>>> As you can see it is an scenario where Drools is in an stateful session
>>>> with persistence configured.
>>>>
>>>> The bundle is executed without errors but I want that Drools executes
>>>> my rules each time that the route is executed ( fireUntilHalt mode but I
>>>> wasn't able as seems that this command is not availble in a persisted
>>>> environment ), for this reason I've created a bean with the command:
>>>> fireAllRules and I use <to uri="kie:ksession1?action=execute"/> to execute
>>>> the rules but the problem is that the rules are only executed the first
>>>> time, only the first time and never in subsequents executions of the route.
>>>>
>>>> The persistece seems to work well ( I can see the datamodel created
>>>> and populated as expeted in the DB ).
>>>>
>>>> However if I change to use stateless mode ( no persistence then ), the
>>>> rules are executed each time that route is executed ( as expected ), and
>>>> therefore I don´t need the command fireAllRules
>>>> <bean method="fireAllRules" ref="fireALlRulesCommand"/>
>>>> <to uri="kie:ksession1?action=execute"/>
>>>>
>>>>
>>>>
>>>> Questions:
>>>>
>>>> Is it possible to have a stateful fireUntilHalt drools session that
>>>> keeps using the same knowledge session in subsequent camel route executions?
>>>>
>>>> If it is not possible, Can I have a stateful ( persisted )drools
>>>> session and invoke "fireAllRules" whenever I make changes in the knowledge
>>>> session ( new Facts are inserted )?
>>>>
>>>> I've deep dived into the web looking for examples or documentation of
>>>> this scenario both in Spring and Blueprint. Does anyone of you have any
>>>> pointers to documentation on the matter?
>>>>
>>>> Kind Regards,
>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>
>>>
>>>
>>> --
>>> Charles Moulliard
>>> Apache Committer / Architect @RedHat
>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>
11 years, 9 months
Fuse ESB & Drools 6 - Fire-until-halt configuration using persistence
by Sergio Besada
Hi,
I have seen that in the drools version 6.1.0.Beta4, the command
fire-until-halt is developed using persistence but drools doesn't let me
test it because this command implement the interface
"UnpersistableCommand" so I have eliminated this interface and I have
tested this configuration.
Surprisingly, Drools works as I expected and doesn't throw any exception,
¿Where is the problem in this configuration?
Here my camel context
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:kie="http://drools.org/schema/kie-spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://drools.org/schema/kie-spring
http://drools.org/schema/kie-spring.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<kie:kmodule id="kModule">
<kie:kbase name="rules" packages="rules">
<kie:ksession name="ksession1" type="stateful">
<kie:batch>
<kie:fire-until-halt/>
</kie:batch>
<kie:configuration>
<kie:jpa-persistence>
<kie:transaction-manager ref="txManager"/>
<kie:entity-manager-factory ref="myEmf"/>
</kie:jpa-persistence>
</kie:configuration>
</kie:ksession>
</kie:kbase>
</kie:kmodule>
<kie:environment id="env">
<kie:entity-manager-factory ref="myEmf"/>
<kie:transaction-manager ref="txManager"/>
</kie:environment>
<bean class="org.postgresql.ds.PGPoolingDataSource" id="jbpm-ds">
<property name="serverName" value="localhost"></property>
<property name="databaseName" value="drools"></property>
<property name="portNumber" value="5432"></property>
<property name="user" value="DWP"></property>
<property name="password" value="DWP"></property>
</bean>
<bean id="myEmf"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="jbpm-ds"/>
<property name="persistenceUnitName"
value="org.jbpm.persistence.jpa.local"/>
</bean>
<bean id="txManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="myEmf"/>
</bean>
<bean id="kiePostProcessor"
class="org.drools.osgi.spring.OsgiKModuleBeanFactoryPostProcessor"/>
<bean id="fireALlRulesCommand"
class="com.execute.command.FireAllRules"/>
<bean id="fireUntilHaltCommand"
class="com.execute.command.FireUntilHalt"/>
<bean id="factStudent" class="com.test.facts.Student"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route trace="false" id="testRoute">
<from uri="timer:testRoute?period=10s"/>
<to uri="log:message"/>
<bean method="initStudent" ref="factStudent"/>
<to uri="kie:ksession1?action=insertBody" id="AgeVerification"/>
<!--
<bean method="fireUntilHalt" ref="fireUntilHaltCommand"/>
<to uri="kie:ksession1?action=execute"/>
-->
</route>
</camelContext>
</beans>
PD: I have attached my example , it's a maven project
2014-06-04 19:04 GMT+02:00 Sergio Besada <scerquido(a)gmail.com>:
> Thank you in advance.
>
>
> 2014-06-04 18:29 GMT+02:00 Charles Moulliard <ch007m(a)gmail.com>:
>
>> I will have a look to your use case as it is not yet covered and will
>> perhaps require that we modify the kie-camel component
>>
>>
>> On Wed, Jun 4, 2014 at 6:02 PM, s b <scerquido(a)gmail.com> wrote:
>>
>>> I'm testing the drools new version (6.1.0.Beta4) but I have a problem
>>> with the Stateful Drools Session.
>>>
>>> I have deployed in JBoss Fuse ESB the last versión of the drools (drools
>>> camel, jbpm, spring, etc), I have atached my camel context bundle (It's a
>>> maven project).
>>>
>>> This is my camel-context
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:kie="http://drools.org/schema/kie-spring"
>>> xsi:schemaLocation="
>>> http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>>> http://drools.org/schema/kie-spring
>>> http://drools.org/schema/kie-spring.xsd
>>> http://camel.apache.org/schema/spring
>>> http://camel.apache.org/schema/spring/camel-spring.xsd">
>>>
>>>
>>>
>>> <kie:kmodule id="kModule">
>>> <kie:kbase name="rules" packages="rules">
>>> <kie:ksession name="ksession1" type="stateful">
>>> <!--<kie:batch>
>>> <kie:fire-all-rules/>
>>> </kie:batch> -->
>>> <kie:configuration>
>>> <kie:jpa-persistence>
>>> <kie:transaction-manager ref="txManager"/>
>>> <kie:entity-manager-factory ref="myEmf"/>
>>> </kie:jpa-persistence>
>>> </kie:configuration>
>>>
>>>
>>> </kie:ksession>
>>> </kie:kbase>
>>> </kie:kmodule>
>>>
>>> <kie:environment id="env">
>>> <kie:entity-manager-factory ref="myEmf"/>
>>> <kie:transaction-manager ref="txManager"/>
>>> </kie:environment>
>>>
>>>
>>> <bean class="org.postgresql.ds.PGPoolingDataSource" id="jbpm-ds">
>>> <property name="serverName" value="localhost"></property>
>>> <property name="databaseName" value="drools"></property>
>>> <property name="portNumber" value="5432"></property>
>>> <property name="user" value="DWP"></property>
>>> <property name="password" value="DWP"></property>
>>> </bean>
>>>
>>>
>>> <bean id="myEmf"
>>> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
>>> <property name="dataSource" ref="jbpm-ds"/>
>>> <property name="persistenceUnitName"
>>> value="org.jbpm.persistence.jpa.local"/>
>>> </bean>
>>>
>>> <bean id="txManager"
>>> class="org.springframework.orm.jpa.JpaTransactionManager">
>>> <property name="entityManagerFactory" ref="myEmf"/>
>>> </bean>
>>>
>>> <bean id="kiePostProcessor"
>>> class="org.drools.osgi.spring.OsgiKModuleBeanFactoryPostProcessor"/>
>>>
>>> <bean id="fireALlRulesCommand"
>>> class="com.execute.command.FireAllRules"/>
>>>
>>> <camelContext xmlns="http://camel.apache.org/schema/spring">
>>> <route trace="false" id="testRoute">
>>> <from uri="timer:testRoute?period=10s"/>
>>> <to uri="log:message"/>
>>> <to uri="kie:ksession1?action=insertBody" id="AgeVerification"/>
>>>
>>> <bean method="fireAllRules" ref="fireALlRulesCommand"/>
>>> <to uri="kie:ksession1?action=execute"/>
>>>
>>> </route>
>>> </camelContext>
>>>
>>> </beans>
>>>
>>> As you can see it is an scenario where Drools is in an stateful session
>>> with persistence configured.
>>>
>>> The bundle is executed without errors but I want that Drools executes my
>>> rules each time that the route is executed ( fireUntilHalt mode but I
>>> wasn't able as seems that this command is not availble in a persisted
>>> environment ), for this reason I've created a bean with the command:
>>> fireAllRules and I use <to uri="kie:ksession1?action=execute"/> to execute
>>> the rules but the problem is that the rules are only executed the first
>>> time, only the first time and never in subsequents executions of the route.
>>>
>>> The persistece seems to work well ( I can see the datamodel created
>>> and populated as expeted in the DB ).
>>>
>>> However if I change to use stateless mode ( no persistence then ), the
>>> rules are executed each time that route is executed ( as expected ), and
>>> therefore I don´t need the command fireAllRules
>>> <bean method="fireAllRules" ref="fireALlRulesCommand"/>
>>> <to uri="kie:ksession1?action=execute"/>
>>>
>>>
>>>
>>> Questions:
>>>
>>> Is it possible to have a stateful fireUntilHalt drools session that
>>> keeps using the same knowledge session in subsequent camel route executions?
>>>
>>> If it is not possible, Can I have a stateful ( persisted )drools session
>>> and invoke "fireAllRules" whenever I make changes in the knowledge session
>>> ( new Facts are inserted )?
>>>
>>> I've deep dived into the web looking for examples or documentation of
>>> this scenario both in Spring and Blueprint. Does anyone of you have any
>>> pointers to documentation on the matter?
>>>
>>> Kind Regards,
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
11 years, 9 months
Fusion, Insert Events with timestamp in the past.
by SebastianStehle
Hi,
I am working on an existing drools project. We have a lot of rules with
"after" or "not after" relationships.
One of the problems I run into is when updating the rules. At the moment a
new session will be created and all facts are inserted from the old to the
new session. But something does not work in the scenario. To reproduce the
problem I made a simple test with the following rule:
rule "not after"
when
$message : DroolsSimulationMessage(value == 1) not
(DroolsSimulationMessage(value == 2, this after [1s, 10s] $message))
then
end
I inserted an event with a timestamp 5 seconds in the past and I expect the
rule to be activated 5 seconds after the event was inserted. But in my
scenario it does not work, the rule is activated after 10 seconds. This is a
very important point to make the current update progress work. Should it
work and if not is there a better way to realize rule-updates?
Thanks you in advance,
Sebastian
--
View this message in context: http://drools.46999.n3.nabble.com/Fusion-Insert-Events-with-timestamp-in-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Workbench and GIT Repo High Availability
by Zahid Ahmed
Hi,
We are in a process of setting up a centralized drools6 Workbench in our organization. This way we can keep our assets and artefacts in a central location. We will make this central Workbench clustered for high availability. I have a few queries in regard to clustering the Workbench.
Problem Statement
As workbench is using GIT, this means we need to have an enterprise level GIT repository where all the assets get stored for Workbench. As GIT is file-system based , it in turn, calls for a clustered GIT server within the organization. Our organization will prefer to have a private GIT repository hosted within office network which is highly available and wants to avoid any cost for GIT repository setup.
1. I want to know how to make Workbench highly available , with GIT also Highly available. Is chapter# 18 VFS CLUSTERING is the answer to high available GIT and WORKBENCH both ? or is there any other way to make GIT repository highly available.
2. Will ZooKeeper and Helix be enough to make the clustered environment for both Workbench with its GIT repo ?
Regards,
Zahid Ahmed
11 years, 9 months
Error while importing repository from Guvnor 5.1.1 to 5.3.3.Final
by LaKhI ReDdY!!!!!!!!!!!
Hi,
I am trying to import the whole repository from 5.1.1 to 5.3.3.Final
version.I am getting the below attached error while importing.Please find
the attached file for error details.
We have added new functionality(Rule request) in 5.1.1 and using it for
quite some. Now we want to migrate to 5.3.3.Final and we want to drop the
additional functionality(Rule Request) which we have added earlier in 5.1.1
version.
The repository which we have currently contains the Rule request details
also, does this causes problem in importing to Guvnor 5.3.3.Final?
Regards,
Lakshmi Reddy
11 years, 9 months