Oracle Workflow some imp scripts..
BEGIN --> purging the records from WF_ITEMS and WF_ITEM_ACTIVITY_STATUSES
WF_ENGINE.AbortProcess(ITEMTYPE,ITEMKEY,NULL,'FORCE');
WF_PURGE.Items(ITEMTYPE=>'XXXXX',ITEMKEY=>'XXXXX',ENDDATE=>SYSDATE,DOCOMMIT=>TRUE,FORCE=>TRUE);
END;
BEGIN -- creates a record entry in WF_ITEMS TABLE
wf_engine.createprocess(itemtype => 'ITEMTYPE',itemkey => 'ITEMKEY',process => 'PROCESS_NAME');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE(fnd_file.output,'In exception while call to wf_engine.createprocess : '||SQLERRM);
END;
BEGIN -- creates the action history in WF_ITEM_ACTIVITY_STATUSES table
wf_engine.startprocess(itemtype => 'ITEMTYPE',itemkey => 'ITEMKEY');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE(fnd_file.output,'In exception while call to wf_engine.createprocess : '||SQLERRM);
END;
Regards,
Sal.
BEGIN --> purging the records from WF_ITEMS and WF_ITEM_ACTIVITY_STATUSES
WF_ENGINE.AbortProcess(ITEMTYPE,ITEMKEY,NULL,'FORCE');
WF_PURGE.Items(ITEMTYPE=>'XXXXX',ITEMKEY=>'XXXXX',ENDDATE=>SYSDATE,DOCOMMIT=>TRUE,FORCE=>TRUE);
END;
BEGIN -- creates a record entry in WF_ITEMS TABLE
wf_engine.createprocess(itemtype => 'ITEMTYPE',itemkey => 'ITEMKEY',process => 'PROCESS_NAME');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE(fnd_file.output,'In exception while call to wf_engine.createprocess : '||SQLERRM);
END;
BEGIN -- creates the action history in WF_ITEM_ACTIVITY_STATUSES table
wf_engine.startprocess(itemtype => 'ITEMTYPE',itemkey => 'ITEMKEY');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE(fnd_file.output,'In exception while call to wf_engine.createprocess : '||SQLERRM);
END;
Regards,
Sal.