[rules-users] unable to create field extractor for tickerId
FrankVhh
frank.vanhoenshoven at agserv.eu
Thu Apr 21 05:54:20 EDT 2011
"Unable to create FIeld extractor", mostly that is because you did not
declare getters and in your java class.
Drools uses the getters to extract the needed values.
Make sure you use the correct naming conventions as well. I.e. public int
getTicketId(){...}
Regards,
frank
sirinath wrote:
>
> declare ReqMktData
> @role( event )
> end
>
> declare TickPrice
> @role( event )
> @expires( 2m )
> end
>
> declare TickSize
> @role( event )
> @expires( 2m )
> end
>
>
> rule "Bids"
>
> when
> $req: ReqMktData($tickerId : tickerId) from entry-point "IB Events"
> $bidprice: TickPrice(field == 1, tickerId == $tickerId, this after $req)
> from entry-point "IB Events"
> $bidsize: TickSize(field == 0, tickerId == $tickerId, this after $req)
> from entry-point "IB Events"
> then
> Bid bid = new Bid($tickerId, $req.contract, size, price);
> insert(bid);
> end
>
>
>
>
>
>
> public class ReqMktData {
> public int tickerId;
> public Contract contract;
> public String genericTickList;
> public boolean snapshot;
> }
>
--
View this message in context: http://drools.46999.n3.nabble.com/unable-to-create-field-extractor-for-tickerId-tp2846413p2846464.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list