江麒麟
新手
新手
  • UID575
  • 粉丝0
  • 关注0
  • 发帖数10
阅读:3530回复:3

平台业务流程开发踩坑

楼主#
更多 发布于:2023-12-27 03:15
平台版本(v5.0.2)
1、回退上一节点异常--couldn't find a variable type that is able to serialize 11660;
2、回退上一节点异常--Error: unresolvable property or identifier: sum][Near : {... sum>2000 ....}];
3、提交或回退时出现--[Error: failed to subEval expression][Near : {... sum<=1000 ....}];
江麒麟
新手
新手
  • UID575
  • 粉丝0
  • 关注0
  • 发帖数10
沙发#
发布于:2023-12-27 03:19
2、HKWF_TASK_FINISH_BEFORE,该函数需要定义上传该变量

function HKWF_TASK_FINISH_BEFORE() {
         // 获取申请单id
         //var id = FORM.getFormValue("id");
         var id = URL.getParameter("id");
         // 获取总金额
         var vsum = FORM.getFormValue("total_amount");
         vsum += "d";
         // 获取主表数据
     var vcomment = FORM.getFormValue("comment");
    
     var parame = {
                     comment : vcomment,
                     vars : {
                             id:id,
                             sum:vsum
                     }
     }
     console.log(parame);
     return parame;//将审批意见插入到流程数据库
   }
江麒麟
新手
新手
  • UID575
  • 粉丝0
  • 关注0
  • 发帖数10
板凳#
发布于:2023-12-27 03:22
1、需要将上传的变量,变为字符串类型,

function HKWF_TASK_FINISH_BEFORE() {
         // 获取申请单id
         //var id = FORM.getFormValue("id");
         var id = URL.getParameter("id");
         // 获取总金额
         var vsum = FORM.getFormValue("total_amount");
         vsum += "d";
         // 获取主表数据
     var vcomment = FORM.getFormValue("comment");
    
     var parame = {
                     comment : vcomment,
                     vars : {
                             id:id,
                             sum:vsum
                     }
     }
     console.log(parame);
     return parame;//将审批意见插入到流程数据库
   }
江麒麟
新手
新手
  • UID575
  • 粉丝0
  • 关注0
  • 发帖数10
地板#
发布于:2023-12-27 03:28
3、变量的类型不一致导致的,异常具体如下:
11:15:00,829 ERROR [STDERR] [Error: failed to subEval expression]
[Near : {... sum<=1000 ....}]
                  ^
