public class Leave implements Serializable
{
private static final long serialVersionUID = 1L;
private String name;
private Integer day;
private Integer total = 0;
//省略set,get
}
bpmn里面配置的是:
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${reason[0].total < 10}]]></conditionExpression>
启动流程实例的时候,是这样的
Map<String, Object> vars = new HashMap<>();
vars.put("reason", Arrays.asList(new Leave("白展堂", 2)));
processEngine.getRuntimeService().startProcessInstanceByKey("dingcan", vars);
随后,执行报错
org.activiti.engine.ActivitiException: Unknown property used in expression: ${reason[0].total < 10} at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:53) at org.activiti.engine.impl.el.UelExpressionCondition.evaluate(UelExpressionCondition.java:37) at org.activiti.engine.impl.bpmn.behavior.InclusiveGatewayActivityBehavior.execute(InclusiveGatewayActivityBehavior.java:63) at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60) at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621) at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616) at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52) at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621) at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616) at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
请问,这是什么错
Ifapropertyhasnovalueyet(doesnotexistasavariablee.g.)yougetthiserror….
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。