[jboss-jira] [JBoss JIRA] Updated: (JBPM-1036) config-type schema declaration doesnt accept custom instantiator classes
Tom Baeyens (JIRA)
jira-events at lists.jboss.org
Mon Sep 3 10:22:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBPM-1036?page=all ]
Tom Baeyens updated JBPM-1036:
------------------------------
Fix Version/s: jBPM jPDL 3.2.2
> config-type schema declaration doesnt accept custom instantiator classes
> ------------------------------------------------------------------------
>
> Key: JBPM-1036
> URL: http://jira.jboss.com/jira/browse/JBPM-1036
> Project: JBoss jBPM
> Issue Type: Feature Request
> Affects Versions: jBPM jPDL 3.2.1
> Reporter: Roland Huss
> Assigned To: Tom Baeyens
> Priority: Minor
> Fix For: jBPM jPDL 3.2.2
>
>
> Specifying a custom delegation instantiator with a fully qualified class name like in
> <action config-type="com.consol.cmas.workflow.jbpm.exe.SpringInstantiator"
> class="com.consol.cmas.projects.it.workflow.development.AssignCallToReviewerActionHandler"/>
>
> doesnt work anymore because the schema allows value from a fixed enumeration only:
> <xs:attribute name="config-type" default="field">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="field"/>
> <xs:enumeration value="bean"/>
> <xs:enumeration value="constructor"/>
> <xs:enumeration value="configuration-property"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
> This contrary to the relevant code in the Delegation class this should work (and indeed worked in some pre 3.2.1 versions):
> Instantiator instantiator = null;
> try {
> // find the instantiator
> instantiator = (Instantiator) instantiatorCache.get(configType);
> if (instantiator == null) {
> // load the instantiator class
> Class instantiatorClass = classLoader.loadClass(configType);
> // instantiate the instantiator with the default constructor
> instantiator = (Instantiator) instantiatorClass.newInstance();
> instantiatorCache.put(configType, instantiator);
> }
> } catch (Exception e) {
> log.error(e);
> throw new JbpmException("couldn't instantiate custom instantiator '" + configType + "'", e);
> }
>
> So please either relax the schema restriction (which I highly prefer, since I rely on using a custom instantiator) or remove the possibility to
> use a custom instantiator.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list