-
Bug
-
Resolution: Done
-
Major
-
jBPM 4.0
-
None
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))
else if ("persistable".equals(className)) {
if (element.hasAttribute("id-type")) {
String idType = element.getAttribute("id-type");
if ("long".equalsIgnoreCase(idType))
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
} 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 .
- is duplicated by
-
JBPM-2658 Process variables of type hibernate-long-id/hibernate-string-id don't work
- Resolved