Sorry for not explaining it before, Mauricio. My intent is to abstract the attribute's setting of a class. I'll try to explain the context:
On a defined class i've got certain fields which I tagged with annotations. I want to automate the setting of these fields from certain objects matched by a rule, the matching between the class fields and the objects would be the identifiers. The field annotation holds the expected identifier to match. Thus, a general method would be capable to set the fields of any class just passing to it the class fields and the identifiers metadata.
What i've been developing is related with situation detection. The 'class' I refer above is a situation type and the attributes are roles that an entity can play in a situation. Each situation type has a rule that defines when it is active and must instantiate a new situation and set the participant entities.
I''ll talk more about what i'm working on as soon as i get time to write.
Thanks for the help,
2011/9/19 Mauricio Salatino
<salaboy@gmail.com>
You can get metadata using the kcontext variable but I'm not sure if you can get the information about the identifiers.Can you describe what are you looking to achieve? because the rule is fixed and the identifiers as well. Why do you want to do reflection like stuff in the RHS? I'm just curious..
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Isaac Pereira