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

'ID must be unique' error message #2052

Open
madhurrya opened this issue Aug 22, 2024 · 9 comments
Open

'ID must be unique' error message #2052

madhurrya opened this issue Aug 22, 2024 · 9 comments

Comments

@madhurrya
Copy link
Contributor

In https://mysql.spiffcrm.com/ when I save an existing model it's showing this 'ID must be unique' error message in properties. But the model get saved successfully.
As discussed on slack those model ids actually doesn't exist in the system. It seems this is not a valid message. Seems to be due to a recent change. If I have not expanded the Process general section, I wouldn't even notice this message as the model get saved successfully.

Image

These are some models you can check this
https://mysql.spiffcrm.com/editor/process-models/misc:qa:madhu-testing:temp-model1/files/temp-model1.bpmn
https://mysql.spiffcrm.com/editor/process-models/misc:qa:call-activity-with-non-executable-model/files/call-activity-with-non-executable-model.bpmn

If the ID actually exists in another model, it normally shows this error message at the top like this. But for the ones I mentioned above there is no error message at the top. I see it only if I expand the process properties.

Image

@jasquat
Copy link
Contributor

jasquat commented Aug 22, 2024

The ID must be unique. error in the properties panel is not something we control - it's handled by bpmn-io libraries that we use. We did recently update some of those libraries though. It could be that the new versions are more sensitive.

This error also won't keep you from saving the model, however it will keep the xml from getting updated so even if you save, the supposedly invalid id should not be passed through.

One thing to keep in mind, bpmn-js-properties-panel requires ALL ids to be unique. So even if a script task has a matching id, it will show this error.

@calexh-sar
Copy link
Contributor

One thing to keep in mind, bpmn-js-properties-panel requires ALL ids to be unique. So even if a script task has a matching id, it will show this error.

@usama9500, in case this isn't documented somewhere. Maybe should be both in our core documentation and FAQ?

@calexh-sar
Copy link
Contributor

@madhurrya and/or @jasquat is this an BPMN.IO issue and we should move it to that repository, or is it a non-issue and making sure the unique id aspect is documented is all that is needed?

@jasquat
Copy link
Contributor

jasquat commented Sep 10, 2024

@calexh-sar i think we should just document it unless we confirm that we are seeing false positives.

@calexh-sar calexh-sar moved this from New Issue to Documentation in SpiffWorkflow Sep 11, 2024
@madhurrya
Copy link
Contributor Author

Noticed the same issue in spiffdemo also. I just created this new model and when trying to save it noticed the same error.
image

Model - https://spiffdemo.org/editor/process-models/playground:madhurya:madhu-test-form-1/files/madhu-test-form-1.bpmn

@jasquat is there anything we can do about this?

@jasquat
Copy link
Contributor

jasquat commented Oct 2, 2024

@madhurrya I don't think there is anything we can do about this easily. It looks like the ID you have in the screenshot is currently the id of the Process so you did manage to save that ID. What were the steps you took to get this error?

@madhurrya
Copy link
Contributor Author

@jasquat Yes, even if that error comes the model get saved successfully.
For the above model what I did was created a new model and changed the default manual task to user task and renamed it and changed the instructions and added a form and saved.
Followed the same steps and it happened here again. Please check this video. https://drive.google.com/file/d/1r4CTJccxhi3UIdS8IplLysifURrqBbXG/view?usp=sharing

But in this video it didn't happen for the above steps. But after saving it couple of times again then the error came.
https://drive.google.com/file/d/1GglEH8uXezfHqa8VPVjpHNcJDCAhEHte/view?usp=sharing

I feel this happens randomly and not specific to a model or the steps we follow.

@jasquat
Copy link
Contributor

jasquat commented Oct 2, 2024

Oh odd. It seems to happen when you save the diagram while some element is selected, such as the End Event or User task. If no item is selected when saving, then it doesn't seem to happen. This could be due to the way we are refreshing the state or something but it is rather odd.

@madhurrya
Copy link
Contributor Author

@jasquat yeah it seems that's what happens. I checked again now and it seems if I save while an element is selected it gives that error. But if I have not selected then no error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Documentation
Development

No branches or pull requests

3 participants