Monday, November 9, 2015

IBM BPM - How to find a group membership of dynamic group(type 4 groups)


We stuck in situation once where dynamic group was locking everything and no users can log into the portal. We struggled to get details about dynamic groups, like what all is included in dynamic groups, we were especially interested in which all LDAP groups were part of that dynamic groups.

By following the below steps you can get details about Dynamic groups or which all groups are added in dynamic groups.

First you need to have name of the dynamic groups. Mostly dynamic group name will be something like 'Filtered set of users' so in our example lets take same name.

Step 1.) 
select * FROM LSW_DYNAMIC_GROUP where NAME like 'Filtered set of users'

take dynamic_group_id from there and use it in below query.

Step 2.)
select * from LSW_DYNAMIC_GROUP_CONSTRAINT where DYNAMIC_GROUP_ID=<Group_ID>

Here you may find one or more rows depending on creation of your dynamic group. if it is only created with users, there will be list of users in Value and you can use that.
If PG is being used as part of dynamic group you will get a row with value in Library_element_type = 24. here Library Element type is same as PO_type in lsw_po_versions and details for other type can be found using below blog entry I wrote earlier,

http://randombpmsolutions.blogspot.co.uk/2015/08/ibm-bpm-855-po-types-table-bpm-db-part.html

Step 3.)
You can get table name based on Library_element_type and then find details in perticular table. In our case for type 24 we can check below table

select * from LSW_PARTICIPANT where PARTICIPANT_ID='<LIBRARY_ELEMENT_ID>'

and from here you can go to LSW_PARTICIPANT_GROUP table to get group_ID

select GROUP_ID from LSW_PARTICIPANT_GROUP where PARTICIPANT_ID='<LIBRARY_ELEMENT_ID>'

Step 4.)
once you have group ID, you can put it in below query to get LDAP or internal groups used in dynamic group.

select gg.*, g.GROUP_NAME from LSW_GRP_GRP_MEM_XREF gg, LSW_USR_GRP_XREF g where gg.GROUP_ID=g.GROUP_ID and gg.CONTAINER_GROUP_ID=<GROUP_ID>


IF you have more then one entry of type 24 or any other in LSW_DYNAMIC_GROUP_CONSTRAINT then you can repeat step 3 and 4 to get all details

Monday, November 2, 2015

IBM BPM - Deactivating Dynamic Group(type 4) Update - Performance improvement specially while login

What are Dynamic Groups?
Dynamic groups are created whenever a team or a task assignment is created using an expression. These expressions select users based on user attributes, group membership, and various other criteria. As a result, a dynamic group is created in the database. They are also known as Type 4 groups or in LSW_USR_GRP_XREF they will be having value of group_type = 4

Why Dynamic Groups get updated?
As mentioned earlier Dynamic Groups are set of other type of groups which includes external groups. so whenever any external or security gets updated, dynamic group also needs to get updated in order to be in sync with other groups.

When are dynamic groups updated?

There are several triggers that can cause dynamic group updates:
  • When IBM Business Process Manager internal groups or a member of an internal group are updated in the Process Admin Console.
  • When a user logs in to a IBM Business Process Manager web interface, the external group membership is replicated based on the external security provider settings. If changes are detected, dynamic groups are recalculated.
  • When a user updates user attributes in the Process Admin Console or while using a REST API.
  • During task creation using dynamic group expression.

Configuring IBM Business Process Manager to deactivate dynamic group updates

Modify the 100Custom.xml configuration file to deactivate updates for the specified triggers, as shown in the following example:

<properties>
<server merge="mergeChildren">
<update-dynamic-groups-on-login>false</update-dynamic-groups-on-login>
<update-dynamic-groups-on-task-creation>false</update-dynamic-groups-on-task-creation>
<update-dynamic-groups-on-uadchange>false</update-dynamic-groups-on-uadchange>
</server>
</properties>