Recently came across a good Oracle Workflow API wf_engine.activity_exist_in_process . This is Function and return boolean.
My Requirement to find weather a particular activity exists in the workflow or Not. I have option to get the data from WF_ITEM_ACTIVITY_STATUSES , but the requirement here was to check if Line will be shipped/Fulfilled/Invoiced even befor the Order line was even booked.
I found this API very useful. To check if line will be shipped/fulfill/Invoiced I just Need to pass
ACTIVITY NAME - for my requirement I was passing SHIP_LINE /FULFILL_LINE etc.
and it will retun me True/False
Below is Sample Code
IF wf_engine.activity_exist_in_process('OEOL',to_char(l_line_id),null,'FULFILL_LINE') THEN
dbms_output.put_line('Activity Exists in Assigned Worflow ');
dbms_output.put_line('Activity NOT Exists in Assigned Workflow');