OWB error RPE-02062: cannot be dropped as it has running Processes. You must first abort all the running processes using the Oracle Workflow Monitor.
1.Run the following script from OWF_MGR(or your workflow user):
SELECT item_type, item_key
FROM wf_item_activity_statuses_v
WHERE activity_type_code= 'PROCESS'
AND activity_status_code != 'COMPLETE';
/* Formatted on 08.12.2012 ã/ 15:21:42 (QP5 v5.227.12220.39724) */
DECLARE
t_result VARCHAR2 (300);
BEGIN
FOR c
IN (SELECT item_type, item_key
FROM wf_item_activity_statuses_v
WHERE activity_type_code = 'PROCESS'
AND activity_status_code != 'COMPLETE')
LOOP
wf_engine.abortprocess (c.item_type, c.item_key, t_result);
END LOOP;
COMMIT;
END;
But sometimes this sql returns 0 records so follow the next statements
2. Kill the Workflow process using the Oracle Workflow Monitor.
- On the OWF Monitor home page, use "Find Process" to find the process
- In the "Process List" page, click on the Process Name
- Click on the "View Diagram" button
- Click on the "Abort Process" button
- In the "Process List" page, click on the Process Name
- Click on the "View Diagram" button
- Click on the "Abort Process" button
In the process list, the process should have a white-black flag.
3. Connect as the Workflow schema owner and execute the following commands in order to purge the item type.
- WF_PURGE.TOTAL package : deletes obsolete runtime data which includes: Items, Item activity statuses, Notifications, Expired activity versions.
SQL> execute wf_purge.total
- WFRMITT.sql script : deletes all definitions for an Item.
For versions up to 10.2:
SQL> @<database_oracle_home>\wf\admin\sql\WFRMITT.sql
For version 11.1:
SQL> @<database_oracle_home>\owb\wf\admin\sql\WFRMITT.sql
SQL> @<database_oracle_home>\owb\wf\admin\sql\WFRMITT.sql
4. Deploy the Workflow Process again from the OWB Deployment Manager.
Comments