cancel
Showing results for 
Search instead for 
Did you mean: 

can not send mail at any time

whdwsl
Champ in-the-making
Champ in-the-making
i have such a business demand: 
    when a user task is created and completed , a mail should be sended . the rule is :  when a user task is created, a mail should be sended to  persons who can claim it; when a user task is completed , a mail should be sended to persons who can claim it except the one who complete it .

these two kind of mails have  different templates.  

the only way i have is use the task lisener. but it is not flexible. i want to make it to be a common way.

any one have a good way?  thanks a lot.
2 REPLIES 2

udoderk
Champ in-the-making
Champ in-the-making
i have such a business demand: 
    when a user task is created and completed , a mail should be sended . the rule is :  when a user task is created, a mail should be sended to  persons who can claim it; when a user task is completed , a mail should be sended to persons who can claim it except the one who complete it .

these two kind of mails have  different templates.  

the only way i have is use the task lisener. but it is not flexible. i want to make it to be a common way.

any one have a good way?  thanks a lot.
Hi,
that post may be helpful. (Look at thatissure too)
Or that post.
Or just that post.

The realisation of rule may be implemented using methods:
    org.activiti.engine.IdentityService.createUserQuery()
    identityService.createUserQuery().memberOfGroup(groupId);
    org.activiti.engine.impl.persistence.entity.TaskEntity.getIdentityLinks()
and org.activiti.engine.task.IdentityLinkType class

whdwsl
Champ in-the-making
Champ in-the-making
thanks udoderk, 
it seems i can only do this by creating a task listener.