Search from 700 + Posts

Jun 24, 2010

wf_engine.activity_exist_in_process - Good API

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
ITEM_TYPE
ITEM_KEY
ACTIVITY NAME - for my requirement I was passing SHIP_LINE /FULFILL_LINE etc.
and it will retun me True/False

Below is Sample Code

Declare

l_line_id NUMBER:=&Enter_line_id;
BEGIN
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 ');
ELSE
dbms_output.put_line('Activity NOT Exists in Assigned Workflow');
END IF;
END;

Thanks

No comments:

Post a Comment