RemoteIdmService: methods not implemented


I have the following code, running in flowable-task:

            List<RemoteUser> users = remoteIdmService.findUsersByGroup(groupId);

which calls the following in RemoteIdmServiceImpl:

    JsonNode json = callRemoteIdmService(url + "/api/idm/groups/" + encode(groupId) + "/users", adminUser, adminPassword);

And this shows in the flowable-idm logs:

2018-09-27 07:43:17,062 [qtp1232367853-15] WARN org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/flowable-idm/api/idm/groups/mygroup/users] in DispatcherServlet with name ‘apiDispatcher’

Upon further investigation I see this isn’t implemented in flowable-ui-idm-rest ApiGroupsResource

Using flowable 6.2.1

is this a bug or am I missing something?


Tried: http://localhost:8080/flowable-idm/app/rest/admin/groups/mygroup/users

returns exception:

    <h2>HTTP ERROR 500</h2>
    <p>Problem accessing /flowable-idm/app/rest/admin/groups/mygroup/users. Reason:

        <pre>    Server Error</pre>
    <h3>Caused by:</h3>
    <pre>javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
    <h3>Caused by:</h3>

Fixed by adding following to flowable-ui-idm-rest # ApiGroupsResource:

@RequestMapping(value = "/idm/groups/{groupId}/users", method = RequestMethod.GET, produces = {"application/json"})
public List<UserRepresentation> findUsersByGroup(@PathVariable String groupId,
                                                 @RequestParam(value = "filter", required = false) String filter,
                                                 @RequestParam(value = "page", required = false) Integer page,
                                                 @RequestParam(value = "pageSize", required = false) Integer pageSize) {
    List<UserRepresentation> result = new ArrayList<>();
    List<User> users = groupService.getGroupUsers(groupId, filter, page, pageSize);
    for (User user : users) {
        result.add(new UserRepresentation(user));
    return result;

But it still doesn’t make sense that this entire group of functions is missing from remoteIdmService.

Hi. Any comments? Wondering if there is a solution or fix for this?

Hi. Looking forward to any thoughts on this.

Hey @naeem,

Yes it seems like the /idm/groups/{groupId}/users is not implemented in the IDM UI App.

The solution would be too add a GET /idm/groups/{groupId}/users in the ApiGroupsResource of the IDM UI App.

Would you like to do this contribution?