06-12-2018 07:29 AM
Hi all,
I am doing a small POC in which I would be a fetching all the user's present in a particular group and sending a mail to all of them with a custom link as shown below:
localhost:8080/customCall/user/{userid}
where userid would be each user in the group. My mailing task is working for a single mail. Can you guys please shed some light on it. Hoping to hear from you soon.
P.S. I am using activiti-app, activiti-rest v6.0
06-14-2018 11:14 AM
Assuming you want to do this as a step in your process, I'd suggest just creating a service task to send the emails. You can get the users in a group with the UserQuery class.
UserQuery query = identityService.createUserQuery().memberOfGroup("yourgroupid");
List<User> users = query.list();
Just iterate over the List and send an email for each user.
06-14-2018 11:56 AM
Hi Jeff,
I want to do this without using the API in my Java application, is it possible to solely use activiti-app or activiti-rest for this purpose?
06-14-2018 12:12 PM
I'm a little unclear what you're asking. Can you explain how you're using activiti in your POC and where and when you want to send your emails?
06-14-2018 12:41 PM
I have deployed activiti-app.war, activiti-rest.war in apache tomcat and running it as a standalone application.
06-14-2018 12:48 PM
And you're using it to do what?
06-14-2018 12:54 PM
I am trying to initiate a normal workflow where a mail would be send to all the people in a particular group and the person can approve or reject the task directly from the mail. I have configured MySQL as the backend.
06-14-2018 01:06 PM
For that, you might look at this post How to design a process with a dynamic number of sub process tasks? or this one How to design a parallel group review workflow using Alfresco Activiti KickStart Designer App? As mentioned, use a user task and set the assignees based on the users in your group.
As far as approving/rejecting the task via an email, you might look at Ciju Joseph's Email extension activiti-examples/aps-email-listener-extension at master · cijujoseph/activiti-examples · GitHub. I'd guess that should help do what you want.
Explore our Alfresco products with the links below. Use labels to filter content by product module.