/*Complete the 'ENTER ORDER' activity for the 'ORDER' item type. The 'ENTER ORDER'
activity allows creation of new items since it is the start of a workflow, so the
item is created by this call as well.*/
wf_engine.CompleteActivity('ORDER', to_char(order.order_id),
'ENTER_ORDER', NULL);
Example 2
/*Complete the 'LEGAL REVIEW' activity with status 'APPROVED'. The item must
already exist.*/
Example 3
DECLARE
itemtype VARCHAR2(20) := 'GIM_POC';
itemkey VARCHAR2(20) :='GIM_POC-102';
process VARCHAR2(20) :='GIM_MAIN';
user_key VARCHAR2(20) :='GIM_POC-102';
owner_role VARCHAR2(20) :='KPIT_DEV';
BEGIN
WF_ENGINE.CreateProcess(itemtype ,
itemkey ,
process ,
user_key ,
owner_role );
WF_ENGINE.StartProcess(itemtype,itemkey);
END;
DECLARE
itemtype VARCHAR2(20) := 'GIM_POC';
itemkey VARCHAR2(20) :='GIM_POC-102';
process VARCHAR2(20) :='GIM_MAIN';
user_key VARCHAR2(20) :='GIM_POC-102';
owner_role VARCHAR2(20) :='KPIT_DEV';
BEGIN
WF_ENGINE.CompleteActivity(itemtype ,
itemkey ,
'GIM_MAIN:BLOCK-PO' ,
NULL );
END;
WF_ENGINE.StartProcess(itemtype,itemkey);
END;
WF_STANDARD
XXMTL_ITEM_CREATION_REQUESTS
DECLARE
itemtype VARCHAR2(20) := 'GIM_POC';
itemkey VARCHAR2(20) :='GIM_POC-102';
process VARCHAR2(20) :='GIM_MAIN';
user_key VARCHAR2(20) :='GIM_POC-102';
owner_role VARCHAR2(20) :='SYSADMIN';
BEGIN
WF_ENGINE.CompleteActivity(itemtype ,
itemkey ,
'GIM_MAIN:BLOCK-PO' ,
NULL );
END;
Declare
ln_seq NUMBER;
itemtype VARCHAR2(20) := 'GIM_POC';
itemkey VARCHAR2(20) ;
process VARCHAR2(20) :='GIM_MAIN';
user_key VARCHAR2(20) ;
owner_role VARCHAR2(20) :='SYSADMIN';
BEGIN
select XXMTL_GIM_SEQ.netxval
into ln_seq
from dual;
itemkey := ln_seq;
user_key := 'GIM_POC-'||ln_seq ;
WF_ENGINE.CreateProcess(itemtype ,
itemkey ,
process ,
user_key ,
owner_role );
WF_ENGINE.SetItemAttrText(itemtype ,
itemkey ,
'ITEM_CODE' ,
to_char(ln_seq));
WF_ENGINE.StartProcess(itemtype,itemkey);
END;
(
NUMBER,
VARCHAR2(3 BYTE),
VARCHAR2(40 BYTE),
VARCHAR2(150 BYTE),
VARCHAR2(150 BYTE),
VARCHAR2(30 BYTE),
DATE,
NUMBER,
DATE,
NUMBER,
NUMBER,
VARCHAR2(30 BYTE)
)
LOGGING
NOCACHE
NOPARALLEL;
END ;
END XXWF_GIM_PKG;