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

Element Template Validation Error Messages don't refer to actual template #2111

Closed
MaxTru opened this issue Feb 22, 2021 · 1 comment
Closed
Labels
bug Something isn't working element templates
Milestone

Comments

@MaxTru
Copy link
Contributor

MaxTru commented Feb 22, 2021

Describe the Bug

Most of the error messages produced by the https://github.com/bpmn-io/bpmn-js-properties-panel/blob/master/lib/provider/camunda/element-templates/Validator.js produce their errors without refering to which element template they refer to.

Steps to Reproduce

Example for invalid property type

  1. Setup broken template:
[
  {
    "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.2.0/resources/schema.json",
    "name": "Default Rendering2",
    "id": "com.camunda.example.DefaultRendering2",
    "appliesTo": [
      "bpmn:ServiceTask"
    ],
    "properties": [
      {
        "label": "Input Parameter",
        "binding": {
          "type": "camunda:inputParameter",
          "name": "processVar",
          "asdf": "aasdasdasdf"
        }
      },
      {
        "label": "Output Parameter",
        "type": "I dont exist",
        "binding": {
          "type": "camunda:outputParameter",
          "source": "outputParam"
        }
      }
    ]
  }
]
  1. Start Modeler and create new BPMN
  2. Error message is logged: [diagram_1.bpmn] invalid property type <I dont exist>; must be any of { String, Text, Boolean, Hidden, Dropdown }

Note that the error message is not very helpful if you have many element template present since you will not know which element template is affected.

Expected Behavior

All element template validation errors refer to the affected template in a consistent way (e.g., by referring to id and name)

Environment

  • OS: Arch Linux
  • Camunda Modeler Version: 4.6
@MaxTru MaxTru added bug Something isn't working element templates labels Feb 22, 2021
@MaxTru MaxTru changed the title Element Template Validation Error Message don't refer to actual template Element Template Validation Error Messages don't refer to actual template Feb 22, 2021
MaxTru added a commit to bpmn-io/bpmn-js-properties-panel that referenced this issue Feb 22, 2021
@MaxTru MaxTru added the needs review Review pending label Feb 22, 2021 — with bpmn-io-tasks
MaxTru added a commit to bpmn-io/bpmn-js-properties-panel that referenced this issue Feb 22, 2021
MaxTru added a commit to bpmn-io/bpmn-js-properties-panel that referenced this issue Feb 23, 2021
MaxTru added a commit to bpmn-io/bpmn-js-properties-panel that referenced this issue Feb 23, 2021
MaxTru added a commit to bpmn-io/bpmn-js-properties-panel that referenced this issue Feb 23, 2021
@MaxTru MaxTru added fixed upstream Requires integration of upstream change and removed needs review Review pending labels Feb 23, 2021 — with bpmn-io-tasks
@pinussilvestrus pinussilvestrus added this to the M46 milestone Feb 23, 2021
@pinussilvestrus
Copy link
Contributor

Closed via 2e1ecc1

image

@bpmn-io-tasks bpmn-io-tasks bot removed the fixed upstream Requires integration of upstream change label Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working element templates
Projects
None yet
Development

No branches or pull requests

2 participants