Search This Blog

Sunday, October 12, 2014

5. Steps to start Process of Workflow



1.

BEGIN
WF_ENGINE.CREATEPROCESS(itemtype => 'TEST',
                        itemkey  =>'1',--UNIQUE
                        process  =>'PROCESS1',
                        user_key => 'A',--WE CAN PASS OUR OWN, OPTIONAL ,
                        owner_role => 'OPERATIONS');
                        END;
                       
2.PROCESS CREATED IN BACKEND..
                       
 SELECT * FROM WF_ITEMS
 WHERE ITEM_TYPE = 'TEST'

3. TO CHECK THE PROCESS IN FRONTEND.
sysadmin>workflow>administrator worflow> status monitor


4. TO START THE PROCESS.

BEGIN
WF_ENGINE.STARTPROCESS(itemtype => 'TEST',
                       itemkey  => '1');
                       end;
                      

SELECT * FROM WF_NOTIFICATIONS
WHERE MESSAGE_TYPE = 'TEST'                       


If we want to do create and start process at once use the below:
BEGIN                       
WF_ENGINE.LaunchProcess(itemtype =>'TEST2', --internal name of wf
                        itemkey  =>'1',     --unique key any
                        process => 'PROC2' , --internal name of process
                        userkey => 'A',      --unique key any
                        owner   => 'EG_AFZAL'); --user
END;      

No comments:

Post a Comment