Guvnor 5.5.0.Final Web decision table's advanced enum is not working.
by Soumya.plavaga
Hi,
We are trying to use the advanced enumeration with guvnor 5.5.0.Final. But
seems not working for us. We are doing this -
Having model cascadedModel. CascadedModel has following fields -
1. categoryField (Type Text)
2. departmentField. (Type Text)
Cascaded model has a fact called -
cascadedFact.
Created an enum called cascadedEnum having following -
Fact => 'cascadedFact'
Field => 'categoryField'
Context => '(new
com.ugamsolutions.projectname.guvnorhelper.CategoryListing()).getAttributeListByName("categoryName")'
Fact => 'cascadedFact'
Field => departmentField[categoryField]
Context => '(new
com.ugamsolutions.projectname.guvnorhelper.DepartmentListing()).getAttributeListByNameAndCategoryIdString("departmentName","@{categoryField}")'
And using these two enums in a web decision table's drop down. First drop
down suppose to display all the categories returned for 'categoryField' and
second dropdown will return the departments based upon category dropdown
selection.
Here my case Category drop down is listing properly, no issues. But upon
category selection department dropdown is not loading at all. Actually I can
see '{@categoryField} in enum is not replacing the primary drop down's
selected value. Can you please take a look and let me know if there is any
issue with the advanced dropdown with web decision table in guvnor
5.5.0.Final war?
Any help will be really appriciated.
Many Thanks,
Soumya
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-5-0-Final-Web-decision-table-s...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Re: [rules-users] Drools 5.5 : Problems with big rules file (~1.5Meg)
by Nicolas Héron
Hi,
Tell me if your need more help.
Cheers
Nicolas Héron
2013/9/17 peter.kutzner [via Drools] <ml-node+s46999n4025996h9(a)n3.nabble.com
>
> Hi Nicolas
>
> No, i don't create any objects within the rules.
> I only update some fields.
>
> I created the rules with Guvnor and also testcases for each rule and my
> workflow.
> And all of them are green and do not produce infinite loops.
> But after running some testcases, i got the same errors as in my test
> programm.
>
> Usually the exception that is thrown referes to:
> *Exception in thread "main" Exception executing consequence for rule
> "MyRule_01" in com.myrules: java.lang.RuntimeException: cannot invoke
> method: update
> at
> org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
>
> ...
> Caused by: java.lang.NoSuchMethodError:
> com.mymodel.MyEnum.compareTo(Lcom/mymodel/MyEnum;)I
> at ConditionEvaluator6e5efa52c5ec4cb3b427987c361bed94.evaluate(Unknown
> Source) ...*
>
> My mentioned testloop contains only five different sets of data and the
> same dataset that passes the
> first loops (3 to 9) crash on the next one. And looping with the same
> input data i got the save behvouir.
> Using different input data different rules cause the problem, same data
> same rule.
>
> Ok, i'll try to add a debug listener.
>
> Creating smaller rules files will be my next approach. But i think then i
> need to create seperate knowledgebase (for each rule chunk). That makes it
> difficult to process the workflow from one KB to the next KB (i have some
> big decision tables and i need to pass every of them to get my results)
>
> Regards
> Peter
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
> To start a new topic under Drools: User forum, email
> ml-node+s46999n47000h33(a)n3.nabble.com
> To unsubscribe from Drools, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>
> .
> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
>
-----
Nicolas Héron
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Synchronization issue in Guvnor Cluster Setup
by kulpreet_singh
Hi,
I am trying to setup a cluster for two guvnor 5.3.0 instances. I deployed
two different guvnor wars instances (different context roots) on WAS CE
2.1.1.4 server. Then, configured common/shared file based journal for both
guvnor repositories (added cluster node in repository.xml file of both
guvnor instances). But, when working on one Guvnor instance, the
corresponding updates are not reflected on other guvnor’s repository.
However, the journal log is updated with activities in both the Guvnor
repositories. I also tried by adding <distributable/> element as a child
element of the web-app element to the both Guvnors' web.xml file, but still
the synchronization issue is not resolved. Please let me know if I am
missing any configuration for cluster setup.
Thanks & Regards,
Kulpreet Singh
--
View this message in context: http://drools.46999.n3.nabble.com/Synchronization-issue-in-Guvnor-Cluster...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Issue with simple accumulate sum rule
by stelomax
I am having an issue with a very (VERY) simple rule.
This is being called from a rule flow. There are 2 "Testval" facts, both
have an "xval" of 300. When the flow is executed i get the following output
Total xval: 0.0
300
Total xval: 0.0
300
This shows me a few things
1) The rule is firing
2) My facts are populated correctly with values
However the Sum is not working and always has a result of 0.0.
------------------------------------------------------------------------------------
dialect "java"
ruleflow-group "TestSum"
when
Testval($xval2:xval)
$total:Number() from accumulate(
Testval($xval:xval),
sum($xval)
)
then
System.out.println("Total xval: " + $total);
System.out.println($xval2);
-----------------------------------
I simplified the rule to see if i was loosing my mind. With the below rule
the sum works correctly (as it is summing the static value (1). And i get
the following output:
Total xval: 2.0
------------------------------------------------------------------------------------
dialect "java"
ruleflow-group "TestSum"
when
$total:Number() from accumulate(
Testval($xval:xval),
sum(1)
)
then
System.out.println("Total xval: " + $total);
-----------------------------------
I have been racking my brain for a full day now..any pointers would be
great!
Thanks gurus
Steve
--
View this message in context: http://drools.46999.n3.nabble.com/Issue-with-simple-accumulate-sum-rule-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Re: [rules-users] Drools 5.5 : Problems with big rules file (~1.5Meg)
by Nicolas Héron
Hi,
In your rule, in the then part do you create java objects ?
THe best thing would be to have a test case that reproduce this so we can
help to find out.
You should add some listeners to see what is happening, maybe some rules do
an infinite loops or stuff like this ? You have to find out which rule, set
of rules do your effect.
I do not think it comes from drools. I did project with 200k rules, it is
slow to build the package but once this is done, the rest works perfectly.
Have you tried to cut your drl file in smaller files ?
Cheers
Nicolas
2013/9/16 peter.kutzner [via Drools] <
ml-node+s46999n4025981h44(a)n3.nabble.com>
> Hi Nicolas
>
> Thx for your quick answer.
>
> Ok, i forgot some informations:
> Using : Java6.0.45 X64 (same problems using Java 7 X64)
>
> No, i don't use listeners.
> I tried with up to 10Gig without success.
>
> My (reduced) workflow is :
>
> 1) <code>
> kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add(ResourceFactory.newClassPathResource(RULES_PATH, getClass()),
> ResourceType.DRL);
> kbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
> </code>
> 2) <code>
> StatefulKnowledgeSession ruleSession =
> kbase.newStatefulKnowledgeSession();
> </code> so far so good
> 3) insert two supporter objects in session
> 4) add two more worker objects in session
> 5) fire all rules
> 6) read and retract all expected objects
> 7) dispose session
>
> Processing Steps 2)-7) (in a loop with different worker objects, to
> produce load, so there is always only
> one session active) work fine for a view times (3-9) then the mentioned
> exception occurs.
> I also tried it with 10gig for the jvm but in either test the memoryload
> does not exceed 3gig.
>
> With a reduced rules file size (to < 500k; removed some rules, to test
> this) i can handle 300000(!)
> loops without any exceptions.
>
> Hope this infos will help.
>
> Regards
> Peter
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
> To start a new topic under Drools: User forum, email
> ml-node+s46999n47000h33(a)n3.nabble.com
> To unsubscribe from Drools, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>
> .
> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
>
-----
Nicolas Héron
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months