cancel
Showing results for 
Search instead for 
Did you mean: 

start process Exception.

evan
Champ in-the-making
Champ in-the-making
Hi All ,

    When I start a process . Server throw exception : 01150000 Wrapped Exception (with status template): org.activiti.engine.impl.el.Expression.getValue(Lorg/activiti/engine/delegate/DelegateExecutionSmiley WinkLjava/lang/Object;

I can't understand where is wrong , my code is:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
   typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
   targetNamespace="http://www.activiti.org/test">
   
   <process id="TREX-OPTIONS2" name="TREX-OPTIONS2">
      
       <extensionElements>
               <activiti:executionListener class="org.test.Setvalue" event="start">
              <activiti:field name="x" stringValue="Yes, I am " />
              <activiti:field name="y" expression="No , I am not" />
              </activiti:executionListener>
          </extensionElements>

      <startEvent id="theStart" />
      <sequenceFlow id="flow0" sourceRef="theStart" targetRef="STRO_OPTIONS_START" />
      <userTask id="STRO_OPTIONS_START" name="STRO_OPTIONS_START" activiti:formKey="approve.form">
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.Start" />
          </extensionElements>
      </userTask>
      <sequenceFlow id="log1" sourceRef="STRO_OPTIONS_START" targetRef="exclusiveGw1" />
      <exclusiveGateway id="exclusiveGw1" name="exclusiveGw1" />
      <sequenceFlow id="pass1" sourceRef="exclusiveGw1" targetRef="OKIT_KIT_VERIFY">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail1" sourceRef="exclusiveGw1" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="OKIT_KIT_VERIFY" name="OKIT_KIT_VERIFY"
         activiti:formKey="approve.form">
         <documentation>
            Request by ${employeeName}
            </documentation>
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.TestAssign" />
         </extensionElements>
      </userTask>

      <sequenceFlow id="log2" sourceRef="OKIT_KIT_VERIFY" targetRef="exclusiveGw2" />
      <exclusiveGateway id="exclusiveGw2" name="exclusiveGw2" />
      <sequenceFlow id="pass2" sourceRef="exclusiveGw2" targetRef="PCK_OPTIONS_PACK1">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail2" sourceRef="exclusiveGw2" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="PCK_OPTIONS_PACK1" name="PCK_OPTIONS_PACK1" activiti:formKey="approve.form">
         <documentation>
            Request by ${employeeName}
            </documentation>
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.TestAssign" />
           </extensionElements>
      </userTask>

      <sequenceFlow id="log3" sourceRef="PCK_OPTIONS_PACK1" targetRef="exclusiveGw3" />
      <exclusiveGateway id="exclusiveGw3" name="exclusiveGw3" />
      <sequenceFlow id="pass3" sourceRef="exclusiveGw3" targetRef="OINS_OPTIONS_INSPECT">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail3" sourceRef="exclusiveGw3" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="OINS_OPTIONS_INSPECT" name="OINS_OPTIONS_INSPECT" activiti:formKey="approve.form">
         <documentation>
            Request by ${employeeName}
            </documentation>
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.TestAssign" />
           </extensionElements>
      </userTask>

      <sequenceFlow id="log4" sourceRef="OINS_OPTIONS_INSPECT" targetRef="exclusiveGw4" />
      <exclusiveGateway id="exclusiveGw4" name="exclusiveGw4" />
      <sequenceFlow id="pass4" sourceRef="exclusiveGw4" targetRef="PCK_OPTIONS_PACK2">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail4" sourceRef="exclusiveGw4" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="PCK_OPTIONS_PACK2" name="PCK_OPTIONS_PACK2" activiti:formKey="approve.form" />
      <sequenceFlow id="log5" sourceRef="PCK_OPTIONS_PACK2" targetRef="end" />

      <endEvent id="end" />
   </process>
</definitions>



java code is :

package org.test;

import org.activiti.engine.impl.el.Expression;
import org.activiti.engine.impl.pvm.delegate.ExecutionListener;
import org.activiti.engine.impl.pvm.delegate.ExecutionListenerExecution;


public class Setvalue implements ExecutionListener {

     private Expression x;

     private Expression y;

     public void notify(ExecutionListenerExecution execution) throws Exception {
       execution.setVariable("x", x.getValue(execution).toString());
       execution.setVariable("y", y.getValue(execution).toString());
       System.out.println("————————"+x.getValue(execution).toString()+"========="+y.getValue(execution).toString());
     }
}


who can help me?

thanks ,

Evan.
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
Evan,

Can you post the full stack-trace? I suspect this is the message for a MethodNotFound, but I'm not sure untill I see the full stack.

evan
Champ in-the-making
Champ in-the-making
Hi Frederikheremans,

    I just defined a XML and two Classes . Didn't use eclipse.

XML :


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
   typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
   targetNamespace="http://www.activiti.org/test">
  
   <process id="TREX-OPTIONS2" name="TREX-OPTIONS2">
     
       <extensionElements>
               <activiti:executionListener class="org.test.Setvalue" event="start">
              <activiti:field name="x" stringValue="Yes, I am " />
              <activiti:field name="y" stringValue="No , I am not" />
              </activiti:executionListener>
          </extensionElements>

      <startEvent id="theStart" />
      <sequenceFlow id="flow0" sourceRef="theStart" targetRef="STRO_OPTIONS_START" />
      <userTask id="STRO_OPTIONS_START" name="STRO_OPTIONS_START" activiti:formKey="approve.form">
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.Start" />
          </extensionElements>
      </userTask>
      <sequenceFlow id="log1" sourceRef="STRO_OPTIONS_START" targetRef="exclusiveGw1" />
      <exclusiveGateway id="exclusiveGw1" name="exclusiveGw1" />
      <sequenceFlow id="pass1" sourceRef="exclusiveGw1" targetRef="OKIT_KIT_VERIFY">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail1" sourceRef="exclusiveGw1" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="OKIT_KIT_VERIFY" name="OKIT_KIT_VERIFY"
         activiti:formKey="approve.form">
         <documentation>
            Request by ${employeeName}
            </documentation>
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.TestAssign" />
         </extensionElements>
      </userTask>

      <sequenceFlow id="log2" sourceRef="OKIT_KIT_VERIFY" targetRef="exclusiveGw2" />
      <exclusiveGateway id="exclusiveGw2" name="exclusiveGw2" />
      <sequenceFlow id="pass2" sourceRef="exclusiveGw2" targetRef="PCK_OPTIONS_PACK1">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail2" sourceRef="exclusiveGw2" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="PCK_OPTIONS_PACK1" name="PCK_OPTIONS_PACK1" activiti:formKey="approve.form">
         <documentation>
            Request by ${employeeName}
            </documentation>
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.TestAssign" />
           </extensionElements>
      </userTask>

      <sequenceFlow id="log3" sourceRef="PCK_OPTIONS_PACK1" targetRef="exclusiveGw3" />
      <exclusiveGateway id="exclusiveGw3" name="exclusiveGw3" />
      <sequenceFlow id="pass3" sourceRef="exclusiveGw3" targetRef="OINS_OPTIONS_INSPECT">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail3" sourceRef="exclusiveGw3" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="OINS_OPTIONS_INSPECT" name="OINS_OPTIONS_INSPECT" activiti:formKey="approve.form">
         <documentation>
            Request by ${employeeName}
            </documentation>
         <extensionElements>
             <activiti:taskListener event="create" class="org.test.TestAssign" />
           </extensionElements>
      </userTask>

      <sequenceFlow id="log4" sourceRef="OINS_OPTIONS_INSPECT" targetRef="exclusiveGw4" />
      <exclusiveGateway id="exclusiveGw4" name="exclusiveGw4" />
      <sequenceFlow id="pass4" sourceRef="exclusiveGw4" targetRef="PCK_OPTIONS_PACK2">
         <conditionExpression xsi:type="tFormalExpression">${vacationApproved}
         </conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="fail4" sourceRef="exclusiveGw4" targetRef="end">
         <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}
         </conditionExpression>
      </sequenceFlow>

      <userTask id="PCK_OPTIONS_PACK2" name="PCK_OPTIONS_PACK2" activiti:formKey="approve.form" />
      <sequenceFlow id="log5" sourceRef="PCK_OPTIONS_PACK2" targetRef="end" />

      <endEvent id="end" />
   </process>
