起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4565|回复: 2

[处理中3] 比较大小的两个操作数不允许为空

[复制链接]

13

主题

37

帖子

194

积分

初级会员

Rank: 2

积分
194
发表于 2021-1-12 11:05:51 | 显示全部楼层 |阅读模式
数值型字段比较数据大小的表达式怎么写?

审批流程条件表达式:relationValue('PR_JFSPB','getProcessData1()',null,null,'FBCSQJF_XX','/Project/approval/data')>= 10
提交时报错:
计算表达式relationValue('PR_JFSPB','getProcessData1()',null,null,'FBCSQJF_XX','/Project/approval/data')>= 10出错
编码:JUSTEP154064
隐藏详细
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.justep.system.action.Engine.invokeActions(Native Method) at com.justep.system.action.Engine.invokeActions(Unknown Source) at com.justep.business.server.BusinessServer.doAction(Unknown Source) at com.justep.business.server.BusinessServer.doExcute(Unknown Source) at com.justep.business.server.BusinessServer.excute(Unknown Source) at com.justep.business.server.BusinessServer.excute(Unknown Source) at com.justep.business.server.BusinessServerServlet.execService(Unknown Source) at com.justep.business.server.BusinessServerServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at com.justep.x.bs.BusinessServerServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.justep.system.action.Engine.invokeAction(Native Method) at com.justep.system.action.Engine.invokeAction(Unknown Source) at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source) at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source) at com.justep.system.action.ActionUtils.invokeAction(Unknown Source) at com.justep.system.process.ProcessUtils.advanceProcessQuery(Unknown Source) at ExternalProcessProcedure.advanceProcessQuery(ExternalProcessProcedure.java:26) ... 27 more Caused by: com.justep.model.exception.ModelException: 编码: JUSTEP154064; 提示: 计算表达式relationValue('PR_JFSPB','getProcessData1()',null,null,'FBCSQJF_XX','/Project/approval/data')>= 10出错 at com.justep.model.exception.ModelException.create(Unknown Source) at com.justep.system.ksql.parser.ExpressionImpl.evaluate(Unknown Source) at com.justep.system.process.ExpressEngine.calculate(Unknown Source) at com.justep.system.process.ExpressEngine.calculateBoolean(Unknown Source) at com.justep.system.process.ActivityEnabledEngine.unitfy(Unknown Source) at com.justep.system.process.ActivityEnabledEngine.isActiveActivity(Unknown Source) at com.justep.system.process.ActivityEnabledEngine.matchToken(Unknown Source) at com.justep.system.process.ActivityEnabledEngine.execute(Unknown Source) at com.justep.system.process.ProcessQueryEngine.activityCanActive(Unknown Source) at com.justep.system.process.ProcessQueryEngine.outPlace(Unknown Source) at com.justep.system.process.ProcessQueryEngine.outActivityInstance(Unknown Source) at com.justep.system.process.ProcessQueryEngine.outPlace(Unknown Source) at com.justep.system.process.ProcessQueryEngine.outActivityInstance(Unknown Source) at com.justep.system.process.AdvanceProcessQueryEngine.doFlowOut(Unknown Source) at com.justep.system.process.AdvanceProcessQueryEngine.doExecute(Unknown Source) at com.justep.system.process.AdvanceProcessQueryEngine.execute(Unknown Source) at com.justep.system.process.ProcessEngine.advanceQuery(Unknown Source) at ProcessProcedure.advanceProcessQuery(ProcessProcedure.java:343) ... 38 more Caused by: com.justep.exception.BusinessException: 编码: JUSTEP154086; 提示: 比较大小的两个操作数不允许为空 at com.justep.exception.BusinessException.create(Unknown Source) at com.justep.util.Utils.check(Unknown Source) at com.justep.system.ksql.parser.ExpUtils.compare(Unknown Source) at com.justep.system.ksql.parser.ExpressionImpl.compExpression(Unknown Source) at com.justep.system.ksql.parser.ExpressionImpl.notExpression(Unknown Source) at com.justep.system.ksql.parser.ExpressionImpl.andExpression(Unknown Source) at com.justep.system.ksql.parser.ExpressionImpl.orExpression(Unknown Source) ... 55 more
DC6EF829-3700-4600-B1B2-DD907090517A.png
268235BD-A8D2-4051-9104-2BC73D329A06.png
91FC4775-46D3-43B6-B768-4A0E3FC75AA8.png

13

主题

37

帖子

194

积分

初级会员

Rank: 2

积分
194
 楼主| 发表于 2021-1-12 14:52:55 | 显示全部楼层
本帖最后由 hailong 于 2021-1-12 14:54 编辑

not(relationValue('PR_JFSPB','getProcessData1()',null,null,'FBCSQJF_XX','/Project/approval/data') = null) and relationValue('PR_JFSPB','getProcessData1()',null,null,'FBCSQJF_XX','/Project/approval/data')>=10
这么写到是不报错,但是比较大小判断的不对,不论大于小于结果都一样。
回复 支持 反对

使用道具 举报

6

主题

43

帖子

1327

积分

金牌会员

Rank: 6Rank: 6

积分
1327
QQ
发表于 2021-1-12 15:02:06 | 显示全部楼层
先判断一下:relationValue('PR_JFSPB','getProcessData1()',null,null,'FBCSQJF_XX','/Project/approval/data'),如果为空则置为0(整型或浮点型),再同10进行比较。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-28 06:08 , Processed in 0.074849 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表