11-20-2012 11:18 AM
<businessRuleTask id="businessRuleTask" activiti:class="${MyRuleServiceDelegate}" />
<serviceTask id="javaService2" name="Java service invocation" activiti:class="${testVariable}"></serviceTask>
Multiple annotations found at this line:
- cvc-attribute.3: The value '${testVariable}' of attribute 'activiti:class' on element 'serviceTask' is not valid with respect to its type, 'null'.
- cvc-pattern-valid: Value '${testVariable}' is not facet-valid with respect to pattern '([a-z]{2,3}(\.[a-zA-Z][a-zA-Z_$0-9]*)*)\.([A-Z][a-zA-Z_$0-9]*)' for type '#AnonType_class'.
11-22-2012 05:23 AM
@Override
public void execute(DelegateExecution arg0) throws Exception {
int a = 1;
}
@Override
public void execute() throws Exception {
int a = 2;
}
GRAVE: Error while closing command context
org.activiti.engine.ActivitiException: Delegate expression ${myVar.execute()} (or ${myVar} for the first example) did not resolve to an implementation of interface org.activiti.engine.impl.pvm.delegate.ActivityBehavior nor interface org.activiti.engine.delegate.JavaDelegate
11-22-2012 07:09 AM
11-22-2012 08:56 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" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:smileysurprised:mgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:smileysurprised:mgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="Examples">
<process id="MyTest" name="MyTest">
<startEvent id="theStart" name="Start"></startEvent>
<serviceTask id="javaService" name="Java service invocation" activiti:class="org.activiti.examples.bpmn.test.manager2.SetterTest">
<extensionElements>
<activiti:field name="text">
<activiti:string>Success</activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
<serviceTask id="javaService2" name="Java service invocation" activiti:delegateExpression="${testVariable}"></serviceTask>
<userTask id="usertask1" name="User Task" activiti:candidateGroups="user"></userTask>
<endEvent id="theEnd" name="End"></endEvent>
<sequenceFlow id="flow1" name="" sourceRef="theStart" targetRef="javaService"></sequenceFlow>
<sequenceFlow id="flow2" name="" sourceRef="javaService" targetRef="javaService2"></sequenceFlow>
<sequenceFlow id="flow4" name="" sourceRef="usertask1" targetRef="theEnd"></sequenceFlow>
<sequenceFlow id="flow5" name="" sourceRef="javaService2" targetRef="usertask1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_MyTest">
<bpmndi:BPMNPlane bpmnElement="MyTest" id="BPMNPlane_MyTest">
<bpmndi:BPMNShape bpmnElement="theStart" id="BPMNShape_theStart">
<omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="javaService" id="BPMNShape_javaService">
<omgdc:Bounds height="55" width="105" x="105" y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="javaService2" id="BPMNShape_javaService2">
<omgdc:Bounds height="55" width="105" x="250" y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55" width="105" x="395" y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd" id="BPMNShape_theEnd">
<omgdc:Bounds height="35" width="35" x="540" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="65" y="217"></omgdi:waypoint>
<omgdi:waypoint x="105" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="210" y="217"></omgdi:waypoint>
<omgdi:waypoint x="250" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="500" y="217"></omgdi:waypoint>
<omgdi:waypoint x="540" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="355" y="217"></omgdi:waypoint>
<omgdi:waypoint x="395" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
package org.activiti.examples.bpmn.test.manager2;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.delegate.JavaDelegate;
public class SetterTest implements JavaDelegate {
private static final String VARIABLE_NAME = "testVariable";
private Expression text;
public void execute(DelegateExecution execution) {
String var = (String) text.getValue(execution);
if ("Success".equals(var)) {
ManagerTest manager = new ManagerTest();
execution.setVariable(VARIABLE_NAME, manager);
}
}
}
package org.activiti.examples.bpmn.test.manager2;
import java.io.Serializable;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class ManagerTest implements Serializable, JavaDelegate {
private static final long serialVersionUID = 1L;
@Override
public void execute(DelegateExecution arg0) throws Exception {
int a = 1;
}
}
11-22-2012 09:10 AM
11-22-2012 09:15 AM
11-22-2012 09:20 AM
11-22-2012 09:34 AM
11-22-2012 09:39 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.