avatarGhailene ben Marzouk

Summary

The Camunda task events notifier is a Spring Boot application project utilizing the camunda-bpm-reactor-spring-starter dependency to monitor and notify of task events (start or end of service, script, user tasks, and processes) through WebSockets to an Angular application.

Abstract

The Camunda task events notifier is a Java backend application developed with Spring Boot that employs the camunda-bpm-reactor-spring-starter library for event monitoring. The project is designed to detect when specific task events occur within a Camunda workflow, such as the initiation or completion of service tasks, script tasks, user tasks, and entire processes. Upon detection of an event, the backend application uses a WebSocket connection to send a notification to a front-end Angular application, which then displays these events to the user. The implementation includes listener classes that use the convertAndSend method from Spring's SimpMessagingTemplate to broadcast messages to a specified topic. The front-end application listens to this topic and updates the user interface with new notifications, providing a real-time feed of workflow task events. The project's codebase is publicly available on GitHub, with separate repositories for the front-end and backend components. A demonstration is provided, illustrating how the notification system informs users about completed tasks and allows them to view the history of executed tasks and processes.

Opinions

  • The author expresses confidence in the utility of the project by stating it will help notify applications of task events.
  • The project is presented as a solution that leverages the Camunda BPM Reactor and WebSocket technology for efficient event notification.
  • The inclusion of a demonstration and diagrams suggests the author believes in the importance of visual aids for understanding the project's workflow.
  • The invitation for further contact implies the author is open to collaboration or questions, indicating a positive stance on community engagement and support.
  • The mention of other Camunda-related topics at the end of the article suggests the author's interest in sharing knowledge and contributing to the Camunda community.

Camunda task events notifier

Hello today i m gonna present you a project which help to notify your application when a task event is triggred.

How does it work:

We have a backend spring application which contain a dependancy named camunda bpm reactor

<dependency>
    <groupId>org.camunda.bpm.extension.reactor</groupId>
    <artifactId>camunda-bpm-reactor-spring-starter</artifactId>
    <version>2.1.2</version>
</dependency>

This dependancy will detect the time when a :

  • service task
  • script task
  • user task
  • a process

will start or complete.

then when detecting the event we will use a websocket to send a notification to an angular application, to show the event

The project structure:

Thoses classes will contains listener which will detect when a task start or end.

an example of implementation:

Here a class which listen to a task with type : usertask

the event to detect is : an End event

we use template.convertAndSent() to send the notification message to topic

and in frontend side we will listener to the topic to read messages.

Github repo:

Demo:

Diagram:

in the process we will complete the task CheckWeather :

in the angular application we can see a new notification:

that said that process is finished and the task Weather OK also is finished

and using the notification icon, we can see the historic of the executed task and process:

Thank you for reading my article, please contact for any further information.

Other Camunda topics:

camunda task events notifier camunda genericuser task listener in camunda task marker multi-instance taskmarker loop in camunda feel language camunda how to work with dmn how to work with dmn how-to-use-embedded-task-form-in-camunda all-about-camunda-database error-handling-in-camunda sub-process-in-camunda gateways-in-camunda camunda-with-spring-boot-example task-in-camunda events-in-camunda

Notifications
Camunda
Bpmn
Recommended from ReadMedium