Can not delete a running process instance in PAM.
search cancel

Can not delete a running process instance in PAM.

book

Article ID: 44010

calendar_today

Updated On:

Products

CA Process Automation Base

Issue/Introduction

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?

Environment

Process Automation 4.3.X

Resolution

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