Can not delete a running process instance in PAM.

Document ID : KB000044010
Last Modified Date : 14/02/2018
Show Technical Document Details


It is possible depending on the process code designed where a process instance is stuck in a running state and will not respond to being suspended or aborted.  In this case you may need to remove the instance manually from the PAM database.


How can I remove the PAM instance manually from the DB?


SQL Database


Manually delete process instance from database (SQL)

Get ROID of process instance (number to the right of the instance)

Select count(*) from c2oruntimeobjects where ROID=15887 or ParentID=15887;

(ROID and ParentID should be your ROID number.)

What does Select count from c2oruntimeobjects do?

The sql statement was to check how many runtime instances are associated with this instance of the process.  In the runtime tables every operator in the process will be expanded to its own row and later, the process is rolled up (once the process completes) to 1 row. So there will be multiple rows with this ROID as ParentID before a process completes and that is what we need to cleanup.

Deleting the instance:

Here is the SQL command to clean up the rogue instance.  We recommend running this off-business hours when there is not much activity in the runtime tables.  As a best practice, we recommend a database backup be created before running any manual changes to the PAM database.  To clean up this process please run the following.

delete from c2oruntimeobjects where ROID=15887 or ParentID=15887;

again, the ROID and ParentID should be your specific ROID number