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

Linting validates script task support for 8.2+ #67

Closed
2 tasks
Tracked by #3321
barmac opened this issue Dec 1, 2022 · 5 comments · Fixed by #68
Closed
2 tasks
Tracked by #3321

Linting validates script task support for 8.2+ #67

barmac opened this issue Dec 1, 2022 · 5 comments · Fixed by #68
Assignees

Comments

@barmac
Copy link
Contributor

barmac commented Dec 1, 2022

  • For Camunda 8.2+, require to set either script or task headers on ScriptTask
  • For previous versions, disallow script usage
@barmac barmac transferred this issue from camunda/camunda-modeler Dec 1, 2022
@barmac barmac self-assigned this Dec 1, 2022
@barmac barmac added in progress Currently worked on Camunda Cloud labels Dec 1, 2022
@barmac
Copy link
Contributor Author

barmac commented Dec 2, 2022

This will take a bit more time than expected because I need to refactor called-decision-or-task-definition rule. I won't change it to called-decision-or-task-definition-or-script as that would only grow the tech debt but rather abstract away the "one of extensions is required" rule.

@barmac
Copy link
Contributor Author

barmac commented Dec 2, 2022

So there will be two separate rule types:

  1. Extension must be present.
  2. Extension must be correctly configured.

@barmac
Copy link
Contributor Author

barmac commented Dec 5, 2022

Another idea: make it work quickly today and make it right later this week.

@barmac
Copy link
Contributor Author

barmac commented Dec 5, 2022

A sketch of implementation rule config:

const config = {
  '1.0': {
    'bpmn:ServiceTask': [ TASK_DEFINITION ]
  },
  '1.1':{
    ...config['1.0'],
    'bpmn:BusinessRuleTask': [ TASK_DEFINITION ],
    'bpmn:ScriptTask': [ TASK_DEFINITION ],
    'bpmn:SendTask': [ TASK_DEFINITION ]
  },
  '1.2': {
    ...config['1.1'],
    'bpmn:IntermediateThrowEvent': {
      'eventDefinitions': {
        'bpmn:MessageEventDefinition': [ TASK_DEFINITION ]
      }
    }
  },
  '1.3': {
    ...config['1.3'],
    'bpmn:BusinessRuleTask': [ CALLED_DECISION, TASK_DEFINITION ]
  },
  '8.0': config['1.3'],
  '8.1': config['8.0'],
  '8.2': config['8.1']
};

@barmac
Copy link
Contributor Author

barmac commented Dec 5, 2022

@philippfromme pointed out that this sketch implies we cannot have smart error messages like "zeebe:CalledDecision is only supported in Zeebe 1.3".

barmac added a commit that referenced this issue Dec 5, 2022
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Dec 5, 2022
barmac added a commit that referenced this issue Dec 5, 2022
philippfromme pushed a commit that referenced this issue Dec 5, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Dec 5, 2022
barmac added a commit that referenced this issue Dec 5, 2022
Closes #67

BREAKING CHANGES:

* Renamed `called-decision-or-task-definition` to `implementation`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant