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

Error message provides insufficient context #110

Open
nikku opened this issue Aug 28, 2023 · 1 comment
Open

Error message provides insufficient context #110

nikku opened this issue Aug 28, 2023 · 1 comment
Labels
backlog Queued in backlog bug Something isn't working Camunda Cloud element templates spring cleaning Could be cleaned up one day

Comments

@nikku
Copy link
Member

nikku commented Aug 28, 2023

Describe the Bug

Our validation reports errors that are hard to impossible to comprehend by a user. For example, given the following template what is broken is that feel is not compatible to type=Dropdown. What is reported is that (without context) type=String|Text are the only compatible options, rather than highlighting that feel is not supported for Dropdown:

{
  "$schema": "https://unpkg.com/browse/@camunda/zeebe-element-templates-json-schema/resources/schema.json",
  "name": "Connector Name",
  "id": "connector-id",
  "appliesTo": ["bpmn:Task"],
  "properties": [
    {
      "label": "Some label",
      "type": "Dropdown",
      "feel": "optional",
      "binding": {
          "type": "zeebe:input",
          "name": "variableName",
          "key": "asd"
      },
      "choices": [],
      "value": "=default expression"
    }
  ]
}

Steps to Reproduce

  1. Open above template
  2. See that validation marks property.type=Dropdown as invalid

Expected Behavior

We validate feel instead; it is not compatible with property.type=Dropdown.

Environment

  • Host (Browser/Node version), if applicable: Any
  • OS: Any
  • Library version: v0.12.0
@nikku nikku added bug Something isn't working Camunda Cloud spring cleaning Could be cleaned up one day element templates labels Aug 28, 2023
@nikku nikku added the backlog Queued in backlog label Aug 31, 2023 — with bpmn-io-tasks
@barmac
Copy link
Contributor

barmac commented Jan 17, 2024

Something like:

{
 "if": {
   "language": {
      "const": "feel"
    }
  },
  "then": {
      "type": {
        "not": {
          "const": "Dropdown"
        }
      }
   }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog bug Something isn't working Camunda Cloud element templates spring cleaning Could be cleaned up one day
Projects
None yet
Development

No branches or pull requests

2 participants