Wednesday, April 20, 2016

Ad-hoc groups in IBM BPM - when it will be deleted

Ad hoc group - If a team calculates its members using a service, the service returns a set of users and groups. This list of users and groups is then persisted as a reusable entry in the database. Ad hoc groups are immutable. Ad hoc groups can also be created by using a list of users or a list of groups

in IBM BPM Ad-hoc groups are getting created when we use routing option 'List of Users'

this ad hoc groups are temporary in nature and continue to exist until they have at least one available instance.

Ad hoc group will be deleted when all the task related to ad-hoc groups are deleted or reassigned.

Wednesday, March 23, 2016

IBM BPM Task status codes

Below are the Task Status Codes for IBM BPM 

It is mentioned in PS database lsw_task_status_codes table. This is just for ref.



STATUS_ID NAME STATUS_VALUE
1 New 11
2 Received 12
3 Replied 13
4 Forwarded 14
5 Sent 21
6 Actioned 31
7 Closed 32
8 Special 41
9 Deleted 91
10 Alert 61
11 Help_Request 62
12 Comment 63
13 Answered_Help_Request 65
14 Ignored_Help_Request 66
15 Followed 70
16 Tagged 71
17 Collaboration 72

Tuesday, February 2, 2016

Ad-hoc Group containing list of groups - DO NOT USE

in IBM BPM Routing if we select 'list of users routing assignment where we can provide a string array which should have list of users.

though it is possible to provide the Groups/Roles directly in this list of users using 'Role:<role_name>', it is not recommended to use groups/roles in list of users.

I have tried the same and it worked. 


To be honest,  I was amazed this worked at all. AFAIK routing to a custom list of groups is not supported. As the name says, the routing is "List of users", which is a fairly explicit name. 

One of team in our organization has used this and it was working for more than a year(which is surprising) . Another team has also used same thing last week and all the list of groups/roles are being stuffed in same ad-hoc group and both team started facing issue.


If I had to do this, I would actually create a service that got the list of users on each group (there is an API for that) and then created a list of users by merging them.

Prior to the fix your solution was likely "working" because dynamic groups were never reused, so whatever code path you were leveraging was simly creating a new dynamic group every single time, even if it was an exact copy of another group.



Tuesday, January 19, 2016

Deactivate the default snapshot for IBM BPM Process App

In IBM BPM, we can deactivate snapshots from ProcessAdmin Console. But if we try to deactivate the snapshot for any process app which is Default then product will not allow it and will give message as below.

This is the default version of this application, and cannot be deactivated.

Still, If you really want to deactivate the default snapshot for any Process App, It can be done using wsadmin BPMDeactivate command with -force option.

For Example -
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython

wsadmin>AdminTask.BPMDeactivate('[-containerAcronym BILLDISP -containerSnapshotAcronym SS2.0.1 -containerTrackAcronym Main -force]')

Below is the details about BPMDeactivate command. More details can be found at IBM Knowledge Center.

BPMDeactivate command

Syntax
BPMDeactivate 
-containerAcronym process_application_or_toolkit_acronym
-containerSnapshotAcronym snapshot_acronym
-containerTrackAcronym track_acronym
[-force]
[-suspendAllBPDInstances]
[-outputFile file_path]

Parameters

-containerAcronym String
A required parameter that identifies the process application (Process Server and Process Center) or toolkit acronym (Process Center only). For example, the BillingDispute process application might have an acronym of BILLDISP.
-containerTrackAcronym String
An optional parameter that identifies the track associated with the process application or toolkit. The default value is Main.
-containerSnapshotAcronym String
A required parameter that identifies the process application (Process Server and Process Center) or toolkit snapshot acronym (Process Center only).
Tip: You can find the process application acronym on the snapshot page in Process Center or by using the BPMShowProcessApplication command.
-force
An optional parameter that deactivates the default snapshot of the process application or toolkit. Default snapshots are not deactivated unless you include this parameter.
-suspendAllBPDInstances
An optional parameter that suspends all instances associated with the given context instead of letting them continue to run. The instances remain suspended until you resume them.
Restriction: This parameter is not supported when Tip is used as the value for the -containerSnapshotAcronym parameter.
-outputFile file_path
An optional parameter that specifies the file path to write the log messages that result from running the command. The path to the file can be absolute or relative but the directory structure must already exist. If you do not provide this parameter, the message are written to the SystemOut.log file.


For more details, follow below.
http://www-01.ibm.com/support/knowledgecenter/SSFTDH_8.5.6/com.ibm.wbpm.ref.doc/topics/rref_deactivateprocessapplication.html



Wednesday, December 2, 2015

Limiting Inbox search result for IBM BPM

sometimes if we have lots of instances assigned to a user or usergroup then refreshing inbox for user become very slow as IBM BPM tries to get details about all cases and it might take upto 10 minutes.

This performance issues is due to large number of cases so there are only two solutions,
1.) close the cases and keep only required cases open and available, which does not work in all scenarios
2.) limit the number of instances fetched by a saved search/inbox in IBM BPM Portal. which can be done by below steps.

-> In newer version this value is by default set to 500 which is good and you might need to make it higher if you want to see more instances in result.

Optimize the number of loaded search result entries

You can optimize the number of retrieved results entries of your saved searches.
The saved searches are optimized to process 500 result entries. The displayed pages of the result contains up to 500 entries, which are retrieved from the server. In addition, the total number of entries is displayed.
If you expect more than 500 records for a call, for example, if you are using the TWSearch function or the saved search in an API format, you can increase this number.
To retrieve a different number of entries, complete the following steps:
  1. Insert the following section into the 100custom.xml file:
    <properties>
        <server merge="mergeChildren">
      <process-search-engine-count-optimization merge="replace">500</process-search-engine-count-optimization>
           </server>
    </properties>
  2. Adjust the 500 value to meet your needs. The larger the value, the more memory and time is needed to retrieve the entries.
  3. After saving changes to the 100custom.xml file, restart the server.


You can find more details about his in blow tech-note by IBM

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>