Wednesday, May 18, 2016

Deleting a toolkit snapshot in IBM BPM Environment - 7.5.1.2+


We can delete a toolkit snapshot using BPMDeleteSnapshot command in IBM BPM 7.5.1.2+ environments. First we need to check if all the required IFixes are installed for these commands. that can be checked by following below post.
http://randombpmsolutions.blogspot.co.uk/2016/08/bpmdeletesnapshot-and.html

Toolkits can have dependencies on process app or another toolkit.The toolkits cannot be deleted while those dependencies exist. To delete toolkits, complete the following steps:

  • Deactivate the toolkit snapshot of the dependency with the BPMDeactivate command.
  • Stop the toolkit snapshot with the BPMStop command.
  • Get a list of toolkits and process applications that have dependencies on the toolkit snapshot with the following command: BPMShowSnapshot -showDependents snapshot_name.
  • Starting with the root of the list of reported dependencies, remove each dependency. For each dependency that you want to remove, delete the snapshot of the toolkit or process application.
  • After you resolve all of the dependencies, delete the snapshot with the BPMDeleteSnapshot command.
Below DB query gives the details about all toolkits which does not have nay dependency on and processApp or another Toolkit which makes it a candidate to be deleted.


select  p.SHORT_NAME, s.NAME, s.CREATED_ON from LSW_SNAPSHOT s, LSW_PROJECT p where s.PROJECT_ID = p.PROJECT_ID and

s.SNAPSHOT_ID not in (select d.TARGET_SNAPSHOT_ID from LSW_SNAPSHOT s, LSW_PROJECT_DEPENDENCY d, LSW_PROJECT p  where s.SNAPSHOT_ID = d.TARGET_SNAPSHOT_ID and p.PROJECT_ID = s.PROJECT_ID group by d.TARGET_SNAPSHOT_ID)
and p.IS_TOOLKIT = 'T'


Below DB query gives the list of toolkits having dependency with number of dependent ProcessAll/Toolkit snapshot. this query can be used while selecting the toolkits which can be deleted easily.

select p.SHORT_NAME, s.NAME,d.TARGET_SNAPSHOT_ID, count(d.PROJECT_DEPENDENCY_ID) as dependancy from LSW_SNAPSHOT s, LSW_PROJECT_DEPENDENCY d, LSW_PROJECT p  where s.SNAPSHOT_ID = d.TARGET_SNAPSHOT_ID and p.PROJECT_ID = s.PROJECT_ID group by d.TARGET_SNAPSHOT_ID, s.NAME, p.SHORT_NAME