</definitions>

thrown error class is :

package org.test;

import org.activiti.engine.impl.el.Expression;
import org.activiti.engine.impl.pvm.delegate.ExecutionListener;
import org.activiti.engine.impl.pvm.delegate.ExecutionListenerExecution;


public class Setvalue implements ExecutionListener {

     private Expression x;

     private Expression y;

     public void notify(ExecutionListenerExecution execution) throws Exception {
       execution.setVariable("x", x.getValue(execution).toString());
       execution.setVariable("y", y.getValue(execution).toString());
       System.out.println("————————"+x.getValue(execution).toString()+"========="+y.getValue(execution).toString());
     }
}

I have made debug and  when user start process the error been throwned :

<process id="TREX-OPTIONS2" name="TREX-OPTIONS2">
       <extensionElements>
              <activiti:executionListener class="org.test.Setvalue" event="start">
              <activiti:field name="x" stringValue="Yes, I am " />
              <activiti:field name="y" stringValue="No , I am not" />
              </activiti:executionListener>
          </extensionElements>
      <startEvent id="theStart" />

  "Setvalue" class :

public void notify(ExecutionListenerExecution execution) throws Exception {
      execution.setVariable("x", x.getValue(execution).toString());
       execution.setVariable("y", y.getValue(execution).toString());
       System.out.println("————————"+x.getValue(execution).toString()+"========="+y.getValue(execution).toString());
     }

