开发者社区> 问答> 正文

Activiti表达式报错:Unknown property used in e?报错

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)



请问,这是什么错

展开
收起
爱吃鱼的程序员 2020-06-12 14:17:45 5765 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    Ifapropertyhasnovalueyet(doesnotexistasavariablee.g.)yougetthiserror….

    2020-06-12 14:18:02
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载