Skip to content

feat: support zeebe:calledDecision #53

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: support zeebe:calledDecision #53

wants to merge 1 commit into from

Conversation

yT0n1
Copy link

@yT0n1 yT0n1 commented May 22, 2025

related to camunda/camunda-modeler#5025

Proposed Changes

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@yT0n1 yT0n1 requested a review from Copilot May 22, 2025 09:44
@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label May 22, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for the new zeebe:calledDecision binding in the validator and covers it with tests.

  • Extend valid binding types list to include zeebe:calledDecision
  • Add two new tests: one for successful validation of called decision templates and one for error scenarios
Files not reviewed (2)
  • test/fixtures/called-decision-broken.json: Language not supported
  • test/fixtures/called-decision.json: Language not supported
Comments suppressed due to low confidence (1)

test/spec/validationSpec.js:509

  • The negative test checks only overall validity but does not assert specific error messages or codes. To ensure the validator fails for the intended reasons, add assertions on the content of results (e.g., error messages or keys).
expect(valid).to.be.false;

@@ -252,14 +252,14 @@ describe('Validator', function() {
message: 'must provide choices=[] with "Dropdown" type'
},
{
message: 'invalid property.binding type "zeebe:taskDefinition:foo"; must be any of { property, zeebe:taskDefinition:type, zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader, bpmn:Message#property, bpmn:Message#zeebe:subscription#property, zeebe:taskDefinition, zeebe:calledElement, zeebe:linkedResource, zeebe:userTask }'
message: 'invalid property.binding type "zeebe:taskDefinition:foo"; must be any of { property, zeebe:taskDefinition:type, zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader, bpmn:Message#property, bpmn:Message#zeebe:subscription#property, zeebe:taskDefinition, zeebe:calledElement, zeebe:linkedResource, zeebe:userTask, zeebe:calledDecision }'
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The test duplicates the full list of supported binding types, which makes it brittle if that list changes. Consider fetching the supported bindings from the validator or using a regex/assertion that only checks for the presence of 'zeebe:calledDecision' instead of hard-coding the entire list.

Suggested change
message: 'invalid property.binding type "zeebe:taskDefinition:foo"; must be any of { property, zeebe:taskDefinition:type, zeebe:input, zeebe:output, zeebe:property, zeebe:taskHeader, bpmn:Message#property, bpmn:Message#zeebe:subscription#property, zeebe:taskDefinition, zeebe:calledElement, zeebe:linkedResource, zeebe:userTask, zeebe:calledDecision }'
message: /invalid property\.binding type "zeebe:taskDefinition:foo"; must be any of .*zeebe:calledDecision.*/

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Currently worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant