[jboss-user] [JBoss jBPM] - TaskInstance Hibernate Exception
jstuck
do-not-reply at jboss.com
Mon May 21 10:43:56 EDT 2007
Hi:
I am working on a UI for JBPM. When starting a ProcessInstance, I inspect the startTaskInstance for any variables that need to be supplied. However, when saving the process instance, I receive the following hibernate exception:
instance not of expected entity type: org.jbpm.context.exe.VariableInstance
Here is the code I am using to get the startTaskInstance:
TaskInstance taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
I then use the taskController to gain access to the variables if they exist. This is used to construct the UI.
TaskController taskController = taskInstance.getTask().getTaskController();
if (taskController != null) {
List variableAccesses = taskController.getVariableAccesses();
Iterator iterator = variableAccesses.iterator();
while (iterator.hasNext()) {
VariableAccess variableAccess = (VariableAccess) iterator.next();
String mappedName = variableAccess.getMappedName();
String value = (String) taskInstance.getVariable(mappedName);
?
}
}
Does anyone know why I am seeing this exception and can you recommend a solution?
Thanks,
Jeff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047264#4047264
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047264
More information about the jboss-user
mailing list