Workflow Examples of using a Group Approver

Does anyone have an example of using a IG Group as an approver in a approval step in a workflow?   We are trying to use Entity.get with a group, and it always fails to evaluate, or it returns null.  Not sure if we are using it correctly.   There are several examples of using Entity.get to return the supervisor of a user:

Entity.get('user', recipient, 'supervisor')

Has anyone seen or used Entity.get to return a group type object, or rather, all its members to assign to a approval.   We are using the Group Approval type, since that supports multiple DNs.

Entity.get('group', '49', 'members')    <-  I'm getting a group object, its groupId is 49 in IG, and I want the members list back, to assign each as the assignee.

However, this fails.   I've tried a number of things. Am I using the wrong groupID (should it be uniqueGroupId?)   

The docs on this are a little vague, I'd love to see an example if there is one floating about.

-Jim 

Parents
  • Suggested Answer

    0  

    For us the following call worked to get a multi-value attribute from a user (attributename = ext_ipgIGReviews). We also got the supervisor back (don't know why)

    JSON.stringify(Entity.getObject('user', flowdata.get('review/userId'), ['ext_ipgIGReviews'])) ->

    We used this call in a log activity. So, we had to use "Entity.getObject" and put the attribute in " [ ] "

    BR

    Tobias

    EDIT:
    For information only. The response is then an array and has a JSON entry.
    If you only want the JSON, an "(Entity.getObject('user', flowdata.get('review/userId'), ['ext_ipgIGReviews'])[0]" was enough for us

  • 0   in reply to   

    Hrm, I still can't for the life of me assign an IG group as an approver in Group Approval mode or normal. I've tried the group ID's, I've tried using the Entity.getObject call (which I can confirm returns stuff), and thrown it into JSON.  

    --Jim

Reply Children
  • 0   in reply to   

    Ahhhhhhhhh, I've realized that when you assign a group as an assignee on a approval activity, it uses the group ID from source as the 'full name' of the approver, and the db column to store that is only 32 chars, so if you group id is too big, it fails.   When I shrink my group id's, its all good! Slight smile