Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Events are missing the name attribute #1296

Closed
RomanJRW opened this issue Mar 26, 2020 · 6 comments · Fixed by #1297
Closed

Link Events are missing the name attribute #1296

RomanJRW opened this issue Mar 26, 2020 · 6 comments · Fixed by #1297
Labels
bug Something isn't working

Comments

@RomanJRW
Copy link

Describe the Bug

When Link events (either catch or throw) are added to a model, they do not get given a default name attribute. I believe that this is a required attribute according to specification, so the resulting model is not considered valid. To demonstrate the failed validation, if I try to deploy a diagram containing link events that haven't been explicitly given a name from the Camunda Modeler, I get the following error:

Deploy error: {"deploymentName":"diagram_5","message":"ENGINE-09005 Could not parse BPMN process. Errors: \n* cvc-complex-type.4: Attribute 'name' must appear on element 'bpmn:linkEventDefinition'. | resource diagram_5.bpmn | line 13 | column 35\n* cvc-complex-type.4: Attribute 'name' must appear on element 'bpmn:linkEventDefinition'. | resource diagram_5.bpmn | line 18 | column 35","status":400,"statusText":"Bad Request","url":"http://localhost:8080/engine-rest/deployment/create"} [ deploy-error ]

I originally found this in Optimize where we are also getting the same validation error, but it's easier to reproduce in Camunda Modeler.

Steps to Reproduce

  1. Create a model containing either or both of link throw intermediate event and link catch intermediate event. Do not set the name property manually.
  2. Validate process model, for example when deploying in Camunda Modeler

Expected Behavior

I'm not totally sure what the preferred behaviour would be. One option would be for a default value to be assigned to the name attribute, perhaps using the id of the intermediate event that it is part of. Although this wouldn't necessarily be useful until overridden, it would at least still not leave models in a potentially invalid state.

Environment

  • Browser: Chrome 80.0.3987.149
  • OS: MacOS 10.14.5
  • Library version: 6.3.4
@RomanJRW RomanJRW added the bug Something isn't working label Mar 26, 2020
@nikku
Copy link
Member

nikku commented Mar 26, 2020

Thanks for reporting this issue!

Do you have a valid diagram that can be deployed (and executed) on Camunda?

@RomanJRW
Copy link
Author

No worries 🙂

I've had to attach as .txt files as GitHub doesn't allow bpmn or xml files. As you can see, the only difference between the deployable diagram and the undeployable diagram is the presence of the name attribute on the link event, which matches the logged parsing exception message too.

deployable_links.txt
undeployable_links.txt

@nikku
Copy link
Member

nikku commented Mar 26, 2020

To better understand your issue your expected behavior is that Link events, without further configuration

(1) should be deployable?
(2) pass the XSD schema validation check?

I'd argue that (1) will be impossible to achieve as we'd otherwise need to automagically generate sound names for the link event definitions.

If you use a technical implementation tool such as the Camunda Modeler you can configure the link name in a properties panel, cf. the following screenshot:

image

@nikku
Copy link
Member

nikku commented Mar 26, 2020

One simple fix would be to serialize an empty link name ("" per default).

@RomanJRW
Copy link
Author

RomanJRW commented Mar 26, 2020

Thanks for the quick response 👍. I agree and I'm only really concerned about (2), the deployment was just an example to demonstrate the validation failure, sorry for not being clearer there. For context, in Optimize we don't allow the setting of properties or the modification of xml, so any model using link events are currently unusable because of the validation failures.

Given that there is no sensible default name, I also think that the empty link name quick fix would be fine

@RomanJRW
Copy link
Author

Thanks for getting this fixed so quickly 🎉. When do you think this is likely to be released? It would be very much appreciated if we could get it before the Optimize 3.0.0 release next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants