Complex expressions don't execute in Alfresco activiti web version

烈酒焚心 提交于 2019-12-25 00:28:56

问题


An expression with conditions does not work when testing a bpm process created in bpm-explorer alfresco activiti.

${document.attributes['EPR/DMS/DMBTR'] < 10000000
&& document.attributes['EPR/DMS/DMBTR'] >= 5000000
&& document.attributes['EPR/DMS/CONCERN_FLG'] == true} 
|| ${document.attributes['EPR/DMS/DMBTR'] >= 10000000}

such options do not work either

${(document.attributes['EPR/DMS/DMBTR'] < 10000000
&& document.attributes['EPR/DMS/DMBTR'] >= 5000000
&& document.attributes['EPR/DMS/CONCERN_FLG'] == true) 
|| document.attributes['EPR/DMS/DMBTR'] >= 10000000}

Displays error

Error parsing '${document.attributes['EPR/DMS/DMBTR'] < 10000000 \n&& \n(document.attributes['EPR/DMS/DMBTR'] > 5000000 || document.attributes['EPR/DMS/DMBTR'] = 5000000) \n&& document.attributes['EPR/DMS/CONCERN_FLG'] == true} \n|| ${document.attributes['EPR/DMS/DMBTR'] > 10000000 || document.attributes['EPR/DMS/DMBTR'] =10000000}': lexical error at position 143, encountered invalid character '=', expected expression token

回答1:


Try using &gt; and &lt; instead of the > and <. This will encode the string correctly and hope it will help solve the issue.




回答2:


Try this,

execution.setVariable('EPR_DMS_DMBTR', document.attributes['EPR/DMS/DMBTR'])
execution.setVariable('EPR_DMS_CONCERN_FLG', document.attributes['EPR/DMS/CONCERN_FLG'])


${EPR_DMS_DMBTR < 10000000
&& EPR_DMS_CONCERN_FLG >= 5000000
&& EPR_DMS_DMBTR == true)
|| EPR_DMS_DMBTR >= 10000000}


来源:https://stackoverflow.com/questions/57923324/complex-expressions-dont-execute-in-alfresco-activiti-web-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!