[jboss-user] [jBPM] - Re: Work with complex process variable
it-student
do-not-reply at jboss.com
Sun Jun 12 10:03:16 EDT 2011
it-student [http://community.jboss.org/people/it-student] created the discussion
"Re: Work with complex process variable"
To view the discussion, visit: http://community.jboss.org/message/609796#609796
--------------------------------------------------------------
Hello,
I'm always trying to use my Project Class in my process. So, I've create my class (package defaultPackage), compiled it and add the jar into Guvnor. In the top of the package page in "Configuration imported types" there is "defautlPackage.Project". In my bpmn I have a variable, Type : "Object", ClasseName: "defaultPackage.Project". The building in Guvnor works but when I start my process in the console an error occure :
org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: defaultPackage/Project
My BPMN :
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
targetNamespace="http://www.jboss.org/drools"
typeLanguage="http://www.java.com/javaTypes"
expressionLanguage="http://www.mvel.org/2.0"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
xmlns:g="http://www.jboss.org/drools/flow/gpd"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns="http://www.jboss.org/drools">
<itemDefinition id="_mapItem" structureRef="java.util.HashMap" />
<itemDefinition id="_quantityItem" structureRef="java.lang.String" />
<itemDefinition id="_projectItem" structureRef="defaultPackage.Project" />
<process processType="Private" isExecutable="true" id="project" name="Project" tns:packageName="defaultPackage" >
<!-- process variables -->
<property id="map" itemSubjectRef="_mapItem"/>
<property id="quantity" itemSubjectRef="_quantityItem"/>
<property id="project" itemSubjectRef="_projectItem"/>
<!-- nodes -->
<startEvent id="_1" name="StartProcess" />
<endEvent id="_3" name="EndProcess" >
<terminateEventDefinition/>
</endEvent>
<userTask id="_4" name="TestTask" >
<ioSpecification>
<dataInput id="_4_ContentInput" name="Content" />
<dataInput id="_4_CommentInput" name="Comment" />
<dataInput id="_4_SkippableInput" name="Skippable" />
<dataInput id="_4_TaskNameInput" name="TaskName" />
<dataInput id="_4_ContentInput" name="Content" />
<dataInput id="_4_PriorityInput" name="Priority" />
<inputSet>
<dataInputRefs>_4_ContentInput</dataInputRefs>
<dataInputRefs>_4_CommentInput</dataInputRefs>
<dataInputRefs>_4_SkippableInput</dataInputRefs>
<dataInputRefs>_4_TaskNameInput</dataInputRefs>
<dataInputRefs>_4_ContentInput</dataInputRefs>
<dataInputRefs>_4_PriorityInput</dataInputRefs>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>map</sourceRef>
<targetRef>_4_ContentInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<targetRef>_4_CommentInput</targetRef>
<assignment>
<from xsi:type="tFormalExpression">Merci de confirmer le nom du projet.</from>
<to xsi:type="tFormalExpression">_4_CommentInput</to>
</assignment>
</dataInputAssociation>
<dataInputAssociation>
<targetRef>_4_SkippableInput</targetRef>
<assignment>
<from xsi:type="tFormalExpression">false</from>
<to xsi:type="tFormalExpression">_4_SkippableInput</to>
</assignment>
</dataInputAssociation>
<dataInputAssociation>
<targetRef>_4_TaskNameInput</targetRef>
<assignment>
<from xsi:type="tFormalExpression">TestTask</from>
<to xsi:type="tFormalExpression">_4_TaskNameInput</to>
</assignment>
</dataInputAssociation>
<dataInputAssociation>
<targetRef>_4_ContentInput</targetRef>
<assignment>
<from xsi:type="tFormalExpression"></from>
<to xsi:type="tFormalExpression">_4_ContentInput</to>
</assignment>
</dataInputAssociation>
<dataInputAssociation>
<targetRef>_4_PriorityInput</targetRef>
<assignment>
<from xsi:type="tFormalExpression"></from>
<to xsi:type="tFormalExpression">_4_PriorityInput</to>
</assignment>
</dataInputAssociation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>krisv</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<scriptTask id="_5" name="Script" scriptFormat="http://www.java.com/java" >
<script>map = new java.util.HashMap();
project.setName("hello");
map.put("nomProjet", project.getName());
kcontext.setVariable("map", map);</script>
</scriptTask>
<!-- connections -->
<sequenceFlow id="_4-_3" sourceRef="_4" targetRef="_3" />
<sequenceFlow id="_5-_4" sourceRef="_5" targetRef="_4" />
<sequenceFlow id="_1-_5" sourceRef="_1" targetRef="_5" />
</process>
<bpmndi:BPMNDiagram>
<bpmndi:BPMNPlane bpmnElement="project" >
<bpmndi:BPMNShape bpmnElement="_1" >
<dc:Bounds x="16" y="16" width="48" height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_3" >
<dc:Bounds x="225" y="24" width="48" height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_4" >
<dc:Bounds x="123" y="83" width="100" height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_5" >
<dc:Bounds x="30" y="147" width="80" height="48" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="_4-_3" >
<di:waypoint x="173" y="107" />
<di:waypoint x="249" y="48" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_5-_4" >
<di:waypoint x="70" y="171" />
<di:waypoint x="173" y="107" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_1-_5" >
<di:waypoint x="40" y="40" />
<di:waypoint x="70" y="171" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
Thanks in advance, it's very important,
IT-Student
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609796#609796]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110612/b99b9895/attachment-0001.html
More information about the jboss-user
mailing list