]
Tom Baeyens updated JBPM-2474:
------------------------------
Fix Version/s: jBPM 4.1
Assignee: Tom Baeyens
Process variables of type hibernate-long-id/hibernate-string-id
don't work
--------------------------------------------------------------------------
Key: JBPM-2474
URL:
https://jira.jboss.org/jira/browse/JBPM-2474
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0
Reporter: steven wang
Assignee: Tom Baeyens
Fix For: jBPM 4.1
In jbpm.variable.types.xml, the type bindings for hibernate types are as follows:
<type name="hibernate-long-id" class="hibernate"
id-type="long"
variable-class="org.jbpm.pvm.internal.type.variable.HibernateLongVariable"
/>
<type name="hibernate-string-id" class="hibernate"
id-type="string"
variable-class="org.jbpm.pvm.internal.type.variable.HibernateStringVariable"
/>
but in TypeBinding.java
the pasing logic is as follows:
if (element.hasAttribute("class")) {
String className = element.getAttribute("class");
// if type="serializable"
if ("serializable".equals(className)) {
matcher = new SerializableMatcher();
// if type="persistable"
} else if ("persistable".equals(className)) {
if (element.hasAttribute("id-type")) {
String idType = element.getAttribute("id-type");
if ("long".equalsIgnoreCase(idType)) {
matcher = new HibernateLongIdMatcher(hibernateSessionFactoryName);
} else if ("string".equalsIgnoreCase(idType)) {
matcher = new HibernateStringIdMatcher(hibernateSessionFactoryName);
} else {
parse.addProblem("id-type was not 'long' or 'string':
"+idType, element);
}
} else {
parse.addProblem("id-type is required in a persistable type",
element);
}
// otherwise, we expect type="some.java.ClassName"
} else {
matcher = new ClassNameMatcher(className);
}
} else { ...
maybe the configured class should be "persistable".
but if I changed jbpm.variable.types.xml from "hibernate" to
"persistable", I still can not save a process variable with value of a
persistent hibernate object .
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: