[rules-users] accessing items from the StatelessKnowledgeSession
Wolfgang Laun
wolfgang.laun at gmail.com
Wed Aug 31 03:33:31 EDT 2011
On 31 August 2011 06:44, Warner Onstine <warnero at gmail.com> wrote:
> I have passed in some lists into the
>
Don't insert lists; insert list elements instead.
> StatelessKnowledgeSession.execute() method and would like to figure
> out how to get access.
>
> I have the following items passed in:
> - Player
> - EarnedBadges (list)
> - Badges (list)
>
> and am trying to do something like this:
> not (EarnedBadge(playerId == $player.id, badge == $badge) from
> $earnedBadges)
>
$earnedBadges must be bound to a fact.
>
> but it doesn't know how to evaluate earnedBadges (the name of the
> variable I passed in):
>
You don't pass in "variables". (Or are you are talking about a "global
variable"?)
-W
> [Unable to Analyse Expression $earnedBadges:
> [Error: unable to resolve method using strict-mode:
> java.lang.Object.$earnedBadges()]
> [Near : {... $earnedBadges ....}]
>
> Been searching through the docs on how to do this but I haven't found
> anything yet.
>
> Any help is greatly appreciated, thank you! :-).
>
> -warner
> _______________________________________________
> 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/20110831/a4725e4c/attachment.html
More information about the rules-users
mailing list