Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-11357

TimerStartEvents of EventSubprocesses can't evaluate variable timer expressions

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • 7.10.0, 7.11.0, 7.12.0, 7.13.0
    • engine
    • None

      Scenario:

      • Deploy the attached process
        • Process with a TimerStartEvent on a EventSubprocess
        • TimerStartEvent uses an expression for the timer duration, like ${duration}
      • Start a process instance and pass duration="PT1M" variable in Cockpit

      Observed behavior:
      An exception is thrown:

      31-Jan-2020 14:55:12.936 WARNING [http-nio-8080-exec-6] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-REST-HTTP500 org.camunda.bpm.engine.rest.exception.RestException: Cannot instantiate process definition TimerEventSubprocess:2:3d8df09f-4431-11ea-a437-00ff0b0394fe: Unknown property used in expression: ${duration}. Cause: Cannot resolve identifier 'duration'
              at org.camunda.bpm.engine.rest.sub.repository.impl.ProcessDefinitionResourceImpl.submitForm(ProcessDefinitionResourceImpl.java:200)
              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:498)
              at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
              at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
              at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:159)
              at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:107)
              at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:154)
              at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:92)
              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:45)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.camunda.bpm.engine.rest.filter.EmptyBodyFilter.doFilter(EmptyBodyFilter.java:99)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.camunda.bpm.webapp.impl.security.filter.headersec.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:87)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.camunda.bpm.webapp.impl.security.filter.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:175)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:71)
              at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:55)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:62)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:60)
              at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:44)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:60)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${duration}. Cause: Cannot resolve identifier 'duration'
              at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:63)
              at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:51)
              at org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl.resolveAndSetDuedate(TimerDeclarationImpl.java:131)
              at org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl.initializeConfiguration(TimerDeclarationImpl.java:99)
              at org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl.postInitialize(TimerDeclarationImpl.java:158)
              at org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl.postInitialize(TimerDeclarationImpl.java:40)
              at org.camunda.bpm.engine.impl.jobexecutor.JobDeclaration.createJobInstance(JobDeclaration.java:124)
              at org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl.createTimer(TimerDeclarationImpl.java:185)
              at org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl.createTimerInstance(TimerDeclarationImpl.java:170)
              at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.createTimerInstances(ExecutionEntity.java:424)
              at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.initializeTimerDeclarations(ExecutionEntity.java:416)
              at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.startWithFormProperties(ExecutionEntity.java:501)
              at org.camunda.bpm.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:85)
              at org.camunda.bpm.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:43)
              at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
              at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
              at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
              at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
              at org.camunda.bpm.engine.impl.FormServiceImpl.submitStartForm(FormServiceImpl.java:79)
              at org.camunda.bpm.engine.rest.sub.repository.impl.ProcessDefinitionResourceImpl.submitForm(ProcessDefinitionResourceImpl.java:188)
              ... 62 more
      Caused by: org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'duration'
              at org.camunda.bpm.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
              at org.camunda.bpm.engine.impl.juel.AstEval.eval(AstEval.java:50)
              at org.camunda.bpm.engine.impl.juel.AstNode.getValue(AstNode.java:26)
              at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
              at org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:40)
              at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
              at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)
              at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63)
              at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:60)
              ... 81 more
      

      Expected behavior:
      A process instance is started successfully.

      Hints:
      We already fixed similar scenarios in CAM-9303.

      The difference here is that the process instance is started by Submitting a Form (SubmitStartFormCmd).
      CAM-9303 was more or less an easy-pick but it does seem the case here as the variables are set at different point (DefaultFormHandler#submitFormVariables()) than the initialization of the timer declarations (ExecutionEntity#startWithFormProperties())

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              yana.vasileva Yana Vasileva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: