[JBoss JIRA] Commented: (JBRULES-318) eval() not re-evaluated when objects were modified
by Edson Tirelli (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-318?page=comments#action_12339476 ]
Edson Tirelli commented on JBRULES-318:
---------------------------------------
Commited to 3.0.x branch in revision 5060.
$ svn commit drools-core/src/main/java/org/drools/reteoo/JoinNode.java drools-compiler/src/test/java/org/drools/integrationtests/
IntegrationCases.java drools-compiler/src/test/resources/org/drools/integrationtests/test_JoinNodeModifyObject.drl
Sending drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
Sending drools-compiler/src/test/resources/org/drools/integrationtests/test_JoinNodeModifyObject.drl
Sending drools-core/src/main/java/org/drools/reteoo/JoinNode.java
Transmitting file data ...
Committed revision 5060.
> eval() not re-evaluated when objects were modified
> --------------------------------------------------
>
> Key: JBRULES-318
> URL: http://jira.jboss.com/jira/browse/JBRULES-318
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.0.1
> Environment: JBossRules 3.0.1
> Eclipse 3.2 rc7
> JDK 5
> Reporter: Jean-Pierre GRILLON
> Assigned To: Edson Tirelli
> Fix For: 3.0.3
>
> Attachments: Drools-eval.zip
>
>
> I face a problem (bug?): I have a condition using ?eval? which doesn?t seem to be reevaluated when objects are modified.
> The class NumberTest wraps a number (field nb) and the index (field index).
> The rule gets 2 NumberTest, the first number is greater than the second one ; and the eval condition should test that the first index is less than the second. But the rule is fired even if this condition is not fulfilled (see the check function).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
20 years
[JBoss JIRA] Closed: (JBSEAM-297) Incomplete/wrong explanation of @IfInvalid
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-297?page=all ]
Gavin King closed JBSEAM-297.
-----------------------------
Fix Version/s: 1.1
Resolution: Done
Assignee: Gavin King
removed @IfInvalid from the docs.
> Incomplete/wrong explanation of @IfInvalid
> ------------------------------------------
>
> Key: JBSEAM-297
> URL: http://jira.jboss.com/jira/browse/JBSEAM-297
> Project: JBoss Seam
> Issue Type: Bug
> Components: Documentation, Examples
> Affects Versions: 1.0.1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Priority: Minor
> Fix For: 1.1
>
>
> The code listing in Seam reference 12.1 shows how @IfInvalid is applied to an action method. This code example is incomplete, the user variable also needs a @Valid annotation, otherwise no validation will be triggered. A debug message in ValidationInterceptor for "doing validation on component: foo" would have made this easier to find as well.
> The booking example doesn't use @IfInvalid/@Valid at all. However, the exp/registerExp.html file shows the correct use of @IfInvalid and @Valid. This example should be copied to the reference documentation 12.1. Then either @IfInvalid/@Valid should be used in the booking example, or the explanation should be changed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
20 years
[JBoss JIRA] Closed: (JBSEAM-292) Method annoted with @Begin not always begin long running conversations
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-292?page=all ]
Gavin King closed JBSEAM-292.
-----------------------------
Resolution: Done
fixed, please test
> Method annoted with @Begin not always begin long running conversations
> ----------------------------------------------------------------------
>
> Key: JBSEAM-292
> URL: http://jira.jboss.com/jira/browse/JBSEAM-292
> Project: JBoss Seam
> Issue Type: Bug
> Affects Versions: 1.0.1
> Environment: jboss 4.0.4GA ejb RC8-FD, myfaces 1.1.3
> Reporter: Michael Steiner
> Assigned To: Gavin King
> Priority: Blocker
> Fix For: 1.1
>
> Attachments: seam-test-case.war
>
>
> I have 2 components itemsList and ItemEditor. ItemList prepare dataModel list and also has method select() which raise event "itemSelected". ItemEditor has method itemSelected() annotated with @Begin and @Observe("itemSelected"). If user select item from list then method ItemList.select() is called, event is raised then method ItemEditor.itemSelected() is called so conversation should begin but it doeas only if after select users is redirect to another view (in navigation rule is <redirect />) or if in forwarded view is <h:form /> element.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
20 years
[JBoss JIRA] Updated: (JBRULES-358) RuleBase.removePackage does not work
by Mark Proctor (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-358?page=all ]
Mark Proctor updated JBRULES-358:
---------------------------------
Component/s: Reteoo
Fix Version/s: 3.0.3
Affects Version/s: 3.0.2
3.0.1
3.0
Assignee: Edson Tirelli (was: Mark Proctor)
> RuleBase.removePackage does not work
> ------------------------------------
>
> Key: JBRULES-358
> URL: http://jira.jboss.com/jira/browse/JBRULES-358
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Reteoo
> Affects Versions: 3.0, 3.0.1, 3.0.2
> Environment: eclipse IDE 3.12 JBoss Rules 3.0.1 recompiled with debug information
> Reporter: Giovanni Cuccu
> Assigned To: Edson Tirelli
> Fix For: 3.0.3
>
>
> Here is the complete test case to reproduce the error:
> package simpletest;
> import java.io.InputStreamReader;
> import java.util.List;
> import mit.rules.test.TestRules;
> import org.drools.RuleBase;
> import org.drools.RuleBaseFactory;
> import org.drools.WorkingMemory;
> import org.drools.audit.WorkingMemoryFileLogger;
> import org.drools.compiler.PackageBuilder;
> public class TestRemovePackage {
>
> public static void main(String[] args) throws Exception {
> // TODO Auto-generated method stub
> final PackageBuilder builder = new PackageBuilder();
> builder.addPackageFromDrl( new InputStreamReader( TestRemovePackage.class.getResourceAsStream( "testremove.drl" ) ) );
>
> final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
> String packageName=builder.getPackage().getName();
> System.out.println("Package Name " + packageName);
> ruleBase.addPackage( builder.getPackage() );
>
> final WorkingMemory workingMemory = ruleBase.newWorkingMemory();
> fireRules(workingMemory);
> RuleBase ruleBaseWM=workingMemory.getRuleBase();
> System.out.println("ruleBase" + ruleBaseWM.toString());
> ruleBaseWM.removePackage(packageName);
> final PackageBuilder builder1 = new PackageBuilder();
> builder1.addPackageFromDrl( new InputStreamReader( TestRules.class.getResourceAsStream( "testremove2.drl" ) ) );
> ruleBaseWM.addPackage(builder1.getPackage());
> fireRules(workingMemory);
>
>
> }
>
> public static void fireRules(WorkingMemory workingMemory) {
> final WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger( workingMemory );
> logger.setFileName( "log/testcup" );
> final boolean dynamic = false;
>
> workingMemory.assertObject( new Precondition(
> "genericcode","genericvalue"),
> dynamic );
>
> workingMemory.fireAllRules();
> List listaStrutture=workingMemory.getObjects(AssertedObject.class);
> if (listaStrutture==null) {
> System.err.println("Nessuna struttura eroga quello che chiedi");
> }
> for (int i=0;i<listaStrutture.size();i++) {
> AssertedObject assObj=(AssertedObject)listaStrutture.get(i);
> System.out.println("found:" +
> assObj.getValue());
> }
> logger.writeToDisk();
> }
> }
> package simpletest;
> public class Precondition {
> private String code;
> private String value;
>
> public Precondition(String code, String value) {
> super();
> // TODO Auto-generated constructor stub
> this.code = code;
> this.value = value;
> }
> public String getValue() {
> return value;
> }
> public void setValue(String value) {
> this.value = value;
> }
> public String getCode() {
> return code;
> }
> public void setCode(String code) {
> this.code = code;
> }
>
> }
> package simpletest;
> public class AssertedObject {
> private String value;
> public String getValue() {
> return value;
> }
> public void setValue(String value) {
> this.value = value;
> }
> public AssertedObject(String value) {
> // TODO Auto-generated constructor stub
> this.value = value;
> }
>
>
> }
> and here is the drl file
> package simpletest;
> import simpletest.Precondition;
> import simpletest.AssertedObject;
> rule rule1
> salience 10
> when
> p: Precondition ( code == "genericcode")
> then
> assert( new AssertedObject( "value1") );
> assert( new AssertedObject( "value2") );
> end
> rule rule2
> when
> p: Precondition ( code == "genericcode", value=="genericvalue")
> then
> assert( new AssertedObject( "value3") );
> assert( new AssertedObject( "value4") );
> end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
20 years