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

Clearing element template property (type=String) value leads to left overs in XML #830

Closed
nikku opened this issue Dec 12, 2022 · 3 comments
Labels
bug Something isn't working Camunda Cloud element templates invalid This doesn't seem right

Comments

@nikku
Copy link
Member

nikku commented Dec 12, 2022

Describe the Bug

When I clear the value of an element template property I expect the value to be removed from the XML if it was otherwise illegal: zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader, zeebe:taskDefinition:type. Instead what I'm seeing is that the value is kept, leading to illegal BPMN 2.0 XML, i.e.

        <zeebe:ioMapping>
          <zeebe:input target="test" />
          <zeebe:output source="test" />
        </zeebe:ioMapping>

Steps to Reproduce

  1. npm run start:cloud-templates
  2. Open test_leftover.bpmn
  3. clear inputs
  4. export
  5. Invalid left-overs (cf. test_leftover_after.bpmn

Expected Behavior

Empty inputs result in removed bindings. Validation indicates whether the property is needed.

Environment

  • Host (Browser/Node version), if applicable: Any
  • OS: Any
  • Library version: latest

Related to #824 (review).

@nikku nikku added the bug Something isn't working label Dec 12, 2022
@nikku nikku changed the title Removing template contents leads to left overs Clearing element template property (type=String) value leads to left overs in XML Dec 12, 2022
@nikku nikku added the in progress Currently worked on label Dec 12, 2022 — with bpmn-io-tasks
@smbea
Copy link
Contributor

smbea commented Dec 12, 2022

The expectation is that we also clean up ioMappings/taskHeaders and such elements if there are no values? That is our usual stance on such things, if I'm not mistaken

Example: currently, the zeebe:header empty values aren't persisted but we are left with a <zeebe:taskHeaders /> without any children inside.

@nikku
Copy link
Member Author

nikku commented Dec 12, 2022

That is fine / could be a follow up. But it is non-critical. I.e. Zeebe engine just fine handles these cases.

smbea added a commit that referenced this issue Dec 13, 2022
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending in progress Currently worked on and removed in progress Currently worked on needs review Review pending labels Dec 14, 2022
@nikku
Copy link
Member Author

nikku commented Dec 14, 2022

Closing as not a bug: #824 (comment).

@nikku nikku closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the in progress Currently worked on label Dec 14, 2022
@nikku nikku added the invalid This doesn't seem right label Dec 14, 2022
@nikku nikku removed their assignment Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Camunda Cloud element templates invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants