[jboss-jira] [JBoss JIRA] Created: (JBRULES-2414) Another test case of bugs with nested prefix-and and prefix-or conditional expressions

Nelson Axelrod (JIRA) jira-events at lists.jboss.org
Wed Jan 20 10:02:47 EST 2010


Another test case of bugs with nested prefix-and and prefix-or conditional expressions
--------------------------------------------------------------------------------------

                 Key: JBRULES-2414
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2414
             Project: Drools
          Issue Type: Sub-task
      Security Level: Public (Everyone can see)
          Components: drools-compiler (expert)
    Affects Versions: 5.0.1.FINAL
         Environment: Drools 5.0.1 on windows, jdk1.6.0_13
            Reporter: Nelson Axelrod
            Assignee: Mark Proctor


Edson recommended submission of this ticket to JIRA -- rules-users Digest, Vol 38, Issue 58

rule "test lysine decarboxylase"
when
      (or
            (and
                  blast_hit : BlastHit( hitId=='GB|AAQ16631.1')
                  gene1 : Feature( featureId == blast_hit.queryId )
            )
            (or
                  (and
                        blast_hit : BlastHit( hitId=='GB|AAQ16631.1' )
                        gene1 : Feature( featureId == blast_hit.queryId )
                  )
                  (and
                        hmm_hit1 : HmmHit( hitId=='TIGR00905' )
                        gene1 : Feature( featureId == hmm_hit1.queryId )
                        gene2 : Feature( eval(gene2.isWithin(gene1, 500)) )
                  )
            )
      )
then      
      Annotation a = new Annotation("lysine decarboxylase CadA");
      gene1.addAnnotation(a);
end

Exception in thread "main"
org.jcvi.annotation.rulesengine.RulesResourceException: Could not parse
resource in [FileResource
file='C:\development\workspace\RulesBasedAnnotation\tests\org\jcvi\annot
ation\rules\testNestedOr.drl'] with errors
[14,4]: [ERR 101] Line 14:4 no viable alternative at input 'blast_hit'
in rule "2645|lysine decarboxylase CadA" in pattern or[22,2]: [ERR 102]
Line 22:2 mismatched input ')' expecting 'then' in rule "2645|lysine
decarboxylase CadA"
	at
org.jcvi.annotation.rulesengine.RulesEngine.addResource(RulesEngine.java
:103)
	at
org.jcvi.annotation.rulesengine.RulesEngine.addResource(RulesEngine.java
:83)
	at org.jcvi.annotation.Aruba.addRuleByFile(Aruba.java:68)
	at org.jcvi.annotation.Aruba.main(Aruba.java:253)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list