Hi I am trying to to add users to the Appian system groups namely &qu

Hi

I am trying to to add users to the Appian system groups namely "Document Administrators", "Portal Administrators","Application Users" through Appian Group Service API.

I checked the group details in People tab and confimed that Group type for these groups is mentioned as "Custom".

So I am using the below code to find the group using group name and adding user to it:

GroupSearch grpSearch = new GroupSearch();
grpSearch.setGroupName("Document Administrators");
grpSearch.setGroupTypeName("Custom");
Group[] grpArray111 = grpService.findGroups(grpSearch,false);
When tested, I got only zero length array returned as grpArray111. i.e the group could not be found.

When i searched some other custom groups ( not system group), i could see the group array populated with results.
Does findGroups() method not appropriate for finding System Groups?
If so, Please suggest how to find a system group from Group name?

Thanks
Jhothi
...

OriginalPostID-130331

OriginalPostID-130331

  Discussion posts and replies are publicly visible

Parents
  • I couldn't find a way to find this specific group "Document Administrators" by name. You can find others even if their names have spaces and are system groups

    GroupSearch grpSearch = new GroupSearch();
    grpSearch.setGroupName("Application Users");
    grpSearch.setOperatorGroupName(GroupSearch.Operators.EQUALS);
    ResultPage allGroupsResultPage = new ResultPage();
    allGroupsResultPage = gs.findGroupsPaging(grpSearch, false, startIndex, batchSize,
    Group.SORT_BY_GROUP_NAME, Constants.SORT_ORDER_ASCENDING);
    Group[] groups = (Group[]) allGroupsResultPage.getResults();

    or


    GroupSearch grpSearch = new GroupSearch();
    grpSearch.setGroupName("Portal*Administrators");
    grpSearch.setOperatorGroupName(GroupSearch.Operators.LIKE);
    ResultPage allGroupsResultPage = new ResultPage();
    allGroupsResultPage = gs.findGroupsPaging(grpSearch, false, startIndex, batchSize,
    Group.SORT_BY_GROUP_NAME, Constants.SORT_ORDER_ASCENDING);
    Group[] groups = (Group[]) allGroupsResultPage.getResults();
Reply
  • I couldn't find a way to find this specific group "Document Administrators" by name. You can find others even if their names have spaces and are system groups

    GroupSearch grpSearch = new GroupSearch();
    grpSearch.setGroupName("Application Users");
    grpSearch.setOperatorGroupName(GroupSearch.Operators.EQUALS);
    ResultPage allGroupsResultPage = new ResultPage();
    allGroupsResultPage = gs.findGroupsPaging(grpSearch, false, startIndex, batchSize,
    Group.SORT_BY_GROUP_NAME, Constants.SORT_ORDER_ASCENDING);
    Group[] groups = (Group[]) allGroupsResultPage.getResults();

    or


    GroupSearch grpSearch = new GroupSearch();
    grpSearch.setGroupName("Portal*Administrators");
    grpSearch.setOperatorGroupName(GroupSearch.Operators.LIKE);
    ResultPage allGroupsResultPage = new ResultPage();
    allGroupsResultPage = gs.findGroupsPaging(grpSearch, false, startIndex, batchSize,
    Group.SORT_BY_GROUP_NAME, Constants.SORT_ORDER_ASCENDING);
    Group[] groups = (Group[]) allGroupsResultPage.getResults();
Children
No Data