Add organizational group programmatically

cancel
Showing results for 
Search instead for 
Did you mean: 
epilot
Member II

Add organizational group programmatically

Hello,

I am attempting to programmatically add an existing organizational group to a new user in Alfresco Process Services 1.9.

I see there is a REST endpoint for adding a capability group to a user but I have had no luck adding an organizational group to a user either at creation time or through the user update API.

How can I accomplish this goal?

2 Replies
epilot
Member II

Re: Add organizational group programmatically

Turns out this endpoint works for both organizational group and capability groups

POST api/enterprise/admin/groups/{groupId}/members/{userId}
mdtabrezmca
Established Member II

Re: Add organizational group programmatically

Hello Ethan,

   You can use Execution lisntner, Task listner, or Event Listner based on your requirment for this please refer the example. In this example when any  task is bieng created a group will be involved for the created task.

activiti-examples/aps-task-watchlist-extension at master · cijujoseph/activiti-examples · GitHub 

Hope this is helpfull.

Please setup the extention project for the above using

https://community.alfresco.com/community/bpm/blog/2016/11/16/activiti-enterprise-developer-series-pr...