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.

Wednesday, April 23, 2014

BPM/SOA Identity Functions. Ex: ids:getUsersInGroup()


Identity functions in SOA/BPM.

 

 Many situations come where we would want to use identity functions is composites. Unfortunately using these functions is not as straight forward as compared to other functions.

I will be going over ids:getUsersInGroup() function as an example here.

You will have use IdentityService.xsd and is_config.xsd to create variables in BPM/SOA project.

IdentityService.xsd has many types of defined in it already. Since the function ids:getUsersInGroup() returns user's list as output. 

Create a BusinessObject based on the IdentityService.xsd and using "Users" type in it.
Create a DataObject based on the the BusinessObject created.

[Note: If it's a BPEL project, you can directly create a variable based on "Users" type in xsd. ]



Create Business Object based on the xsd as shown below.




Create a DataObject based on this BO.


Then you can use the function in a script task or any other task as shown below.





Make sure you use "Copy List" option. The default "Copy" option will not work always since the output of the function could be multiple nodes based on number of people in that specific Group.

Note: Alternatively you can use "Append" too. However, it will add one empty "user" tag at the top in the output. You can later use an XSL to remove that if necessary.


Sample Project can be downloaded from here: https://drive.google.com/folderview?id=0B-B6k-1tHlm4dUVjR3lwMmxFdkE&usp=sharing


Shoot me in the comments if you need any further help with these functions.