getgroupnames function from People Functions - Plug-in (shared component) is bre

getgroupnames function from People Functions - Plug-in (shared component) is breaking if input group id list is too big. getgroupnames function returns few group names blank randomly if list of input group id is too big (e.g. > 5000). This behavior is very random i.e. one can not predict which group name will be blank in results if we call same getgroupnames function again and again.

Please look into the issue and resolve it.

OriginalPostID-190212

OriginalPostID-190212

  Discussion posts and replies are publicly visible

  • @vaibhavt Hi, there isn't any limit specified on the number of groups that can be sent to the function as input as per the documentation of the API function. But as per the knowledge I have got over the usage of API functions in the Group object category, working with massive collections aren't appreciated by functions. May I please suggest you to apply the function in an iterative fashion in terms of batches?

    Re the blank results, as far as my knowledge is considered, that shouldn't happen. Because if we go through the plugin code, it just makes use of the API function and no extra coding has been done. If you are confident enough that the group ids which you have inputted are valid, then probably Appian product team should comment on the weird behavior of API function. Else I would like to suggest you to filter out the invalid group objects initially by applying a function such as fn!doesGroupExist().

    Let's see if the Plugin creator or Appian product team comments on this behavior.
  • It sounds like you can work around this issue by batching the requests, eg doing only 1000 inputs at a time. If this is not possible, you may need to consider enhancing the plugin.
  • @Tom Ryan May I please know what do you mean by enhancing the plugin? As per my understanding, the source code in the plugin is just making use of an API function and what can we do still to enhance it? Please correct me if my understanding is wrong.
  • I am not familiar with the way this plugin works, so I cannot say whether the behavior is being caused by a limitation of the plugin or of the API. If it is indeed the API, then there may still be ways to work around this. For example, the plugin could be enhanced to internally batch requests to the API, or to validate the output to ensure there are no blank rows.
  • Thanks @sikhivahans & Tom for looking into this issue.

    @sikhivahans: I am very confident and tested that getgroupnames function returns blank results randomly (there is no fix pattern) for valid group ids. So you can also test it by providing valid input of list of group ids (>5000) to getgroupnames.

    For now, I have moved ahead with using apply function on group(id, attribute) function to achieve the desired functionality.

    It would be good if the getgroupnames plug function is fixed or this limitation documented in description or instructions for its usage.

    Thanks.
  • @vaibhavt No problem. It's good to hear that there has been a problem with massive inputs so that we can quickly skip to workaround next time without digging deep into the issue unknowingly. Next time if I get a chance, I would try to validate it once again.