Handling the DataOutputAssociation import error


#1

Getting the below error while importing a diagram in demo.bpmn.io. Also the positioning of the elements and arrows in the model is incorrect. Is there any way i can change the model so that the warnings and the positioning is proper?

element <bpmn:DataOutput id="Dout1885779" />
referenced by <bpmn:DataOutputAssociation id="_1885815" />#targetRef
not yet drawn

diagram_example.bpmn (8.1 KB)


#2

The offending section in the BPMN diagram is around <manualTask id="_1885776">. The task definition looks like the following (IDs renamed for clarity):

<semantic:manualTask id="MANUAL_TASK" name="Request">
  <semantic:ioSpecification>
    <semantic:dataOutput id="DATA_OUTPUT" />
    <semantic:inputSet />
    <semantic:outputSet>
      <semantic:dataOutputRefs>DATA_OUTPUT</semantic:dataOutputRefs>
    </semantic:outputSet>
  </semantic:ioSpecification>
  <semantic:dataOutputAssociation id="DATA_ASSOCIATION">
    <semantic:sourceRef>DATA_OBJECT</semantic:sourceRef>
    <semantic:targetRef>DATA_OUTPUT</semantic:targetRef>
  </semantic:dataOutputAssociation>
</semantic:manualTask>

What it does is that it defines a DataOutputAssociation#DATA_ASSOCIATION going from DATA_OBJECT (outside the Manual Task to DATA_OUTPUT (inside the manual task). With my understanding of the BPMN 2.0 spec, this is not valid, because the output association source must lie within the manual task.

Cf. p. 223 of the BPMN 2.0 spec about DataOutputAssociation:

DataOutputAssociation

The DataOutputAssociation can be used to associate a DataOutput contained within an ACTIVITY with any ItemAwareElement accessible in the scope the association will be executed in. The target of such a DataAssociation can be every ItemAwareElement accessible in the current scope, e.g., a Data Object, a Property, or an Expression.


#3

You may swap sourceRef and targetRef of the data association element:

...
   <semantic:dataOutputAssociation id="DATA_ASSOCIATION">
    <semantic:sourceRef>DATA_OUTPUT</semantic:sourceRef>
    <semantic:targetRef>DATA_OBJECT</semantic:targetRef>
  </semantic:dataOutputAssociation>
...

This, however changes the diagrams semantics :wink:.


#4

Hi Nikku, thanks for the reply. Also When I import the diagram, the arrow positioning is correct, its inside all the elements, is there anything I can do programatically to position it correctly?bpmn_diagram


#5

There is nothing out of the box you can do to fix this.