1

In JBPM is possible to resend a notifications after a reassign operation?

Example:

This is an example of my process

1

The Task Evolution is configured to send a notification to the potential owners.

If the task is not processed administrator user can reassign the task to a new group.

Here is an example of the notification configuration

2

My goal is that the notifications is sent to the new group.

How can I do?

vimuth
  • 5,064
  • 33
  • 79
  • 116

1 Answers1

1

You can create new notification using kie-server REST API:

POST /server/admin/containers/{containerId}/tasks/{taskInstanceId}/notifications

You can define user/group details to which email can be send in the request payload:

{
  "from" : "test@jbpm.org",
  "reply-to" : "no-reply@jbpm.org",
  "users" : [ "john" ],
  "emails" : [ "emails@jbpm.org" ],
  "groups" : null,
  "subject" : "reminder",
  "body" : "my test content"
}
Abhijit Humbe
  • 1,563
  • 1
  • 12
  • 13
  • Yes, this is a possible solution but in this case I should call 2 services (notification and reassignment). Is there a possibility of capturing the reassignment event? – Francesco Motta Aug 30 '22 at 07:53
  • You can use taskReassignmentEvent from TaskEventListener https://github.com/kiegroup/droolsjbpm-knowledge/blob/7.x/kie-api/src/main/java/org/kie/api/task/TaskLifeCycleEventListener.java#L70 – Abhijit Humbe Aug 31 '22 at 05:39