question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Potential BPMN-Spec conformance flaw: Link-Event-Definition target property is handled as an attribute

See original GitHub issue

Describe the Bug

The target-property of a LinkEventDefinition is described as an xsd:element in the BPMN 2.0 Semantic-Schema. Therefore it should be a child node of the link event definition in a BPMN model.

In contrast bpmn-moddle defines a link event definition to include a property target which is marked as an attribute: Link-Event-Definition-Target property.

This results in serialized models violating the BPMN-Semantic-Schema mentioned above: The target-property will be serialized in an attribute of the LinkEventDefinition whereas the Schema requires it to be a child node.

Importing a valid model (including the target as a child node) results in the target property being removed from the link event definition entirely.

Steps to Reproduce

The described bug occurs in two “directions”:

Case A (Export/Serialization) - Setting the target property on a link event definition results in the value being set as attribute in a serialized model Case B (Import/Deserialization) - Importing a valid BPMN-model containing the target of a link event definition as a child node results in the property being removed

The bug can not be directly reproduced by the means of this repository, but rather using another library like bpmn-js using bpmn-moddle.

Github does not allow uploading XML or BPMN-files, therefore models have been uploaded in plaintext.

Case A:

If the target property of a link event definition is set programmatically an exported/serialized model will contain the target property as an attribute instead of a child node: see the attached file invalid-link-event-definitions.txt, Link-Event-Definition with ID ID14e6ec89-6434-4ef9-bdab-6784f8fee217.

Case B:

The attached file valid-link-event-definitions.txt contains a valid model according to the BPMN-Spec. Importing it by using bpmn-js (for example by using the bpmn-js demo) results in the target property being removed from the link event definition of the intermediate throw event. The demo also shows an import warning:

unparsable content <bpmn:target> detected line: 5 column: 8 nested error: unknown type <bpmn:Target>

Expected Behavior

In Case A, the serialized model should include the target property as a child node <bpmn:target>.

In Case B, the model should be imported without any warning and without the target property being removed.

Attached files valid-link-event-definitions.txt invalid-link-event-definitions.txt

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
barmaccommented, Dec 2, 2022

@barmac We could also workaround it, as we often do (https://github.com/bpmn-io/bpmn-moddle/blob/master/tasks/transforms/transformBPMN.cjs#L47).

We could, but the linked file is already a ball of mud ^^

1reaction
nikkucommented, Dec 2, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · bpmn-io/bpmn-moddle - GitHub
Potential BPMN-Spec conformance flaw: Link-Event-Definition target property is handled as an attribute backlog bug good first issue pr- ...
Read more >
Wuffle Board - bpmn-io/tasks
genius42 avatar. Potential BPMN-Spec conformance flaw: Link-Event-Definition target property is handled as an attribute. bugpr-welcomegood first issue.
Read more >
Business Process Model and Notation (BPMN), Version 2.0
10.6.3 Relationship between Error Handling and Compensation . ... This specification defines a number of attributes and properties of the semantic elements ...
Read more >
BPMN METHOD AND STYLE - e‌BPM
tool vendor yet claims full conformance with the BPMN-I Profile, ... suggests a potential problem in the Sales department, since the actual delivery...
Read more >
Data binding overview - WPF .NET - Microsoft Learn
A binding target object. A target property. A binding source. A path to the value in the binding source to use. For example,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found