Currently mapping expressions can be used in the Rules Componen in a <globals> section of the configuration. Please see the "Mapping Global Variables" section of the documentation: https://docs.jboss.org/author/display/SWITCHYARD/Rules+Services
It would be a good addition to similarly be allowed to configure a <facts> section, where the results of the expression evaluation(s) will be added as fact(s) in the KnowledgeSession.
This would allow a Rules developer to write more "flat" rules, which is a Best Practice, instead of having to write the LHS of rules to traverse the SwitchYard Message content, which right now is the only inserted fact.
|