In your Action column you should have:

ACTION
<blank>
singleStatus.setAnswer("$param");

cheers
Steve

On 5/1/07, Hehl, Thomas <[EMAIL PROTECTED]> wrote:

 OK, here's my rules table:



*RuleTable Court***



CONDITION

CONDITION

ACTION

singleStatus: SingleParticipantStatus

singleStatus: SingleParticipantStatus

singleStatus: SingleParticipantStatus

statusType

value

singleStatus.setAnswer("$param");



And this generates a rule that looks like this, for example:



     then singleStatus: SingleParticipantStatus.singleStatus.setAnswer
("statusOnly");;



This generates an error b/c it doesn't know how to resolve
SingleParticipantStatus.singleStatus.setAnswer, which is where the error
below is coming from.



So I changed the rule table to simply say:



setAnswer("$param");



Which generates:



      then

            singleStatus: SingleParticipantStatus.setAnswer
("statusOnly");;



Which causes the non-static method error since setAnswer is an instance
method.



Can anyone tell me what I'm doing wrong?



Thanks.


 ------------------------------

*From:* Hehl, Thomas
*Sent:* Monday, April 30, 2007 8:42 AM
*To:* 'rules-users@lists.jboss.org'
*Subject:* Newbie: using a spreadsheet



I've been following the ExamplePricePolicy example and am attempting to
build my own rules using a spreadsheet.



In my spreadsheet rules, I have the following:



ACTION

singleStatus: SingleParticipantStatus

singleStatus.setAnswer("$param");



This throws:



org.drools.rule.InvalidRulePackage: Rule Compilation error
SingleParticipantStatus.singleStatus cannot be resolved

Rule Compilation error SingleParticipantStatus.singleStatus cannot be
resolved

Rule Compilation error SingleParticipantStatus.singleStatus cannot be
resolved

Rule Compilation error SingleParticipantStatus.singleStatus cannot be
resolved

Rule Compilation error SingleParticipantStatus.singleStatus cannot be
resolved



When I googled on this error, most of the occurrences appeared to be
related to an import issue, but if I change the third line to:



setAnswer("$param");



It blows up because it knows that setAnswer is not a static method, which
tends to tell me that it found my class.



I think I've parroted the example exactly and so I'm confused as to where
to go with this issue.



Thanks!

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to