Reputation: 430
I am trying to send mail to all user in a group on task assignment(in below example to the group - service). I am using the task listener but when the task is assigned by flow execution no mail is triggered to any members of the group neither the notify method in tasklistner is executed. But when the assignment is manually done to any user then the send mail code in task listener is triggered. Moreover if any user claims the task then also the mail code is triggered. Its is not getting triggered when assigned as a part of flow execution I am using embeded forms and i deploy a war file containing the bpmn The xml in bpmn is :
<bpmn:userTask id="serviceusertask"
camunda:formKey="embedded:app:forms/task-service.html" name="Service"
camunda:candidateGroups="service">
<bpmn:extensionElements>
<camunda:taskListener
class="com.test.project.TaskAssignmentListener" event="assignment" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0ug32e1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0w763dv</bpmn:outgoing>
</bpmn:userTask>
Can anyone help me to overcome this
Thanks
Upvotes: 0
Views: 540
Reputation: 11993
The "assignee" of a task is the user who is actual working in the task. This is known as "claim". So yes, the assignment-TaskListener
When you set a candidateGroup to route a task to a group of users, this is not handled by a special lifecycle event.
You can use the "#create" event to get notify when the task is created and use that to send the email.
Upvotes: 1