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

Add a rule to prevent bpmn:Error scopes with missing required properties #23

Open
pinussilvestrus opened this issue Mar 22, 2021 · 0 comments
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers spring cleaning Could be cleaned up one day

Comments

@pinussilvestrus
Copy link
Contributor

Is your feature request related to a problem? Please describe

Currently bpmn:Error scopes can be created without required properties. For example, following scoped binding

"scopes": [
  {
    "type": "bpmn:Error",
    "id": "error-1",
    "properties": []
  }
]

would be valid, but would produce an invalid Error in the bpmn-js Properties Panel

<bpmn:error id="Error_error-1_2m10p8r" />

that misses required properties as name and errorCode.

Describe the solution you'd like

Add a rule that checks for required properties.

  • name
  • errorCode

Example scoped binding

"scopes": [
  {
    "type": "bpmn:Error",
    "id": "error-1",
    "properties": [
      {
        "type": "String",
        "value": "error-code",
        "binding": {
           "type": "property",
           "name": "errorCode"
         }
       },
       {
         "type": "String",
         "value": "error-message",
         "binding": {
            "type": "property",
            "name": "camunda:errorMessage"
           }
       },
       {
         "type": "String",
         "value": "error-name",
         "binding": {
            "type": "property",
            "name": "name"
        }
      }
    ]
  }
]

Describe alternatives you've considered

Keep it as it is.

@pinussilvestrus pinussilvestrus added the enhancement New feature or request label Mar 22, 2021
@pinussilvestrus pinussilvestrus changed the title Add a rule to prevent bpmn:Error scopes with required properties Add a rule to prevent bpmn:Error scopes with missing required properties Mar 22, 2021
@pinussilvestrus pinussilvestrus added the backlog Queued in backlog label Mar 23, 2021 — with bpmn-io-tasks
@pinussilvestrus pinussilvestrus added the good first issue Good for newcomers label Mar 29, 2021
@pinussilvestrus pinussilvestrus added the spring cleaning Could be cleaned up one day label Apr 6, 2021
@pinussilvestrus pinussilvestrus added good first issue Good for newcomers and removed good first issue Good for newcomers labels May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers spring cleaning Could be cleaned up one day
Projects
None yet
Development

No branches or pull requests

1 participant