Now and then an OWB started Processflow has trouble finishing. Or more likely I have created an incomplete Processflow. Most of the time this leads to an error when deploying the processflow again:
RPE-02062: ItemType LOAD_CMS cannot be dropped as it has running Processes. You must first abort all the running processes using the Oracle Workflow Monitor
To find out if there are any such processflows I use the following query:
SELECT item_type, item_key FROM wf_item_activity_statuses_v WHERE activity_type_code= 'PROCESS' AND activity_status_code != 'COMPLETE';
And you can tell OWF the processflow is not running anymore with:
DECLARE t_result VARCHAR2(300); BEGIN wf_engine.abortprocess (‘itemtype’,’itemkey’,t_result); COMMIT; END;
Where Itemtype and ItemKey must be copied from the results of the query.
There are probably more sophisticated methods to handle these situations (probably from OWF-savvy people), but it gives me a handle to know what is going on and what I can do about it.
Edit November 24, 2010:
Sometimes you cannot find any information using the first query above. But still you get the RPE-2062 error. An even more radical approach would be to remove all audit/run-time information about the process flow from OWF. This means you will have to redeploy the process flow, but that is what you had planned anyway. There is a script for this purpose that can be found in <ORACLE_HOME>/wf/admin/sql/wfrmitt.sql. Mind about the slashes or backslashes for your environment. The <ORACLE_HOME>/wf directory is only present on the server where you have installed the workflow software. In most client installations it won’t be there.
Execute the script as the workflow user.
a nice brief thing to share….
regards,
naseer
a nice brief thing to share….
regards,
naseer
Thanks Naseer.
And what if query from wf_item_activity_statuses_v doesn’t return any data, but OWB still says “RPE-02062: ItemType … cannot be dropped as it has running Processes. You must first abort all the running processes using the Oracle Workflow Monitor.”
Edgars,
I can’t be sure of course, as I know nothing about your environment. Could it be you have two or more ‘owf_mgr’ schema’s installed (under different names of course) and you are querying one schema and OWB is working in the other schema? That’s the only reason I can think of from the top of my head.
Thanks a lot, this worked fine for me and solved a problem we had since months.
The proposal from Oracle Metalink did not work:
– WF_PURGE.TOTAL package : deletes obsolete runtime data which includes: Items, Item activity statuses, Notifications, Expired activity versions.
SQL> execute wf_purge.total
You’re welcome, glad it helped.
Wonderful!!!
Thanks you so much
[…] OWB Process Flows that keep saying they are running April 2009 8 comments 5 […]
Thank you! This helped us fix the problem we had for months. I ran wf_engine.abortprocess AND ALSO ran execute wf_purge.total. Both under owf_mgr account.
I will also share with Oracle Support, since they don’t seem to know about the abortprocess fix! Yours has been the best summary, and the only working solution.
Hi Irene,
I’m surprised this is still relevant after almost 3 years, but I’m glad it helped you solve your problem.
Kind regards,
Eric.
Thank you so much!
Good skills – Helped tremendously. Thanks
[…] OWB Process Flows that keep saying they are running April 2009 8 comments […]