Class ExpressionEvaluatorFactory


  • public class ExpressionEvaluatorFactory
    extends Object
    Factory to obtain specific expression evaluator based on context. It works like a delegate that hides part of context so it will be possible to distribute the factory and then obtain the specific expression evaluator instance only when all the information are available
    • Method Detail

      • getOrCreate

        public ExpressionEvaluator getOrCreate​(org.drools.scenariosimulation.api.model.FactMappingValue factMappingValue)
        Based on factMappingValue information it returns an instance of the specific expression evaluator required.
        Parameters:
        factMappingValue -
        Returns:
      • isAnMVELExpression

        protected boolean isAnMVELExpression​(String rawValue)
        A rawValue is an MVEL expression if: - NOT COLLECTIONS CASE: It's a String which starts with MVEL_ESCAPE_SYMBOL ('#') - COLLECTION CASE: It's a JSON String node, which is used only when an expression is set (in other cases it's a JSON Object (Map) or a JSON Array (List)) and it's value starts with MVEL_ESCAPE_SYMBOL ('#')
        Parameters:
        rawValue -
        Returns: