Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-1036

config-type schema declaration doesnt accept custom instantiator classes

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Minor Minor
    • jBPM 3.2.2
    • jBPM 3.2.1
    • None
    • None

      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.

            tom.baeyens Tom Baeyens (Inactive)
            pirx_jira Roland Huss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: