How to configure notification for Human Task in jBPM

jBPM provides options to configure notification emails to be send to any user if the human task is not started or not completed.

We will start with configuring JavaMail sessions via JNDI so that infrastructure for mail is handled.

We would be using “jbpm-server-7.37.0.Final-dist” version for this example.

Configure Mail Session in wildfly

In the standalone configuration for jBPM we need add below configurations.

Configure Socket binding for smtp-port

        <outbound-socket-binding name="mail-notification-smtp">
            <remote-destination host="" port="465"/>

host -: host name of SMTP server

port -: port no of SMTP server.

Configure Mail-Session in Mail subsystem

            <mail-session name="notification" jndi-name="java:/notificationMailSession" from="">
                <smtp-server outbound-socket-binding-ref="mail-notification-smtp" ssl="true" username="" password="yourPassw0rd"/>

from -: From address for your emails (Valid email account on SMTP server).

username -: username for the email account

password -: password for the email account.

Add below system property to standalone.xml file.

       <property name="org.kie.mail.session" value="java:/notificationMailSession"/>

Configure user info for Human task

Next step would be to configure email info for users used by the human task. You will have to create file named “” with below content at location “kie-server.war/WEB-INF/classes”.\:en-UK\:john[john]

You can enter email details for all users in the above file. Make sure the Administrator user is present in the file.

Configuring Notification for Human task in process definition

Final step would be configure notifications for human task in a process definition. Follow below steps for that.

  1. In buisness-central click on human task for which notification needs to configured.

2. Select “Edit” notifications from the property section in right hand side.

3. Click on “Add” button to add new notification.

4. jBPM allows you to configure 2 types of notifications -: Not Started and Not Completed.

5. Select the type of Notification to be configured by clicking on “Not Started” or “Not Completed” radio button.

6. You can configure Notification time using 3 options

a) Time Period -: You can specify period after which notification would be send in minutes, hours, days, months, years. This also provides repeat option as well.

b) Date -: You can pass actual date along with time zone.

c) Expression -: You pass time in ISO 8601 expressions syntax as well.

7. In Message section you can select.

from -: User from whom notification would be send. You can select only one user

to -: Users or Groups to whom notification will be send. You can select multiple users or groups.

Please ensure the users email info is present file.

You can then enter email Subject and email Body to be send as part notification.

8. You can add multiple notification by clicking on Add button.

9. Save the file, then build and deploy the project.

10. Since we configured “Not Started” type of notification with time period 1 min. If the human task is not started with in 1 min of process start then a notification email would be triggered.

If you are getting below error when notification is triggered cross check if your username and password is correct. Also in case of gmail check if you enabled Less secure app access in account settings if you are testing in your local.

22:36:00,603 ERROR [] (EJB default - 3) Unable to send email notification due to 535-5.7.8 Username and Password not accepted. Learn more at

You can refer to for more details on EmailNotificationListener class.

Refer my blog for configuring user info in DB for sending notification.

Published by


Seeking for Ultimate Freedom

23 thoughts on “How to configure notification for Human Task in jBPM”

    1. Hi Ravi,

      Check out the blog “” for using ExecuteSQL service task in jBPM.


  1. thank you for the information.
    Concerning this: “Please ensure the users email info is present file.”
    What about when there are Groups? What about when there are 10’s of users or tens of different processes with as many x times users assigned to HT?
    What about SSO and users coming from other repos?
    Add each manually to the file? In 2020? Did I misunderstand? This solution makes jbpm a very isolated system


    1. file is default implementation ( available to map user information to email id’s. If you want to use out of box user implementation then additional implementation like LDAP or DB based available at “” can be used.


  2. Where is the location for “kie-server.war/WEB-INF/classes”.?
    And how to get the user info from an external system? Writing by hand all users in a file that are in jBPM seems a bit too much work prone to errors


    1. If you are using jbpm Final-dist then kie-server.war would found at “/standalone/deployments” directory. Users can be configured in any external system for authentication and authorization by default you will have to userinfo is configured using “ file” for mapping email ids . If you want to use out of box user implementation then additional implementation like LDAP or DB based available at “” can be used.

      Liked by 1 person

      1. /standalone/deployments” directory only has war files as it is to be expected but the mentioned above kie-server.war/WEB-INF/classes”. is a directory, not a file.


      2. kie-server.war is present at the location “/standalone/deployments”. Once you extract or unpack this WAR file then inside “kie-server.war/WEB-INF/classes” directory you have create a file named “” and add all email information to this file as suggested.


  3. Hi.
    thank you for the reply.
    unfortunately, wildfly takes care of the expanding the war in the docker image. Although I am guessing the behaviour is the same for any wildfly instalation, so the folder is not there.
    It is under standalone/tmp
    however, adding the file there, produces that error ’email not found for user …”


    1. Are you running jBPM in docker? Could you confirm which docker image are you using?

      Could you run below command y replacing the image name with image that you are using ?

      “docker run -t -i -p 8080:8080 -p 8001:8001 jboss/jbpm-server-full:latest /bin/bash”

      Then share a snapshot of files present in below location “opt/jboss/wildfly/standalone/deployments”.


      1. Are you using custom image or is it available in docker hub. If it’s available in docker hub then Don’t add the image, just run below command in you docker client and share the out put. Also just mention the image id.


  4. I meant snapshot, that is a screenshot of the ls -la command
    We are using the same image (full) v7.41
    The files under deployments are the 3 usual wars: business-central.war jbpm-casemgmt.war and kire-server.war


    1. If you get the latest *final delivery of jbpm and start it normally, you get the same results as in the docker container. That is, deployment folder with 3 war files as mentioned tmp folder with the expanded expanded wars.


      1. Don’t add the file to tmp folder it won’t work. You will have to add the file to “opt/jboss/wildfly/standalone/deployments/kie-server.war/WEB-INF/classes” directory.

        If the kie-server.war file available in deployment folder is not in expanded form then extract it,
        jar -xvf kie-server.war
        add the file to “kie-server.war/WEB-INF/classes” directory.
        jar -cvf kie-server.war kie-server
        Then repackage the “kie-server.war”

        Create a custom image using this repackaged war and run it on docker


  5. Hello Sudhish and thanks for your post ; it’s very helpfull 🙂
    I’m workging for a school and I’d like to install jbpm in it .. but first I make some tests 🙂
    So I tried your solution but I’ve an error when the notification would have to be sent :

    17:11:46,662 WARN [] (default task-9) Unable to find form to render for process ‘EnvoiMail’
    17:11:48,452 WARNING [javax.mail] (default task-9) expected resource not found: /META-INF/
    17:12:09,678 WARN [] (default task-10) Unable to find form to render for task ‘Test envoi mail’ on process ‘EnvoiMail’
    17:12:48,501 INFO [] (EJB default – 1) Missing mail session or userinfo – skipping email notification listener processing

    Maybe this is my file that is not read .. ? I put it my /web-inf(classes directory a made a new kie-server.war file.
    But I realized that there’s already a file in that directory. Do yout think I should use that file instead ?
    Per advance, thanks for your help 🙂


    1. is used if you are storing user information (email details) in a database. I have written a separate blog for that use case

      But if you are default implementation for users and groups (application-users and application-roles files) then you will have to add file with email details for the user.

      I suspect issue is with your mail session configuration. Can you cross check if you followed all steps mentioned in the blog?

      17:11:48,452 WARNING [javax.mail] (default task-9) expected resource not found: /META-INF/

      Also it would be helpful if you enable debug logs for the package “”. Below log statement will give you clear idea whether issue is user info or mail session.

      logger.debug(“User info implementation {} and mail session {}”, userInfo, mailSession);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s