diff --git a/rules/camunda-cloud/task-listener.js b/rules/camunda-cloud/task-listener.js
index 6fa2fd0..e04bd32 100644
--- a/rules/camunda-cloud/task-listener.js
+++ b/rules/camunda-cloud/task-listener.js
@@ -2,8 +2,7 @@ const { is } = require('bpmnlint-utils');
const {
findExtensionElement,
- hasProperties,
- hasExtensionElement
+ hasProperties
} = require('../utils/element');
const { reportErrors } = require('../utils/reporter');
@@ -23,14 +22,8 @@ module.exports = skipInNonExecutableProcess(function() {
return;
}
- let errors = hasExtensionElement(node, 'zeebe:UserTask');
-
- if (errors && errors.length) {
- reportErrors(node, reporter, errors);
- }
-
const listeners = taskListeners.get('listeners');
- errors = listeners.flatMap(listener => hasProperties(listener, {
+ const errors = listeners.flatMap(listener => hasProperties(listener, {
type: {
required: true
}
diff --git a/test/camunda-cloud/task-listener.spec.js b/test/camunda-cloud/task-listener.spec.js
index be1b7e3..5eea42f 100644
--- a/test/camunda-cloud/task-listener.spec.js
+++ b/test/camunda-cloud/task-listener.spec.js
@@ -34,35 +34,6 @@ const valid = [
];
const invalid = [
- {
- name: 'task listener not in zeebe:UserTask',
- config: { version: '8.7' },
- moddleElement: createModdle(createProcess(`
-
-
-
-
-
-
-
- `)),
- report: {
- id: 'UserTask_1',
- message: 'Element of type must have one extension element of type ',
- path: [
- 'rootElements',
- 0,
- 'flowElements',
- 0
- ],
- data: {
- type: ERROR_TYPES.EXTENSION_ELEMENT_REQUIRED,
- node: 'UserTask_1',
- parentNode: null,
- requiredExtensionElement: 'zeebe:UserTask'
- }
- }
- },
{
name: 'task listener with empty type',
config: { version: '8.7' },