Drools Guvnor with JasperReport
by danielnb
Hi guys.
I have a problem using guvnor + jasperreport, i always receive perm gem
space.
I tried many forums, all of them said to set jvm memory up, like this :
-Xms1024m -Xmx1024m
I did it and keep getting the perm gem space error.
I want to know if anyone of you guys have been through this problem, if you
have some ideas how can i solve it. anything that might help.
Thank you. :D
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-with-JasperReport-tp28205...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Problem with rule: Unexpected exception executing action org.drools.reteoo.PropagationQueuingNode$PropagateAction@631b86c7
by quivler
Hey I'm getting the following Error "Unexpected exception executing action
org.drools.reteoo.PropagationQueuingNode$PropagateAction@631b86c7" with one
off my rules in my project.
The problem is linked with the use of two after statements in one rule.
If I delete one of them everything works like a charm.
The rule looks like this:
// Regeln
rule "Vergessene Herdplatte"
when
// Platte wurde eingeschaltet und es steht kein Topf auf ihr
$platte: HerdplatteEingeschaltet( plateOccupied == false ) from
entry-point events
// und in den nächsten 20 sek wird die gleiche Platte nicht
ausgeschaltet
not( HerdplatteAusgeschaltet( this.nummer == $platte.nummer, this
after[0s,20s] $platte ) from entry-point events )
// oder es wird in den nächsten 20 sek kein Topf auf die Platte
gestellt
not( TopfAufHerdplatte( this.nummer == $platte.nummer, this
after[0s,20s] $platte ) from entry-point events )
then
System.out.println("Vergessene Herdplatte erkannt!");
end
If I comment one of the not-clause out, it works.
I created an unit-test
http://drools.46999.n3.nabble.com/file/n2821121/TestProject.zip
TestProject.zip which reproduces the exception.
And here the Failure Trace:
org.drools.RuntimeDroolsException: Unexpected exception executing action
org.drools.reteoo.PropagationQueuingNode$PropagateAction@631b86c7
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1473)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:182)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:145)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:96)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:44)
at com.sample.FusionTest.testRule(FusionTest.java:79)
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.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
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
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
at
org.drools.time.impl.CompositeMaxDurationTimer.createTrigger(CompositeMaxDurationTimer.java:58)
at org.drools.common.Scheduler.scheduleAgendaItem(Scheduler.java:55)
at org.drools.common.DefaultAgenda.scheduleItem(DefaultAgenda.java:314)
at
org.drools.reteoo.RuleTerminalNode.assertLeftTuple(RuleTerminalNode.java:185)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:78)
at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:101)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:78)
at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:101)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:64)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:128)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at
org.drools.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:347)
at
org.drools.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:229)
at
org.drools.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:443)
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1471)
... 29 more
Can anybody please help me.
Thanks in advance.
Armin
--
View this message in context: http://drools.46999.n3.nabble.com/Problem-with-rule-Unexpected-exception-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Re: [rules-users] execute particular rules programmatically and dynamically
by Robert Christenson
We've come across something similar in our project just recently as well.
We have a requirement to have some rules activate based on a tab-off action but also at a higher level (such as validating an entire event entry in the GUI). I also need these rules to activate if initiated from an external webservice (no GUI at all).
What we've decided to utilize is a meta identifier in certain rules called FieldsAffected which may contain a delimited list of field identifiers.
An AgendaFilter implementation is created for GUI side requests and passed to fireAllRules. The filter implementation compares any/all field identifiers passed within the request and keeps only those activations which contain the field identifier in it's metadata field.
Our RHS creates a validation msg which contains the field identifiers so that the calling GUI can display the proper msgs to the field.
This allows us to support multiple call scenarios without duplicating the logic in multiple rules just based on context info.
Hope this helps,
Bob Christenson
> ------------------------------
>
> Message: 2
> Date: Thu, 14 Apr 2011 15:23:44 +0800
> From: Benson Fung <benson.redhat(a)gmail.com>
> Subject: Re: [rules-users] execute particular rules programmatically
> and dynamically
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID: <BANLkTi=OGO=rWFEnYBHM144GVSt+P_KVtQ(a)mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks Michael, let me think about your solution seriously afterwards.
> Actually, I am using GWT.
> I would like to say that sometimes customer's requirement is picky and
> unexpectable. They really want to have close coupling between UI and
> Rules. haha..... :) Do you think it is helpless as a
> consultant??? :~(
>
> If anyone has another idea of this scenario, you are welcome to post
> your idea out there.
>
>
> Thank you very much
>
>
>
> 2011/4/14 Michael Anstis <michael.anstis(a)gmail.com>:
>> In my example Rule 1 was shared between "screen1.panel1.editbox1" and
>> "screen1.panel1.editbox2":-
>>
>> rule "Rule1"
>> ? salience 1
>> ? dialect "mvel"
>> ??? when
>> ????? ApplicationContext( context in ("screen1.panel1.editbox1",
>> "screen1.panel1.editbox2") )
>> ? ? ? ad : ApplicationData( age == "" || ( ?== null ))
>> ? ? then
>> ? ??? ad.setReturnMsg( "\n age should not be null or empty" );
>> end
>>
>> This is an approach and may not be the best available; I was trying to
>> demonstrate how your problem can be solved without having to worry about
>> explicitly executing individual rules.For example, depending on what UI
>> technology you are using (Swing, JSF) you could subclass the UI components
>> and use these as facts - but such close coupling between UI and Rules may be
>> undesirable.
>>
>> With kind regards,
>>
>> Mike
>>
>> On 14 April 2011 03:52, Benson Fung <benson.redhat(a)gmail.com> wrote:
>>>
>>> Good, Michael.
>>>
>>> 'context' is used to distinguish which part of the UI which will be
>>> validated, right? ?The customer will ask if they have 10000 rules in
>>> the rulebase. ?And some of them are redundant, so they want to make
>>> some of the rules share with several part of UI, e.g. ?editbox 6,
>>> editbox 7 and editbox 8 these 3 boxes' value range is within 0 and
>>> 600. ?Therefore, Rule3 can be shared for these 3 editbox validation,
>>> right? ?However, for the context variable approach, it seems Rule3
>>> cannot be shared for another editbox with same value range validation.
>>> ?So these could be a key for the BRMS/Drools.
>>>
>>>
>>> Benson
>>>
>>> 2011/4/14 Michael Anstis <michael.anstis(a)gmail.com>:
>>>> Sure, whenever you copy values from your UI to your model for validation
>>>> you
>>>> also enter a fact representing the "context" of the values.
>>>>
>>>> Using your example you have two edit boxes on one screen and your rule
>>>> simply checks for the value of a single edit box; in this case the
>>>> context
>>>> differentiates the two.
>>>>
>>>> Walking your example:
>>>>
>>>> (1) When editbox 1 looses focus you copy the value from the dropdown and
>>>> edit box 1 into your model, plus you enter a "context" fact stating that
>>>> these values relate to that part of the UI (say
>>>> "screen1.panel1.editbox1").
>>>> You then insert these facts into WM and call fireAllRules. The rules
>>>> check
>>>> the "context" and only execute if the values are for the (rule)
>>>> applicable
>>>> context. (2) Editbox 2 works in a similar way, but has a different
>>>> context
>>>> ((say "screen1.panel1.editbox2").
>>>>
>>>> Have a look at Plugtree - I believe they're quite well customed to
>>>> writing
>>>> UIs backed with rules; salaboy or esteban (or IRC #drools) might be able
>>>> to
>>>> offer more practical advice.
>>>>
>>>> With kind regards,
>>>>
>>>> Mike
>>>>
>>>>
>>>>
>>>> On 13 April 2011 17:48, Benson Fung <benson.redhat(a)gmail.com> wrote:
>>>>>
>>>>> Hi Michael,
>>>>>
>>>>> Can you elaborate more for the uses of the ApplicationContext? ?I
>>>>> can't follow its uses.
>>>>>
>>>>>
>>>>> Thanks
>>>>> Benson
>>>>>
>>>>> 2011/4/14 Michael Anstis <michael.anstis(a)gmail.com>:
>>>>>> Here's a quick (and probably sub-optimal way) ;)
>>>>>>
>>>>>> When you copy values from the UI to Facts for validation you also
>>>>>> include
>>>>>> the context of the validation.
>>>>>>
>>>>>> I've also removed the inline evals you were using.
>>>>>>
>>>>>> rule "Rule1"
>>>>>> ? salience 1
>>>>>> ? dialect "mvel"
>>>>>> ??? when
>>>>>> ????? ApplicationContext( context == "*" )
>>>>>> ? ? ? ad : ApplicationData( age == "" || ( ?== null ))
>>>>>> ? ? then
>>>>>> ? ??? ad.setReturnMsg( "\n age should not be null or empty" );
>>>>>> end
>>>>>>
>>>>>> rule "Rule2"
>>>>>> ? dialect "mvel"
>>>>>> ??? when
>>>>>> ? ??? ApplicationContext( context == "screen1.panel1.ed" )
>>>>>> ? ? ? ad : ApplicationData( $age : age != null , age != "" , age < 0
>>>>>> ||
>>>>>>>
>>>>>> 100, minIssrdAge == "Years" )
>>>>>> ? ? then
>>>>>> ? ??? ad.setReturnMsg( "\nage is out of the range(i.e. ?< 0 and >
>>>>>> 100)"
>>>>>> );
>>>>>> end
>>>>>>
>>>>>> rule "Rule3"
>>>>>> ?? dialect "mvel"
>>>>>> ? ?? when
>>>>>> ? ? ?? ad : ApplicationData( $age : age != null , age != "" , age <0
>>>>>> ||
>>>>>>>
>>>>>> 600, minIssrdAge == "Years" )
>>>>>> ? ?? then
>>>>>> ? ? ?? ad.setReturnMsg( "\nage is out of the range(i.e. ?< 0 and >
>>>>>> 600)"
>>>>>> );
>>>>>> end
>>>>>>
>>>>>> On 13 April 2011 17:19, Benson Fung <benson.redhat(a)gmail.com> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Here is the scenario :
>>>>>>>
>>>>>>> If there are 2 edit boxes and 2 dropdown list at the frontend like.
>>>>>>>
>>>>>>>
>>>>>>> dropdown(minIssrdAge1) ? editbox(age1)
>>>>>>> dropdown(minIssrdAge2) ? editbox(age2)
>>>>>>>
>>>>>>> everytime when I lost focus the editbox(age1 or age2), ?the
>>>>>>> editbox(age1 or age2) value will be validated against the following
>>>>>>> rules.
>>>>>>> i.e. ?minIssrdAge1 and age1 will be validated together if lost focus
>>>>>>> the editbox age1.
>>>>>>> ? ? ? minIssrdAge2 and age2 will be validated together if lost focus
>>>>>>> the editbox age2
>>>>>>>
>>>>>>> Rule1 is mandatory because both editbox are required field.
>>>>>>> However, editbox(age1) is only valid within the 0 and 100. ?and
>>>>>>> editbox(age2) is only valid within 0 and 600.
>>>>>>>
>>>>>>> In other words, editbox(age1) have to be validated against Rule1 +
>>>>>>> Rule2. ?However, editbox(age2) have to validated against Rule1 +
>>>>>>> Rule3.
>>>>>>>
>>>>>>> My question, how to design the rule attribute or at the java program
>>>>>>> side so that different editbox can be validated against different
>>>>>>> rule.
>>>>>>>
>>>>>>> Please help. ?I can't find any solution by now.
>>>>>>>
>>>>>>> rule "Rule1"
>>>>>>> ? ? ? ?salience 1
>>>>>>> ? ? ? ?dialect "mvel"
>>>>>>> ? ? ? ?when
>>>>>>> ? ? ? ? ? ? ? ?ad : ApplicationData( age == "" || ( ?== null ))
>>>>>>> ? ? ? ?then
>>>>>>> ? ? ? ? ? ? ? ?ad.setReturnMsg( "\n age should not be null or empty"
>>>>>>> );
>>>>>>> end
>>>>>>>
>>>>>>>
>>>>>>> rule "Rule2"
>>>>>>> ? ? ? ?dialect "mvel"
>>>>>>> ? ? ? ?when
>>>>>>> ? ? ? ? ? ? ? ?ad : ApplicationData( $age : age != null , age != ""
>>>>>>> ,
>>>>>>> minIssrdAge
>>>>>>> == "Years" )
>>>>>>> ? ? ? ? ? ? ? ?eval(Integer.parseInt($age) < 0) or
>>>>>>> eval(Integer.parseInt($age) > 100)
>>>>>>> ? ? ? ?then
>>>>>>> ? ? ? ? ? ? ? ?ad.setReturnMsg( "\nage is out of the range(i.e. ?< 0
>>>>>>> and >
>>>>>>> 100)" );
>>>>>>> end
>>>>>>>
>>>>>>> rule "Rule3"
>>>>>>> ? ? ? ?dialect "mvel"
>>>>>>> ? ? ? ?when
>>>>>>> ? ? ? ? ? ? ? ?ad : ApplicationData( $age : age != null , age != ""
>>>>>>> ,
>>>>>>> minIssrdAge
>>>>>>> == "Years" )
>>>>>>> ? ? ? ? ? ? ? ?eval(Integer.parseInt($age) < 0) or
>>>>>>> eval(Integer.parseInt($age) > 600)
>>>>>>> ? ? ? ?then
>>>>>>> ? ? ? ? ? ? ? ?ad.setReturnMsg( "\nage is out of the range(i.e. ?< 0
>>>>>>> and >
>>>>>>> 600)" );
>>>>>>> end
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
13 years, 11 months
Rule Templates
by FrankVhh
Hi all,
In the Expert Guide and on some places on the internet, I read about Rule
Templates.
I think this is a very interesting feature. However, the expert manual
states to use it with caution as it is still an experimental feature.
Also, there isn't that much information on the web either.
Is it already encouraged to use it in production, or is it still very much
in a development phase and should it only be used for educational purposes?
Thanks a lot & lots of regards,
Frank
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820139.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
execute particular rules programmatically and dynamically
by Benson Fung
Hi,
If there are 10 rules in the drools rulebase, and right now I would
like to execute one of the particular rule. Is there any approach/way
to execute particular rule programmatically? I don't think
agenda-group or activation-group can do that, right? Or is it
possible to create an agenda programmatically ?
Thanks
13 years, 11 months
Retrieving rule configuration
by Randhish Raghavan
Hello,
A sample rule that I have created is listed below:
rule 'Abnormal time MBP Enrollment'
dialect 'mvel'
ruleflow-group "enrl.ruleflowgroup.detailRuleFlowGroup"
when
ruleData : EnrlRuleData()
then
-----
end
Is there any way I can retrieve the rule flow group name ("enrl.ruleflowgroup.detailRuleFlowGroup") when rules are loaded (Ex: using KnowledgeBaseListener)?
Thanks
Randhish
________________________________
http://www.mindtree.com/email/disclaimer.html
13 years, 11 months
Expert versus Expert
by Charles SOUILLARD
Hi all,
i'm a newbie on Drools and want to understand the general architecture of
the solution.
Is it true that Drools Guvnor helps managing rules definition but it is not
a rule server ? Meaning we can define, update, archive, test... rules but
not execute them in Guvnor?
My understanding is that Drools expert is the engine, let's say the rules
server) on which one rules are executed. Is there any graphical tool to
manage this engine? I mean to add/remove rules, access a dashboard... Is it
drools-server.war?
Is there any pre installed runtime environment with the engine and - if
there is one - the management console?
I tried drools-install.zip with ant install.demo but it doesn't work for
me...
Thanks a lot for your feedback, I'm waiting to test it!
Charles Souillard
13 years, 11 months
deploy jbpm as service
by giuliano uboldi
i'm a new jbpm user, and i have to create a workflow web service in a SOA
architecture.
Basically i think i have to expose methods for:
- retrieve the list of possible tasks to start
- start a task
- get the task of a user
- get the parameters for a user task to create the form
- update a task after user interaction
- some other operations...
I can't find documentations on how to do this basic operations, for example:
how get the list of the possible process to start?
if i set the task owner in a process variable, how can i get the task that
person owns?
how get the params declared in a usertask as "Parameter Mapping" or "Result
Mapping" to create the user form?
The javadocs are very poor, i can't find any example, i don't know if
there's a better approach to do this.
tanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/deploy-jbpm-as-service-tp2820346p282034...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Problem using Guvnor rules in eclipse
by Sumeet Karawal
Hi All,
Could you please help me on this. I am trying to create rules in Guvnor and
then using those in eclipse.
These are the steps that I am doing
1) I have created a POJO in eclipse
2) Exported as .jar and uploading it in Guvnor under a package.
3) I have created rules also in Guvnor and the test scenario there is also
working fine.
4) I build the package and the binaries get generated.
But I am not getting how to use those rule in my Java Application running
on Eclipse. I have gone through the user guide and forums also but not
getting the concrete solution for this.
>From somewhere I got the following code :
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent
( "MyAgent" );
kagent.applyChangeSet( ResourceFactory.newUrlResource( url ) );
KnowledgeBase kbase = kagent.getKnowledgeBase();
But how to work according to it. Which url I have to give here, also I am
not able to locate the changeset.xml.
Also what should I write in the .properties file and how to refer to that.
Please it would be very helpful if anyone could provide help to me on this
as I am stuck from last 4 days on this. Is there any example that I can
refer to?
Thanks and Regards,
Sumeet
Mailto: sumeet.karawal(a)tcs.com
rules-users(a)lists.jboss.org
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
13 years, 11 months