Professional Documents
Culture Documents
4-Triggering A Custom Workflow - Shareapps4u
4-Triggering A Custom Workflow - Shareapps4u
Once the process is created, it actually creates the instance of the workflow definition. Once the instance is created, we need to set attribute values. To set the attribute
values we need to call oracle provided workflow apis
wf_engine.SetItemAttrText(itemtype => <Internal name of item type>,
itemkey => <Item key value>,
aname =><Internal name of attribute>,
avalue =><Attribute value that need to set>);
wf_engine.SetItemAttrDate(itemtype => <Internal name of item type>,
itemkey => <Item key value>,
aname =><Internal name of attribute>,
avalue =><Attribute value that need to set>);
wf_engine.SetItemAttrnumber(itemtype => <Internal name of item type>,
itemkey => <Item key value>,
aname =><Internal name of attribute>,
avalue =><Attribute value that need to set>);
4) Commit Transactions
commit;
nstead of trigerring workflow from a Web-page just for sake of illustration we will trigger workflow from a pl/sql block by passing necessary parameter values to our
TRIGGER_WORKFLOW procedure.
DECLARE
BEGIN
XX_TEST_LEAVE_PKG.TRIGGER_WORKFLOW(P_PERSON_ID => 14760
,P_LEAVE_TYPE => 'Seek Leave'
,P_LEAVE_FROM_DATE => '01-MAR-2011'
,P_TO_DATE => '04-MAR-2011'
);
END;
Once the above block is exceuted it will trigger the custom workflow and notification will go to the approver for approval.
Please see the screen shot below
To track the present status of the workflow follow the below mentioned navigation.
Login as (Sysadmin) >> Workflow Administrator Web Applications >> Status Monitor>>
Enter the internal name of item type of your workflow under "Type Internal Name" and click on "GO". You will find the list of workflows that was triggered. Select any of
them and click on View Diagram.
XX_TEST_LEAVE_PKG.pkg Suman Kalyan Malaker, v.1