help with drools 6
by dwipin
Hi,
I am trying to create a project using Drools 6 with Spring.
I have drools-spring-6.0.0.Beta2 as the dependency as
drools-spring-6.0.0.Final is not available.
I am unable to get the <kie:kmodule> tag to bind in the spring
application-context file. Can some one post a sample appCtx file with the
kmodule xsd schema location specified ?
Also, is there a working sample of using Spring with Drools 6 anywhere ?
Thanks,
Dwipin Chandran.
--
View this message in context: http://drools.46999.n3.nabble.com/help-with-drools-6-tp4027460.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 4 months
Re: [rules-users] Unable to have KBase recognize our DRL files
by P. Vinod Kiran
Mayank,
Can you try adding the ksession tag?
<kie:kmodule id="kieModule">
<kie:kbase name="validationRulesKBase" packages="com.acme.rules">
<kie:ksession name="ksession1" type="stateless"/>
</kie:kbase>
</kie:kmodule>
Also, can you post the relevant sections of the console log?
- Vinod
> From: Mayank <mayank.kumar(a)gmail.com>
> Subject: [rules-users] Unable to have KBase recognize our DRL files
> Date: 27 December 2013 02:50:59 GMT
> To: rules-users(a)lists.jboss.org
> Reply-To: Rules Users List <rules-users(a)lists.jboss.org>
>
> Hi,
>
> We are in the process of upgrading Drools in our application. Until 5.x the
following spring configuration used to work well for us:
>
> <drools:kbase id="validationRulesKBase">
> <drools:resources>
> <drools:resource type="DRL"
source="classpath:rules/trade/rule1.drl" />
> <drools:resource type="DRL"
source="classpath:rules/trade/rule2.drl" />
> </drools:resources>
> </drools:kbase>
>
> With an inejection of this KnowledgeBase, we would create a stateless
session and fire all rules after inserting appropriate facts and globals.
>
> After upgrading to Drools 6, our DRL files don't seem to be getting picked
up in the knowledge base - we are using the following spring configuration:
>
> <bean id="kiePostProcessor"
class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>
>
> <kie:kmodule id="kieModule">
> <kie:kbase name="validationRulesKBase" packages="com.acme.rules"/>
> </kie:kmodule>
>
> This KnowledgeBase gets injected in our code but it doesn't seem to pick up
the DRL files in the specified package. We have ensure that the drl files are
under src/main/resources/com/acme/rules and that package is specified in each
DRL file at the top.
>
> Am I missing something in this new configuration?
>
> thnx,
> -mayank
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
10 years, 4 months
JBPM : How to Listen Once ResourceChangeScanner Modifies the package after Changes
by Zahid Ahmed
Hi,
I want to upgrade my process instances using WorkflowProcessInstanceUpgrader. To trigger the upgrade after any change I wanted to listen for changes completed by ResourceChangeScanner. To listen the completion of changes I was looking to configure KnowledgeBaseEventListener. I have drools-spring-integration in place which uses drools-spring.xsd to configure beans and event listeners. I am getting KBase and Ksession from spring. I was trying to register my KnowledgeBaseEventListener in my spring configurations. But, The issue is that drools-spring.xsd only registers 3 kind of listeners
1. ProcessEventListener
2. AgendaEventListener
3. WorkingMemoryEventListener
Solution Required :
1. I need to know how to configure the KnowledgeBaseEventListener in my spring configurations ?
Example for ksession we have following config to register listeners.
<drools:ksession id="knowledgeSession" type="stateful" kbase="knowledgeBase">
<drools:agendaEventListener ref="agendaEventListener"/>
<drools:workingMemoryEventListener ref="wmEventListener"/>
</drools:ksession>
2. Is this the best place to trigger a batch process upgrade ? From within the KBaseEventListener ?
3. Shall I add KBaseEventListener using knowledgebase.addEventListener() ?
Environment
1. Drools-5.5.0.Final
a. Guvnor
b. Jbpm
10 years, 4 months
Repositry deployment Issues
by Govind J. Parashar
Hi All
Anyone know how to dynamic deploy or export (using programmatically or through scripting ) repository in Guvnor.
Thanks & regards
Govind Parashar
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: 27 December 2013 19:50
To: Rules Users List
Subject: Re: [rules-users] Drools6.0 Security Issues
You might want to look into the topic of the Java platform's security manager, which provides features for running untrusted SW. This list may not be the best place to ask about details w.r.t. this topic.
The idea of inspecting DRL source code to detect the (malicious) usage of some class or other is, most certainly, not a good idea.
-W
On 27/12/2013, philip <18922445710(a)189.cn> wrote:
> Thank you for your reply.
> If existing some package or class on the rule 's RHS ,How to
> filter them ,and forbid execute this rule.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-Drools6-0-Security-Issue
> s-tp4027433p4027445.html Sent from the Drools: User forum mailing list
> archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 years, 5 months
Drools6.0 Security Issues
by 18922445710
Hello, everyone,
Greetings!
I want to use Drools6.0 in my project,but I found a security issue. The Drools6.0 automatically import the java.lang.* packages.
As we all know, thess packages including some package such as Process class,which can damage the application's security.
So, I want know how to prohibit some package from executing in rule configure file(including drl,decistion tablea) or program code.
Thank you everyone .
With my best wishes!
Sincerely yours, philip
10 years, 5 months
rule condition problem in drools 5.5.0 Final
by scarlettxu
Hi expert,
expect you can have a look of our problem and give any suggestions
we are using drools 5.2.0 Final now, but we want to change to 5.5.0 Final in
order to use some new features.
while in the testing of 5.5.0 Final version, we find a problem below
we have a simple testing rule as below
rule "single todoitem_31"
salience 65503
activation-group "filter"
when
$list : List(size==1) from collect(ToDoItemTO() over window : length(2))
todo:ToDoItemTO(status in ('DELAY'))
then
transToDoItems.add($list.get(0));
logger.debug('rule1, size is '+$list.size()+', '+$list.get(0));
end
when we insert 1 fact into working memory, this rule can be fired. it is
correct
when we insert 2 facts into working memory, this rule cannot be fired. as
the size in sliding window is 2 now. it is correct.
then we test insert 3 facts, while this rule is fired. This is the problem,
currently there should be 2 facts in the sliding window, we can print the
size, the size is indeed 2. but why this rule will be fired?
we test the same case in version 5.2.0 Final, there is no problem.
Anyone know if this is a bug of 5.5.0 Final or we have wrong practice in
writing the condition?
--
View this message in context: http://drools.46999.n3.nabble.com/rule-condition-problem-in-drools-5-5-0-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
Drools 5.4 : DRL : Issues using java.util.Map and > operator in Condition
by anij
Hi,
I'm facing problem when I'm using Map and > Operator in condition section.
I'm using version 5.4.
this is my RULE:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
package resouces.rules
import java.util.*;
rule "Valid Age_BNG"
agenda-group "Check user Eligibility_BNG"
salience 1
no-loop true
when
map : Map()
eval(map.get("Age") > 18 )
then
map.put("Age_Validation",true);
update(map);
System.out.println("RULE : "+drools.getRule().getName() );
end
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
And error message :
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Rule Compilation error : [Rule name='Valid Age_BNG']
resouces/rules/Rule_Valid_Age_BNG_d2a9c84690ba457b900a0578788bdd23.java
(8:313) : The operator > is undefined for the argument type(s) Object, int
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-DRL-Issues-using-java-util-M...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
Unable to have KBase recognize our DRL files
by Mayank
Hi,
We are in the process of upgrading Drools in our application. Until 5.x the
following spring configuration used to work well for us:
<drools:kbase id="*validationRulesKBase*">
<drools:resources>
<drools:resource type="DRL"
source="classpath:rules/trade/rule1.drl" />
<drools:resource type="DRL"
source="classpath:rules/trade/rule2.drl" />
</drools:resources>
</drools:kbase>
With an inejection of this KnowledgeBase, we would create a stateless
session and fire all rules after inserting appropriate facts and globals.
After upgrading to Drools 6, our DRL files don't seem to be getting picked
up in the knowledge base - we are using the following spring configuration:
<bean id="kiePostProcessor"
class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>
<kie:kmodule id="kieModule">
<kie:kbase name="validationRulesKBase" packages="com.acme.rules"/>
</kie:kmodule>
This KnowledgeBase gets injected in our code but it doesn't seem to pick up
the DRL files in the specified package. We have ensure that the drl files
are under src/main/resources/*com/acme/rules *and that package is specified
in each DRL file at the top.
Am I missing something in this new configuration?
thnx,
-mayank
10 years, 5 months