[rules-users] jaxb generated fact loaded into Guvnor throws errors when using the ' is contained in the comma separated list' operator
Michael Anstis
michael.anstis at gmail.com
Tue Jul 19 04:25:47 EDT 2011
Can you try without Guvnor, i.e. native DRL and KnowledgeBases?
This will help us identify whether this is a Guvnor issue of Drools engine.
Thanks.
2011/7/19 <Sreeram.Vadlamudi at wellsfargo.com>
> Hi Mike,****
>
> ** **
>
> Thank You for your responses.****
>
> ** **
>
> My apologies.****
>
> ** **
>
> I did miss copying the closing bracket.the issue still exists though . I
> suspect whether the way the code has been generated by jaxb has anything to
> do with it.****
>
> ** **
>
> In the xml, the field is all upper case as ****
>
> <xs:element type="xs:string" name="ACTIVITYCODE"/>****
>
> ** **
>
> I see that JAXB generated the code as follows.****
>
> ** **
>
> @XmlElement(name = "ACTIVITYCODE", required = true)****
>
> protected String activitycode;****
>
> ** **
>
> /******
>
> * Gets the value of the activitycode property.****
>
> * ****
>
> * @return****
>
> * possible object is****
>
> * {@link String }****
>
> * ****
>
> */****
>
> public String getACTIVITYCODE() {****
>
> return activitycode;****
>
> }****
>
> ** **
>
> /******
>
> * Sets the value of the activitycode property.****
>
> * ****
>
> * @param value****
>
> * allowed object is****
>
> * {@link String }****
>
> * ****
>
> */****
>
> public void setACTIVITYCODE(String value) {****
>
> this.activitycode = value;****
>
> }****
>
> ** **
>
> rule "Row 1 dds"****
>
> ruleflow-group "None"****
>
> dialect "mvel"****
>
> when****
>
> factClass : FACTCLASS( ACTIVITYCODE in ("A", "B"))****
>
> ** **
>
> ** **
>
> ** **
>
> *From:* rules-users-bounces at lists.jboss.org [mailto:
> rules-users-bounces at lists.jboss.org] *On Behalf Of *Michael Anstis
> *Sent:* Monday, July 18, 2011 2:15 PM
> *To:* Rules Users List
> *Subject:* Re: [rules-users] jaxb generated fact loaded into Guvnor throws
> errors when using the ' is contained in the comma separated list' operator
> ****
>
> ** **
>
> Unless you have copied and pasted incorrectly, the rule should read:-****
>
> 3. | rule "Row 1 dds"****
>
> 4. | ruleflow-group "None"****
>
> 5. | dialect "mvel"****
>
> 6. | when****
>
> 7. | factClass : FACTCLASS( ACTIVITYCODE in ("A", "B")
> *) \\<0--- note closing bracket*****
>
> 8. | then****
>
> 9. | factClass.setRATE( "5.25" );****
>
> 10. | end****
>
> ** **
>
> On 18 July 2011 20:57, Michael Anstis <michael.anstis at gmail.com> wrote:***
> *
>
> There is a closing bracket missing in the generated DRL.
>
> This is a bug. Please raise a JIRA and assign to me and I'll fix for
> 5.3.0.Beta1.
>
> With kind regards,
>
> Mike****
>
> 2011/7/14 <Sreeram.Vadlamudi at wellsfargo.com>****
>
> Hello ,****
>
> ****
>
> I am using 5.2.0.CR1 version of Guvnor .****
>
> ****
>
> I have a jaxb generated class loaded through the model jar into Guvnor to
> be used as a fact in the Guided Decision Table editor.****
>
> ****
>
> When I use a field ACTIVITYCODE of type String from the JAXB generated
> class with ‘ is contained in the comma separated list' operator, I get
> compilation errors. ****
>
> ****
>
> Unable to Analyse Expression ACTIVITYCODE == "A" || ACTIVITYCODE == "B":
> [Error: no such identifier: ACTIVITYCODE] [Near : {... ACTIVITYCODE == "A"
> || ACTIVI ....}] ^ [Line: 1, Column: 1]****
>
> ****
>
> But when I use equal to operator to compare value to just a string value,
> it compiles fine. ****
>
> ****
>
> This rule fails.****
>
> ****
>
> *3. *| rule "Row 1 dds"****
>
> 4. | ruleflow-group "None"****
>
> 5. | dialect "mvel"****
>
> 6. | when****
>
> 7. | factClass : FACTCLASS( ACTIVITYCODE in ("A", "B")*
> ***
>
> 8. | then****
>
> 9. | factClass.setRATE( "5.25" );****
>
> 10. | end****
>
> ****
>
> The below rule compiles fine.****
>
> ****
>
> ****
>
> *3. *| rule "Row 1 dds"****
>
> 4. | ruleflow-group "None"****
>
> 5. | dialect "mvel"****
>
> 6. | when****
>
> 7. | factClass : FACTCLASS ( ACTIVITYCODE =="A") ****
>
> 8. | then****
>
> 9. | factClass.setRATE( "5.25" );****
>
> 10. | end****
>
> ****
>
> Is this issue being caused by jaxb generated class? If so, is there a way
> to fix this problem?****
>
> ****
>
> When I use a regular pojo that is not jaxb generated, the ****
>
> ****
>
> is contained in the comma separated list' operator works fine.****
>
> ****
>
> Can someone provide any direction or thoughts on this?****
>
> ****
>
> Thanks,****
>
> ****
>
> Ram****
>
> ****
>
> ****
>
> ****
>
> ****
>
> ** **
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users****
>
> ** **
>
> ** **
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110719/2074bab7/attachment.html
More information about the rules-users
mailing list