Monday, April 28, 2014

Get List of Users in Application Role of BPM.


Get list of users assigned to a Application Role in BPM.

How to get list of users assigned to a Application Role?

you can use function  ids:getUsersInAppRole() to get the list of users for an application Role.
Check my previous post on how to use Identity functions.
Here is the link.

http://kvkvinod.blogspot.in/2014/04/bpmsoa-identity-functions-ex.html

 

There are different options for this function. You can get list of users for a BPMProcess role or BPMComposer role or even for soa-infra. You can see the same in the description.

Similar to my earlier post, you need to create a variable based on "Users" element from the schema and use "Copy List" to assign the output of the function to the  variable as shown in the below picture.

 

Leave a comment if you need any help with this.

7 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. you posts are very useful for me.

    now i'm doing a process to send email to the users in appRole of next human task
    as i know it should use ids:getUsersInAppRole() & ids:getUserProperty(username, "email", realm),
    how can i get it in one expression?
    the user info list example:
    userName/realName/email
    a/NAMEA/a@x.com
    b/NAMEB/b@x.com
    c/NAMEC/c@x.com

    i want the expression result like that:
    NAMEA<a@x.com>;NAMEB<b@x.com>;NAMEC<c@x.com>"

    ReplyDelete
  3. Replies
    1. There is no direct way to achieve this. You will have to use "loop" of sub-process to build the expression you are looking for.

      Delete
  4. Thanks for your suggestion very much!

    one more question: how to get the count of userDO.user, what arguments we should input to countNodes()?

    ReplyDelete
    Replies
    1. You need not even count the nodes. In the sub process Loop condition, use something like this.

      bpmn:getDataObject('UsersOutDO')/ns:UserName[bpmn:getActivityInstanceAttribute('ACT10220974806854', 'loopCounter')] != ""

      There is "loopCounter" variable under "PreDefinedVariables".. This will use take care of the loop condition.

      Delete
  5. how do i pass that list of users to adf.. as a datasource

    ReplyDelete