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

No duplicate names rule proposal #153

Open
danielriedmueller opened this issue Nov 29, 2024 · 5 comments
Open

No duplicate names rule proposal #153

danielriedmueller opened this issue Nov 29, 2024 · 5 comments
Labels
backlog Queued in backlog good first issue Good for newcomers rules Concerning existing or missing rules

Comments

@danielriedmueller
Copy link

No Duplicate Names (no-duplicate-names)

A rule that checks, whether two elements have the same name.

Example of incorrect usage for this rule:

Incorrect usage example

    ...
    <bpmn:startEvent id="StartEvent_070f514" name="Element A">
      <bpmn:outgoing>Flow_1fnaiy8</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:endEvent id="Event_1copj14" name="Element A">
      <bpmn:incoming>Flow_1fnaiy8</bpmn:incoming>
    </bpmn:endEvent>
    ...

Example of correct usage for this rule:

Correct usage example

    ...
    <bpmn:startEvent id="StartEvent_070f514" name="Element A">
      <bpmn:outgoing>Flow_1fnaiy8</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:endEvent id="Event_1copj14" name="Element B">
      <bpmn:incoming>Flow_1fnaiy8</bpmn:incoming>
    </bpmn:endEvent>
    ...

How does the rule improve the BPMN diagram?

With unique named elements, each element could be recognized by a human (IDs are not human friendly readable) and for further processing, like unique description pages for each element with nice titles.

Rule Details

  • Name: no-duplicate-names
  • Default notification level: error

What alternatives did you consider?

In our project, we need to have each elements name be unique. The unique ids are not human friendly readable.
Alternative would be to auto rename name, if same name already exists (this would be the workaround in our project).
Our project if you are interested: https://www.mediawiki.org/wiki/Extension:Cognitive_Process_Designer

@danielriedmueller danielriedmueller added the rules Concerning existing or missing rules label Nov 29, 2024
@nikku
Copy link
Member

nikku commented Nov 29, 2024

I think this is a great proposal for a rule, thanks for sharing 🤩

@nikku nikku added the good first issue Good for newcomers label Nov 29, 2024
@barmac
Copy link
Member

barmac commented Nov 29, 2024

While the rule may be useful, I'd rather not include it in the recommended ruleset. There can be multiple exceptions, e.g. for outcoming flows of an exclusive gateway:
image

@nikku
Copy link
Member

nikku commented Dec 2, 2024

I think we'd be just fine if we whitelist outgoing flows.

@nikku
Copy link
Member

nikku commented Dec 2, 2024

We also want to whitelist labels on gateways and throw events:

image

@barmac barmac added the backlog Queued in backlog label Dec 18, 2024
@barmac
Copy link
Member

barmac commented Dec 18, 2024

I am moving this to the backlog now, but we can revisit and/or gather more exceptions from this rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog good first issue Good for newcomers rules Concerning existing or missing rules
Projects
None yet
Development

No branches or pull requests

3 participants