Open Editions

Open Editions

Come for answers. Stay for best practices. All we’re missing is you.


#Data
#Businessautomation
#Data
 View Only

Event Listeners in BAMOE 9.4.0: Configuring Task NotificationListener for User Tasks

By Abhijit Humbe posted Wed May 13, 2026 03:41 AM

  

In business process automation, timely task handling is critical. BAMOE 9.4.0 provides built-in support for event-driven task notifications using Task NotificationListener, enabling systems to react when user tasks are delayed or unattended.

This blog walks through a practical Hiring Process example that demonstrates how to configure email notifications for user tasks using deadlines and event triggers.

Overview of the Hiring Process

The sample workflow models a simple hiring pipeline with two sequential user tasks:

  • HR Interview
  • IT Interview

Each task is configured with:

  • Notification events (e.g., NotStarted, NotCompleted)
  • Email notification details

The process begins with a hiring request and ends with either:

  • Application Approved, or
  • Application Denied

This is how BPMN workflow will look like

image

HR Interview (User Task) configuration:


The HR Interview is the first evaluation stage.

Key Configuration:
  • Event Type: NotStarted
  • Deadline: 1 minute (PT1M)
  • Trigger Behavior:  If the task is not started within 1 minute, a notification email is sent.
Email Configuration:
  • Event Type : Notstarted
  • Delay : PT1M
  • from : HRadmin@domain.com
  • toEmail : HRteam@domain.com
  • Subject : Action Needed for HR Interview task
  • Email body : Dear user, This is a reminder that the HR Interview task is now pending your action. Please review the task details and complete the required steps at your earliest convenience.
To configure Notification select  HR Interview UserTask and goto properties section and define Email notification details like this:
image

 

IT Interview (User Task)

If the candidate passes HR, the process proceeds to the IT Interview userTask.

Key Configuration:
  • Event Type: NotCompleted
  • Deadline: 5 minutes (PT5M)
  • Trigger Behavior: If the task is not completed within 5 minutes, a notification email is triggered.
Email Configuration:
  • Event Type : NotCompleted
  • Delay : PT5M
  • from :ITadmin@domain.com
  • toEmail : ITteam@domain.com
  • Subject : Action Needed for IT Interview task
  • Email body : Dear user, This is a reminder that the IT Interview task is now pending your action. Please review the task details and complete the required steps at your earliest convenience.
To configure Notification select  IT Interview UserTask and goto properties section and define Email notification details like this:
image

How Task Notifications Work in BAMOE

In BAMOE 9.4.0, task notifications are defined directly in the BPMN model using notification property of UserTask.

Each notification includes:

  • Triggering event (NotStarted, NotCompleted)
  • Delay duration
  • Sender and recipients
  • Email subject and body

When a deadline is reached:

  1. A deadline event is generated
  2. The event is published to a messaging system (Kafka)
  3. The application consumes the event
  4. Email notification is triggered

Email Configuration (Quarkus Mailer)

BAMOE uses the Quarkus Mailer extension to send emails.

Mail Server Configuration:

quarkus.mailer.host=localhost
quarkus.mailer.port=1025
quarkus.mailer.from=testuser@kogito.com
quarkus.mailer.auth=false
quarkus.mailer.start-tls=DISABLED

For local testing, tools like MailHog can be used to capture emails.

Kafka Integration for Deadline Events

Task deadlines rely on Kafka for event propagation.

  • Deadline events are published to a Kafka topic (e.g., kogito-deadline-events)
  • The application consumes these events
  • Notifications are triggered based on event data
kafka Configuration:

mp.messaging.outgoing.kogito-deadline-events.connector=smallrye-kafka
mp.messaging.outgoing.kogito-deadline-events.topic=kogito-deadline-events
mp.messaging.incoming.kogito-deadline-consumer.connector=smallrye-kafka
mp.messaging.incoming.kogito-deadline-consumer.topic=kogito-deadline-events

Required Dependencies

Add the following dependencies to enable notifications:

<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-addons-quarkus-mail</artifactId>
</dependency>

<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-addons-quarkus-task-notification</artifactId>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-messaging-kafka</artifactId>

If `HR_Interview` task is not claimed  in 1 min, notification email will be send:

INFO [org.kie.kog.mai.QuarkusMailSender] (vert.x-worker-thread-1) Sending e-mail MailInfo [to=[HRteam@domain.com], from=adminHR@domain.com, subject=Action Needed to HRInterview task, replyTo=null, body=Dear User, This is a reminder that the HRInterview task is now pending your action. Please review the task details and complete the required steps at your earliest convenience.]
INFO [org.kie.kog.mai.QuarkusMailSender] (vert.x-eventloop-thread-3) Mail sent

If `IT_Interview` task is not claimed and completed in 5 min, notification email will be send:

INFO [org.kie.kog.mai.QuarkusMailSender] (vert.x-worker-thread-1) Sending e-mail MailInfo [to=[ITteam@gmail.com], from=ITadmin@kogito.com, subject=Action Needed for IT Interview task, replyTo=null, body=Dear user, This is a reminder that the IT Interview task is now pending your action. Please review the task details and complete the required steps at your earliest convenience.]

INFO [org.kie.kog.mai.QuarkusMailSender] (vert.x-eventloop-thread-3) Mail sent

0 comments
13 views

Permalink