Alfresco docs建议使用名称空间并声明这样的bean:
<bean id="module-artifact-id.myBeanName" class="com.sc.MyBeanClass"/>
是的,没关系。但是当我尝试在活动中使用sam定义时:
<activiti:eventListener delegateExpression= "${module-artifact-id.myBeanName}" />
我得到了:
Caused by: org.activiti.engine.ActivitiException: Unknown property used in expression: ${module-artifact-id.myBeanName}
at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:53)
at org.activiti.engine.impl.bpmn.helper.DelegateExpressionActivitiEventListener.onEvent(DelegateExpressionActivitiEventListener.java:46)
at org.activiti.engine.delegate.event.impl.ActivitiEventSupport.dispatchEvent(ActivitiEventSupport.java:105)
... 62 more
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'module'
似乎EL表达式不支持-
和.
(后者被识别为方法调用)。
任何解决方法如何在EL表达式中使用虚线和圆点?
答案 0 :(得分:0)
您可以将“ - ”替换为“\ u002D”,如下所示:
<activiti:eventListener delegateExpression= "${module\\u002Dartifact\\u002Did.myBeanName}" />