Friday, August 22, 2014

Run Task in Debug Mode on an offline Process Server

Problem Statement
Run a task in debug mode. This is useful if you are trying to debug an issue and want to go through individual steps. This is a trivial step in an online process server, but if the process-server is not connected to the Process Designer, this work around solution might help you.

Solution
Get the task ID.
Replace the task id and server host-name in the URL below.
https://<HOSTNAME>/teamworks/process.lsw?zWorkflowState=1&zTaskId=2078.<TASK ID>&zDbg=1

Monday, August 18, 2014

Bulk Delete BPD Instances in IBM BPM 7.5

Problem Statement
How do I delete a large number of instances for a given BPD in IBM BPM 7.5.

Solution
  1. Start by finding the BPD Reference Number of the BPD (whose instances you want to purge). This can be located at "BPD_REF" column of "LSW_BPD_INSTANCE" table.
  2. Use the PL SQL block provided below to purge the BPD Instances. Supply the BPD Reference at the appropriate position.

DECLARE
  BPDINSTANCEID NUMBER;
  CURSOR instancesToDelete (bpdRef IN NUMBER) IS
    SELECT BPD_INSTANCE_ID
    FROM LSW_BPD_INSTANCE
    WHERE BPD_REF = bpdRef;
BEGIN
  BPDINSTANCEID := NULL;
  OPEN instancesToDelete(<BPD REFERENCE NUMBER>); 

  LOOP

    FETCH instancesToDelete  INTO BPDINSTANCEID;

    EXIT WHEN instancesToDelete%NOTFOUND;

    LSW_BPD_INSTANCE_DELETE(
      BPDINSTANCEID => BPDINSTANCEID
    );

  END LOOP;

END;