[jbpm-commits] JBoss JBPM SVN: r3878 - in jbpm3/trunk/modules/core/src/main: resources/org/jbpm/context/exe and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Sat Feb 14 05:09:44 EST 2009
Author: alex.guizar at jboss.com
Date: 2009-02-14 05:09:44 -0500 (Sat, 14 Feb 2009)
New Revision: 3878
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java
jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/jbpm.varmapping.xml
Log:
JBPM-1914: fix unintended optional dependency regression
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java 2009-02-14 09:31:01 UTC (rev 3877)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java 2009-02-14 10:09:44 UTC (rev 3878)
@@ -44,40 +44,38 @@
public JbpmTypeObjectInfo(Element jbpmTypeElement, ObjectFactoryParser objectFactoryParser) {
super(jbpmTypeElement, objectFactoryParser);
- Element typeMatcherElement = XmlUtil.element(jbpmTypeElement, "matcher");
- if (typeMatcherElement == null) {
- throw new ConfigurationException("matcher is a required element in a jbpm-type: "
- + XmlUtil.toString(jbpmTypeElement));
- }
- Element typeMatcherBeanElement = XmlUtil.element(typeMatcherElement);
- typeMatcherObjectInfo = objectFactoryParser.parse(typeMatcherBeanElement);
-
- Element converterElement = XmlUtil.element(jbpmTypeElement, "converter");
- if (converterElement != null) {
- if (!converterElement.hasAttribute("class")) {
- throw new ConfigurationException("class attribute is required in a converter element: "
+ try {
+ Element typeMatcherElement = XmlUtil.element(jbpmTypeElement, "matcher");
+ if (typeMatcherElement == null) {
+ throw new ConfigurationException("matcher element is required in <jbpm-type>: "
+ XmlUtil.toString(jbpmTypeElement));
}
- String converterClassName = converterElement.getAttribute("class");
- converter = Converters.getConverterByClassName(converterClassName);
- }
+ Element typeMatcherBeanElement = XmlUtil.element(typeMatcherElement);
+ typeMatcherObjectInfo = objectFactoryParser.parse(typeMatcherBeanElement);
- Element variableInstanceElement = XmlUtil.element(jbpmTypeElement, "variable-instance");
- if (!variableInstanceElement.hasAttribute("class")) {
- throw new ConfigurationException(
- "class is a required attribute in element variable-instance: "
+ Element converterElement = XmlUtil.element(jbpmTypeElement, "converter");
+ if (converterElement != null) {
+ if (!converterElement.hasAttribute("class")) {
+ throw new ConfigurationException("class attribute is required in <converter>: "
+ XmlUtil.toString(jbpmTypeElement));
- }
+ }
+ String converterClassName = converterElement.getAttribute("class");
+ converter = Converters.getConverterByClassName(converterClassName);
+ }
- String variableInstanceClassName = variableInstanceElement.getAttribute("class");
- try {
+ Element variableInstanceElement = XmlUtil.element(jbpmTypeElement, "variable-instance");
+ if (!variableInstanceElement.hasAttribute("class")) {
+ throw new ConfigurationException("class attribute is required in <variable-instance>: "
+ + XmlUtil.toString(jbpmTypeElement));
+ }
+ String variableInstanceClassName = variableInstanceElement.getAttribute("class");
variableInstanceClass = ClassLoaderUtil.classForName(variableInstanceClassName).asSubclass(
VariableInstance.class);
}
catch (JbpmException e) {
// Client probably does not need support for this type and omitted the dependency
// So let us log and ignore
- log.debug("could not instantiate jbpm type" + XmlUtil.toString(jbpmTypeElement), e);
+ log.debug("could not instantiate jbpm type '" + XmlUtil.toString(jbpmTypeElement) + "': " + e);
// make sure this JbpmType is ignored by always returning false in the JbpmTypeMatcher
typeMatcherObjectInfo = NoObjectInfo.getInstance();
converter = null;
Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/jbpm.varmapping.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/jbpm.varmapping.xml 2009-02-14 09:31:01 UTC (rev 3877)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/jbpm.varmapping.xml 2009-02-14 10:09:44 UTC (rev 3878)
@@ -146,6 +146,15 @@
<variable-instance class="org.jbpm.context.exe.variableinstance.HibernateStringInstance" />
</jbpm-type>
+ <!-- java.io.Serializable -->
+ <jbpm-type>
+ <matcher>
+ <bean class="org.jbpm.context.exe.matcher.SerializableMatcher" />
+ </matcher>
+ <converter class="org.jbpm.context.exe.converter.SerializableToByteArrayConverter" />
+ <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance" />
+ </jbpm-type>
+
<!-- hibernatable ejb3 types -->
<jbpm-type>
<matcher>
@@ -162,15 +171,6 @@
<variable-instance class="org.jbpm.context.exe.variableinstance.JcrNodeInstance" />
</jbpm-type>
- <!-- java.io.Serializable -->
- <jbpm-type>
- <matcher>
- <bean class="org.jbpm.context.exe.matcher.SerializableMatcher" />
- </matcher>
- <converter class="org.jbpm.context.exe.converter.SerializableToByteArrayConverter" />
- <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance" />
- </jbpm-type>
-
</list>
</jbpm-types>
More information about the jbpm-commits
mailing list