* @param message the message
* @param operation the operation
* @param session the session
*/
public static void setGlobals(Message message, KnowledgeOperation operation, KnowledgeSession session) {
Globals globals = session.getGlobals();
if (globals != null) {
Map<String, Object> globalsMap = new HashMap<String, Object>();
globalsMap.put(GLOBALS, new ConcurrentHashMap<String, Object>());
Map<String, Object> expressionMap = getMap(message, operation.getGlobalExpressionMappings(), null);
if (expressionMap != null) {
globalsMap.putAll(expressionMap);
}
for (Entry<String, Object> globalsEntry : globalsMap.entrySet()) {
globals.set(globalsEntry.getKey(), globalsEntry.getValue());
}
}
}