camunda-bpmn.js icon indicating copy to clipboard operation
camunda-bpmn.js copied to clipboard

typeError: r is null

Open kant1981 opened this issue 10 years ago • 5 comments

Hi,

I have met a tough problem. I have one bpmn xml file which can be rendered by camunda-bpmn.js vey well, HOWEVER, another bpmn xml file which is generated from the same model but with a different version of parser, can not be rendered and in firebug it shows the error "typeError: r is null".

After roughly analysing the two xml files, I find that in the first xml file it contains only <dataObject> but in the second xml file it contains both <dataObject> and <dataObjectReference>. Is that where the error occurs?

kant1981 avatar Jul 29 '14 16:07 kant1981

Here is another difference.

There is one serviceTask and I copy the xml pieces here. I am not sure if here is where the problem happens.

the xml file which can not be rendered is shown below.

<serviceTask activiti:async="true" activiti:class="com.oneandone.coredev.swistec.psi.binding.activiti.ExecuteServiceAdapterDelegate" completionQuantity="1" id="PSItaskeventmerger" isForCompensation="false" name="PSI task event merger" startQuantity="1" uipcpmeta:originType="task">
         <extensionElements>
            <signavio:signavioMetaData metaKey="bgcolor" metaValue="#FF9900" />
            <signavio:signavioMetaData metaKey="taskrelatedriskcontrol" metaValue="" />
            <signavio:signavioMetaData metaKey="psiconfiguration" metaValue="" />
            <signavio:signavioMetaData metaKey="communicationtype" metaValue="" />
            <signavio:signavioMetaData metaKey="adaptertype" metaValue="PSI Java Adapter" />
            <signavio:signavioMetaData metaKey="adapterconfiguration" metaValue="" />
            <signavio:signavioMetaData metaKey="adapterclassname" metaValue="com.oneandone.access.hads.lho.process.eventhandling.TaskEventMergerAdapter" />
            <signavio:signavioMetaData metaKey="synchronousexecutionjbpm" metaValue="" />
            <activiti:field name="serviceAdapter">
               <activiti:string>com.oneandone.access.hads.lho.process.eventhandling.TaskEventMergerAdapter</activiti:string>
            </activiti:field>
         </extensionElements>
         <incoming>sequenceFlow_67</incoming>
         <outgoing>sequenceFlow_93</outgoing>
         <ioSpecification id="ioSpecification">
            <dataInput id="dataInput" />
            <dataOutput id="dataOutput" />
            <inputSet id="DefaultInputSet" name="DefaultInputSet">
               <dataInputRefs>dataInput</dataInputRefs>
               <outputSetRefs>DefaultOutputSet</outputSetRefs>
            </inputSet>
            <outputSet id="DefaultOutputSet" name="DefaultOutputSet">
               <dataOutputRefs>dataOutput</dataOutputRefs>
               <inputSetRefs>DefaultInputSet</inputSetRefs>
            </outputSet>
         </ioSpecification>
         <dataInputAssociation id="dataInputAssociation">
            <sourceRef>Task-Liste-calculatedFlagsisStornoInQueueisEventInQueueisChangeInQueue_1</sourceRef>
            <targetRef>dataInput</targetRef>
         </dataInputAssociation>
         <dataOutputAssociation id="dataOutputAssociation">
            <sourceRef>dataOutput</sourceRef>
            <targetRef>Task-Liste-calculatedFlagsisStornoInQueueisEventInQueueisChangeInQueue_1</targetRef>
         </dataOutputAssociation>
      </serviceTask>

where you can see like <ioSpecification> and <inputSet> are not shown in the xml piece below.

the xml file which can be rendered is shown below.

<serviceTask activiti:async="true" activiti:class="com.oneandone.coredev.swistec.psi.binding.activiti.ExecuteServiceAdapterDelegate" completionQuantity="1" id="PSItaskeventmerger" isForCompensation="false" name="PSI task event merger" startQuantity="1" uipcpmeta:originType="task">
         <extensionElements>
            <signavio:signavioMetaData metaKey="bgcolor" metaValue="#FF9900" />
            <signavio:signavioMetaData metaKey="taskrelatedriskcontrol" metaValue="" />
            <signavio:signavioMetaData metaKey="psiconfiguration" metaValue="" />
            <signavio:signavioMetaData metaKey="communicationtype" metaValue="" />
            <signavio:signavioMetaData metaKey="adaptertype" metaValue="PSI Java Adapter" />
            <signavio:signavioMetaData metaKey="adapterconfiguration" metaValue="" />
            <signavio:signavioMetaData metaKey="adapterclassname" metaValue="com.oneandone.access.hads.lho.process.eventhandling.TaskEventMergerAdapter" />
            <signavio:signavioMetaData metaKey="synchronousexecutionjbpm" metaValue="" />
            <activiti:field name="serviceAdapter">
               <activiti:string>com.oneandone.access.hads.lho.process.eventhandling.TaskEventMergerAdapter</activiti:string>
            </activiti:field>
         </extensionElements>
         <incoming>sequenceFlow_67</incoming>
         <outgoing>sequenceFlow_93</outgoing>
         <dataInputAssociation id="dataInputAssociation">
            <sourceRef>Task-Liste-calculatedFlagsisStornoInQueueisEventInQueueisChangeInQueue</sourceRef>
            <targetRef>PSItaskeventmerger</targetRef>
         </dataInputAssociation>
         <dataOutputAssociation id="dataOutputAssociation">
            <sourceRef>PSItaskeventmerger</sourceRef>
            <targetRef>Task-Liste-calculatedFlagsisStornoInQueueisEventInQueueisChangeInQueue</targetRef>
         </dataOutputAssociation>
      </serviceTask>

kant1981 avatar Jul 30 '14 07:07 kant1981

Hi kant1981,

this seems to be a Bug / Limitation whatever you might call it :)

Thanks for reporting. Could you maybe provide the stacktrace of the error?

Daniel

meyerdan avatar Jul 30 '14 07:07 meyerdan

...t){var n=e.getStyle(),r=e.getBounds(),s=+r.x,a=+r.y,f=+r.width,l=+r.height,c=o[e...

here is where the shit happens

kant1981 avatar Jul 30 '14 08:07 kant1981

if you want, I can attach the whole xml, then you can do a complete analysis on the problem.

kant1981 avatar Jul 30 '14 08:07 kant1981

By the way, I have found another small problem on this js, that if the name of a task contains one or more full stop, then this task can not be annotated. Should I open a new issue for that, or?

kant1981 avatar Jul 30 '14 08:07 kant1981