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

feat: support zeebe:TaskListener #67

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

misiekhardcore
Copy link
Contributor

@misiekhardcore misiekhardcore commented Nov 6, 2024

This adds support for zeebe:TaskListener contained in zeebe:TaskListeners container.

related to camunda/camunda-modeler#4590

@barmac
Copy link
Collaborator

barmac commented Nov 6, 2024

Please have a look closely at the XML example from camunda/camunda-modeler#4590 (comment)
We need the element names to exactly match the XML so that the engine can understand it. Note that this project (zeebe-bpmn-moddle) is only used on the frontend while the engine parses BPMN with its own BPMN model.

   <zeebe:taskListeners>
     <zeebe:taskListener eventType="create" type="create_listener" retries="2"/>
     <zeebe:taskListener eventType="assignment" type="assignment_listener"/>
     <zeebe:taskListener eventType="update" type="update_listener" retries="8"/>
     <zeebe:taskListener eventType="complete" type="complete_listener"/>
   </zeebe:taskListeners>

@misiekhardcore misiekhardcore changed the title feat: support zeebe:UserTaskListener feat: support zeebe:TaskListener Nov 6, 2024
@misiekhardcore
Copy link
Contributor Author

@barmac I see 👍🏽 I was mislead by the issue name and blindly followed User task listener

@misiekhardcore misiekhardcore marked this pull request as ready for review November 6, 2024 10:05
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Nov 6, 2024
@misiekhardcore misiekhardcore requested review from a team and philippfromme and removed request for a team November 7, 2024 16:11
Copy link
Collaborator

@barmac barmac left a comment

Choose a reason for hiding this comment

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

A few last steps before we merge this.

test/fixtures/xml/zeebe-taskListeners.bpmn Outdated Show resolved Hide resolved
test/fixtures/xml/zeebe-taskListeners.bpmn Outdated Show resolved Hide resolved
@@ -0,0 +1,11 @@
<bpmn:task
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's make this match the expectations. We want the task listeners to be allowed in bpmn:userTask only.

Copy link
Collaborator

Choose a reason for hiding this comment

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

BTW how come the test is passing if we read a task here and check for user task as the type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it passes for bpmn:userTask and bpmn:task but does not for bpmn:endEvent for example 🤔

@barmac
Copy link
Collaborator

barmac commented Nov 7, 2024

Feel free to merge this PR once you're done.

@misiekhardcore misiekhardcore merged commit 6855cd4 into main Nov 7, 2024
3 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 7, 2024
@misiekhardcore misiekhardcore deleted the user-task-listener branch November 7, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants