Expand my Community achievements bar.

How to Remove/Delete Group

Avatar

Level 7

We have a use-case where we need to create a dynamic group and add users dynamically into the group for a user assignment task.  The users are variable and determined during runtime.  We are using the following APIs to create the group and assign users.

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/org/apache/jackrabbit...

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/org/apache/jackrabbit...

 

After workflow completes, I would like to "clean up" the dynamic group.  Removing the users seems straightforward but, how do I delete the group?

 

Thanks in advance.

3 Replies

Avatar

Employee Advisor

@crich2784 

Deleting groups[0] is possible with AEM Forms JEE set-ups but doesn't seem to be the case with OSGi/jackrabbit as there is no such method for the Group interface[1] while there is one for deleting the members.

You can check further over the AEM sites community for expert advice - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/ct-p/adobe-experience-mana...

 

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-65/forms/developer-reference/programming-... 

 

[1] - https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/org/apache/jackrabbit... 

Avatar

Level 7

That is what I'm finding, too.

 

I think can I remove a Node in JCR directly but, I'm worried about any unknown side effects.  Any advice would be appreciated.  

Avatar

Employee Advisor

@crich2784 

Removing the node in JCR specific to the group is possible but not an ideal path forward but you can directly delete a group from usermanager although I am not sure if you'll find the dynamic group under useradmin created.