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
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.
Sample Project can be downloaded from here: https://drive.google.com/folderview?id=0B-B6k-1tHlm4dUVjR3lwMmxFdkE&usp=sharing
Leave a comment if you need any help with this.
This comment has been removed by the author.
ReplyDeleteyou posts are very useful for me.
ReplyDeletenow 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>"
is there any way to do that?
ReplyDeleteThere is no direct way to achieve this. You will have to use "loop" of sub-process to build the expression you are looking for.
DeleteThanks for your suggestion very much!
ReplyDeleteone more question: how to get the count of userDO.user, what arguments we should input to countNodes()?
You need not even count the nodes. In the sub process Loop condition, use something like this.
Deletebpmn:getDataObject('UsersOutDO')/ns:UserName[bpmn:getActivityInstanceAttribute('ACT10220974806854', 'loopCounter')] != ""
There is "loopCounter" variable under "PreDefinedVariables".. This will use take care of the loop condition.
how do i pass that list of users to adf.. as a datasource
ReplyDelete