tomcat error message is :


13:33:00,703  ERROR [extensions.webscripts.AbstractRuntime] Exception from execu
teScript - redirecting to status template error: 01160000 Wrapped Exception (wit
h status template): org.activiti.engine.impl.el.Expression.getValue(Lorg/activit
i/engine/delegate/DelegateExecutionSmiley WinkLjava/lang/Object;
org.springframework.extensions.webscripts.WebScriptException: 01160000 Wrapped E
xception (with status template): org.activiti.engine.impl.el.Expression.getValue
(Lorg/activiti/engine/delegate/DelegateExecutionSmiley WinkLjava/lang/Object;
        at org.springframework.extensions.webscripts.AbstractWebScript.createSta
tusException(AbstractWebScript.java:742)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execut
e(DeclarativeWebScript.java:167)
        at org.springframework.extensions.webscripts.PresentationContainer.execu
teScript(PresentationContainer.java:69)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScri
pt(AbstractRuntime.java:333)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScri
pt(AbstractRuntime.java:189)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.se
rvice(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoSuchMethodError: org.activiti.engine.impl.el.Expression.g
etValue(Lorg/activiti/engine/delegate/DelegateExecutionSmiley WinkLjava/lang/Object;
        at org.test.Setvalue.notify(Setvalue.java:16)
        at org.activiti.engine.impl.bpmn.ClassDelegate.notify(ClassDelegate.java
:60)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.exe
cute(AbstractEventAtomicOperation.java:38)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(
CommandContext.java:62)
        at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(Exe
cutionEntity.java:483)
        at org.activiti.engine.impl.runtime.ExecutionEntity.start(ExecutionEntit
y.java:291)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartPro
cessInstanceCmd.java:66)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartPro
cessInstanceCmd.java:29)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(Comm
andExecutorImpl.java:22)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execut
e(CommandContextInterceptor.java:37)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:33)
        at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceById(
RuntimeServiceImpl.java:69)
        at org.activiti.rest.api.process.ProcessInstancePost.executeWebScript(Pr
ocessInstancePost.java:49)
        at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScrip
t.java:68)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execut
e(DeclarativeWebScript.java:64)
        … 17 more

the error are throwned. now I don't know how to do.

evan
Champ in-the-making
Champ in-the-making
Have any idea ? where is my wrong ? who can help me ?

evan
Champ in-the-making
Champ in-the-making
I am waiting for your help , Who can help me?

mproch
Champ in-the-making
Champ in-the-making
Hi,
which Activiti version are you using? Could it happen that you compile using 5.0 and deploy in 5.1/5.2? Or vice-versa? (the Expression interface changed a bit)