ActivitiExpressionManager extends ExpressionManager implements ApplicationContextAware { public String evaluate(String expression){ if(!expression.startsWith("${")){ StringBuilder modifiedExpression = new StringBuilder(); expression = expression.replaceAll("'", "\\\\'"); modifiedExpression.append("${expressionEvaluator.getValue('").append(expression).append("', processContext.param)").append("}"); return modifiedExpression.toString(); } return expression; }  @Override Expression createExpression(String expression); String evaluate(String expression); @Override void setApplicationContext(ApplicationContext applicationContext);  }
@Test public void t01_evaluate_noArgs() { String expression = expMgr.evaluate("${'/p/cmcaseview/_new?fn=_initEntity&target=/.m/patientReferred&json='}${<!_json(model.getState())!>}"); assertNotNull(expression); }
@Test public void t01_evaluate_urlBuilder() { String expression = expMgr.evaluate("${<!_urlbuilder('/p/cmcaseview/_new','fn','_initEntity','target','/.m/patientReferred','json',_json(processContext.model.getState()))!>}"); assertNotNull(expression); }
@Test public void t01_evaluate_array() { String expression = expMgr.evaluate("${<!_array(_urlbuilder('/p/cmcaseview/_new','fn','_initEntity','target','/.m/patientReferred','json',_json(processContext.model.getState())),_concat('/p/cmcaseview:',_getState(processContext.output.singleResult.findParamByPath(\"/.m/id\")),'/_nav?pageId=pageCaseInfo'))!>}"); assertNotNull(expression); }