[Line: 1, Column: 6]
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.compiler.AbstractParser.reduce(AbstractParser.java:2623)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.compiler.AbstractParser.arithmeticFunctionReduction(AbstractParser.java:2522)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:147)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:47)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.MVEL.eval(MVEL.java:169)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.component.strategy.DefaultLineEnableLineStrategy.execute(DefaultLineEnableLineStrategy.java:193)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.component.proxy.ComponentCglibProxy.lineStrategyHandler(ComponentCglibProxy.java:337)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.component.proxy.ComponentCglibProxy.intercept(ComponentCglibProxy.java:215)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.core.component.TaskComponent$$EnhancerByCGLIB$$f6eddde5.run(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.service.JobServiceImpl.objectBind(JobServiceImpl.java:410)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.service.JobServiceImpl.invokeDefaultClass(JobServiceImpl.java:367)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.service.JobServiceImpl.executeJob(JobServiceImpl.java:344)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.service.JobServiceImpl$$EnhancerByCGLIB$$f476dfa5.CGLIB$executeJob$14(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.service.JobServiceImpl$$EnhancerByCGLIB$$f476dfa5$$FastClassByCGLIB$$980708ad.invoke(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.persistence.transaction.AbstractTransactionInterceptor.intercept(AbstractTransactionInterceptor.java:106)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.service.JobServiceImpl$$EnhancerByCGLIB$$f476dfa5.executeJob(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl.executeJob(ProcessEngineImpl.java:549)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl$$EnhancerByCGLIB$$2e111194.CGLIB$executeJob$30(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl$$EnhancerByCGLIB$$2e111194$$FastClassByCGLIB$$ea03d087.invoke(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.persistence.transaction.AbstractTransactionInterceptor.intercept(AbstractTransactionInterceptor.java:106)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl$$EnhancerByCGLIB$$2e111194.executeJob(<generated>)
11:15:00,829 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl.executeJobByVars(ProcessEngineImpl.java:516)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl$$EnhancerByCGLIB$$2e111194.CGLIB$executeJobByVars$33(<generated>)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl$$EnhancerByCGLIB$$2e111194$$FastClassByCGLIB$$ea03d087.invoke(<generated>)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.persistence.transaction.AbstractTransactionInterceptor.intercept(AbstractTransactionInterceptor.java:106)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.core.ProcessEngineImpl$$EnhancerByCGLIB$$2e111194.executeJobByVars(<generated>)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.core.service.TaskService.finish(TaskService.java:477)
11:15:00,830 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.core.service.TaskService$$EnhancerByCGLIB$$5129ff75.CGLIB$finish$9(<generated>)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.core.service.TaskService$$EnhancerByCGLIB$$5129ff75$$FastClassByCGLIB$$456f831b.invoke(<generated>)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.persistence.transaction.AbstractTransactionInterceptor.intercept(AbstractTransactionInterceptor.java:93)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.core.service.TaskService$$EnhancerByCGLIB$$5129ff75.finish(<generated>)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.web.rest.resource.JobResource.finish(JobResource.java:126)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.web.rest.api.JobRestAPI.finish(JobRestAPI.java:100)
11:15:00,831 ERROR [STDERR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:15:00,831 ERROR [STDERR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:15:00,831 ERROR [STDERR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:15:00,831 ERROR [STDERR]         at java.lang.reflect.Method.invoke(Method.java:483)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.resteasy.ResteasyContextInjectionInterceptor.aroundInvoke(ResteasyContextInjectionInterceptor.java:59)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.workflow.web.rest.api.JobRestAPI_$$_javassist_seam_11.finish(JobRestAPI_$$_javassist_seam_11.java)
11:15:00,831 ERROR [STDERR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:15:00,831 ERROR [STDERR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:15:00,831 ERROR [STDERR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:15:00,831 ERROR [STDERR]         at java.lang.reflect.Method.invoke(Method.java:483)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
11:15:00,831 ERROR [STDERR]         at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.resteasy.ResteasyResourceAdapter$1.process(ResteasyResourceAdapter.java:145)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.resteasy.ResteasyResourceAdapter.getResource(ResteasyResourceAdapter.java:120)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80)
11:15:00,831 ERROR [STDERR]         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.interceptor.LoginFilter.doFilter(LoginFilter.java:67)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:15:00,831 ERROR [STDERR]         at org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:98)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.system.servlet.SystemPageFilter.doFilter(Unknown Source)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:72)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.dsi.sysman.login.LoggingFilter.doFilter(LoggingFilter.java:63)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:61)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.dsi.sysman.security.login.cache.CacheSessionCheckFilter.doFilter(CacheSessionCheckFilter.java:66)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:66)
11:15:00,831 ERROR [STDERR]         at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:159)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:15:00,831 ERROR [STDERR]         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
11:15:00,831 ERROR [STDERR]         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
11:15:00,831 ERROR [STDERR]         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
11:15:00,831 ERROR [STDERR]         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
11:15:00,831 ERROR [STDERR]         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
11:15:00,831 ERROR [STDERR]         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
11:15:00,831 ERROR [STDERR]         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
11:15:00,831 ERROR [STDERR]         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
11:15:00,831 ERROR [STDERR]         at java.lang.Thread.run(Thread.java:745)
11:15:00,831 ERROR [STDERR] Caused by: java.lang.RuntimeException: uncomparable values <<2112d>> and <<1000>>
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.math.MathProcessor.doOperationNonNumeric(MathProcessor.java:321)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.math.MathProcessor._doOperations(MathProcessor.java:234)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.math.MathProcessor.doOperations(MathProcessor.java:79)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.math.MathProcessor.doOperations(MathProcessor.java:48)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.util.ExecutionStack.op(ExecutionStack.java:178)
11:15:00,831 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.compiler.AbstractParser.reduce(AbstractParser.java:2563)
11:15:00,831 ERROR [STDERR]         ... 116 more
11:15:00,832 ERROR [STDERR] Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
11:15:00,832 ERROR [STDERR]         at java.lang.String.compareTo(String.java:111)
11:15:00,832 ERROR [STDERR]         at com.sunsheen.jfids.pm.library.mvel2.math.MathProcessor.doOperationNonNumeric(MathProcessor.java:318)
11:15:00,832 ERROR [STDERR]         ... 121 more

解决方案:
=将类型转为一致的
如,Double.parseDouble(sum)>1000
=同时清理项目,重新部署
游客

返回顶部