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

Dot separated process variable name as Map accessor on Task parameter mapping fails on Import in Designer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • jBPM 6.4.0.CR2
    • jBPM 6.0.0.Beta5
    • Designer

    Description

      Assuming you have a BPMN like this:

      <definitions id="Definition" ...>
      
        <itemDefinition id="_myMapItem" structureRef="java.util.Map" />
      
        <process processType="Private" isExecutable="true" id="com.sample.bpmn.hello" name="Hello World" >
      
          <property id="myMap" itemSubjectRef="_myMapItem"/>
      ...
          <userTask id="_4" name="Task 1" >
      ...
            <dataInputAssociation>
              <sourceRef>myMap.var1</sourceRef>
              <targetRef>_4_myMapVar1Input</targetRef>
            </dataInputAssociation>
      ...
          </userTask>
      

      jBPM5 runtime (BRMS 5.3.1) can run the process and 'myMap.var1' is interpreted as 'myMap.get("var1");' though it logs a schema error on parsing:

      (null: 101, 15): cvc-id.1: There is no ID/IDREF binding for IDREF 'myMap.var1'.
      

      Note: Result mapping to 'myMap.var1' doesn't work (Message : "Could not find variable scope for variable myMap.var1").

      But Process Designer throws an Exception and fails to import when you import such a BPMN.

      18:13:08,014 ERROR [stderr] (http-/127.0.0.1:8080-3) org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Unresolved reference 'myMap.var1'. (inputStream://dummyUriWithValidSuffix.xml, 52, 42)
      18:13:08,014 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
      18:13:08,014 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:191)
      18:13:08,014 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
      18:13:08,015 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
      18:13:08,015 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.jbpm.designer.web.profile.impl.JbpmProfileImpl.getDefinitions(JbpmProfileImpl.java:285)
      18:13:08,015 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.jbpm.designer.web.profile.impl.JbpmProfileImpl$Proxy$_$$_WeldClientProxy.getDefinitions(JbpmProfileImpl$Proxy$_$$_WeldClientProxy.java)
      18:13:08,015 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.jbpm.designer.web.server.TransformerServlet.doPost(TransformerServlet.java:221)
      ...
      18:13:08,022 ERROR [stderr] (http-/127.0.0.1:8080-3) Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference 'myMap.var1'. (inputStream://dummyUriWithValidSuffix.xml, 52, 42)
      18:13:08,023 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1154)
      18:13:08,023 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1228)
      18:13:08,023 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:733)
      18:13:08,023 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:524)
      18:13:08,023 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1917)
      18:13:08,023 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.impl.XMLEntityScanner.load(XMLEntityScanner.java:1763)
      18:13:08,024 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(XMLEntityScanner.java:1249)
      18:13:08,024 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(XMLDocumentScannerImpl.java:1217)
      18:13:08,024 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
      18:13:08,024 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
      18:13:08,024 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
      18:13:08,025 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
      18:13:08,025 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1201)
      18:13:08,025 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:554)
      18:13:08,025 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.apache.xerces.jaxp.SAXParserImpl.parse(SAXParserImpl.java:289)
      18:13:08,025 ERROR [stderr] (http-/127.0.0.1:8080-3) 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
      18:13:08,026 ERROR [stderr] (http-/127.0.0.1:8080-3) 	... 36 more
      

      This JIRA requests Designer to accept such a BPMN. There can be some variants which are usually acceptable as MVEL expression:

      • Getter: e.g. 'person.name' which represents person.getName()
      • More nested case: e.g. 'myMap.person.name' which represents myMap.get("person").getName();

      Attachments

        Activity

          People

            rhn-support-tsurdilo Tihomir Surdilovic (Inactive)
            rhn-support-tkobayas Toshiya Kobayashi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: