[jboss-user] [jBPM] New message: "Converting a variable back"
Jochen Mader
do-not-reply at jboss.com
Tue Mar 2 12:55:51 EST 2010
User development,
A new message was posted in the thread "Converting a variable back":
http://community.jboss.org/message/529431#529431
Author : Jochen Mader
Profile : http://community.jboss.org/people/jochen_mader
Message:
--------------------------------------------------------------
I am working on jBPM 4.3.
I wrote a converter to convert one of my classes into a Long (it's coming from JPA with the Long being its key).
I added it to jbpm.variables.types.xml and using the following code I add the variable to my instance.
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dataEntity", dataEntity);
ProcessInstance instance = processEngine.getExecutionService()
.startProcessInstanceByKey("dataEntityProcess", variables);
The converter gets triggered and the variable is converted to a Long.
In my process I have a java task:
<java name="activateAccount" expr="#{dataEntityProcessDAO}" method="activate">
<arg>
<object expr="#{dataEntity}" />
</arg>
<transition to="end" />
</java>
As soon as my process reaches the task I get
org.jbpm.pvm.internal.wire.WireException: method activate(java.lang.Long) is not available on object com.hre.portaldb.crosscommon.base.processes.DataEntityProcessDAOImpl at 40b11a9f (com.hre.portaldb.crosscommon.base.processes.DataEntityProcessDAOImpl)
at org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.invokeMethod(ObjectDescriptor.java:206)
at org.jbpm.jpdl.internal.activity.JavaActivity.perform(JavaActivity.java:76)
The revert method of my converter is never called and it tries to use the Long on the method that takes DataEntity as input.
What am I doing wrong?
Thx
Jochen
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529431#529431
More information about the jboss-user
mailing list