@Test public void resolveExpressionsMap_should_keepExpressionContent_when_ObjecNodeContainsAnExpressionUnableToBeResolved() throws IOException { Expression nameExpression = buildExpression("${name}"); given(expressionEvaluator.evaluate(nameExpression, expressionManager, delegateInterceptor)).willThrow(new ActivitiException("Invalid property")); JsonNode node = mapper.readTree("{\"name\":\"${name}\",\"age\": 30}"); Map<String, Object> result = expressionResolver.resolveExpressionsMap(expressionEvaluator, singletonMap("node", node)); assertThat(result).containsEntry("node", map( "name", "${name}", "age", 30 )); }
public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator,
                                                     final Map<String, ?> sourceMap); boolean containsExpression(final Object source); }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator,
                                                     final Map<String, ?> sourceMap); boolean containsExpression(final Object source);  }