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 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.
This comment has been removed by the author.
ReplyDeleteHi, does it only work with embedded LDAP groups? I can't make it work with groups from an external provider
ReplyDeleteHi There,
ReplyDeletePlease help
How do I count nodes of the Users/user output?
Regards
Naveen