02-14-2011 08:50 PM
<?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>
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());
}
}
02-15-2011 03:03 AM
02-16-2011 12:36 AM
<?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>
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());
}
}
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/DelegateExecutionLjava/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/DelegateExecutionLjava/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/DelegateExecutionLjava/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
02-16-2011 09:08 PM
02-18-2011 01:07 AM
02-18-2011 01:38 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.