In the BPMN serialization, connections from data objects to events are dealt with differently than connections to objects of the Activity type.
Connections to events
If an object of the Data output type is connected to a start event, the dataOutput, dataOutputAssociation and dataOutputSet elements are generated under the startEvent element in the BPMN file.
The ID of the dataOutput element consists of the DATA_OUTPUT_ string and the GUID of the object of the Data Output type. If the Collection symbol is used for the object in the BPMN diagram, the value of the isCollection attribute is set to true, otherwise it is set to false.
The itemSubjectRef attribute references the highest element itemDefinition that is created for each data object. Its ID consists of the ITEM_ string and the GUID of the data object. The dataOutputSet element contains a dataoutputRefs element that references the dataOutput element.
In the dataOutputAssociation element the subordinate elements sourceRef and targetRef are generated. The first references the dataInput element and the second the dataOutput element of the process.
Because the end event is connected to an element of the Data input type, the subordinate elements dataInput, dataInputAssociation and dataInputSet are generated under the endEvent element. The attributes and IDs are generated similar to those for the start event.
Connections to objects of the 'Activity' type
If an object of the User task type has an incoming and an outgoing connection to two objects of the Data output type, an ioSpecification element is generated below the userTask element during export to a BPMN file.
A dataInput element is generated for the incoming connection and a dataOutput element is generated for the outgoing connection. The respective ID consists of either the DATA_INPUT_ or the DATA_OUTPUT_ string and the GUID of the associated data object. Behind this the string OF is attached followed by the GUID of the object of the User task type.
Similar to events, the inputSet and outputSet elements contain the dataInputRefs or dataOutputRefs elements that reference the data.
The dataInputAssociation and dataOutputAssociation elements connect the dataInput and dataOutput elements for the object of the User task type with the dataOutput element for the process.