cancel
Showing results for 
Search instead for 
Did you mean: 

Add organizational group programmatically

epilot
Champ in-the-making
Champ in-the-making

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 2

epilot
Champ in-the-making
Champ in-the-making

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

POST api/enterprise/admin/groups/{groupId}/members/{userId}

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...