Está en la página 1de 1

Calling Workflow from OAF

From OAF Workflow can be called in 2 ways.


1) Using PL SQL Procedure, call procedure from OAF page using callable
statement.
CREATE OR REPLACE PROCEDURE start_sw_wf_prc
IS
l_itemtype VARCHAR2 (30) := 'XX_TEST_SW';
l_itemkey VARCHAR2 (300) := 'Practice-1';
BEGIN
wf_engine.createprocess (l_itemtype, l_itemkey,
'XX_MAIN_PROCESS_SW');
wf_engine.setitemowner (itemtype => l_itemtype,itemkey => l_itemkey,owner
=> 'MOKSHITH');
wf_engine.startprocess (l_itemtype, l_itemkey);
COMMIT; END;
2)
2) Write following function in Controller of the OAF page.
public void callCustomWorkFlow(OAPageContext pageContext)
{
String strWfItemType = "XX_TEST_SW"; String strWfProcess =
"XX_MAIN_PROCESS_SW";
String strWfItemKey = "Practice-1";
OANavigation wfNavigation = new OANavigation(); // Create Workflow
Process
wfNavigation.createProcess(pageContext, strWfItemType, strWfProcess,
strWfItemKey);
wfNavigation.setItemOwner(pageContext," MOKSHITH"); // Start Workflow
Process
wfNavigation.startProcess(pageContext, strWfItemType, strWfProcess,
strWfItemKey);
}

También podría gustarte