Problem Statement
How do I delete a large number of instances for a given BPD in IBM BPM 7.5.
Solution
- 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.
- 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;
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;
No comments:
Post a Comment