Category Archives: Workflows

How to RETRY/SKIP a workflow from backend

Script to RETRY workflow BEGIN wf_engine.handleerror ( itemtype => ‘OEOL’, itemkey => 2705276, activity => ‘SHIP_LINE’, command => ‘RETRY’, RESULT => NULL ); END; / COMMIT;BEGIN wf_engine.handleerror ( itemtype => ‘OEOL’, itemkey => 2705276, activity => ‘SHIP_LINE’, command => ‘RETRY’, result => NULL ); END; / COMMIT; Script to SKIP workflow BEGIN wf_engine.handleerror ( itemtype… Read More »

PL/SQL Script to Inactive and Delete Adhoc Role

DECLARE lc_role_name apps.wf_roles.name%TYPE := ‘XX_TEST_ROLE’; BEGIN wf_directory.setadhocroleexpiration(lc_role_name, sysdate -1 ); COMMIT; wf_directory.setadhocrolestatus( lc_role_name, ‘INACTIVE’); COMMIT; wf_directory.deleterole(lc_role_name , ‘WF_LOCAL_ROLES’ , 0); COMMIT; END; /DECLARE lc_role_name apps.wf_roles.name%type := ‘XX_TEST_ROLE’; BEGIN wf_directory.setadhocroleexpiration(lc_role_name, sysdate -1 ); COMMIT; wf_directory.setadhocrolestatus( lc_role_name, ‘INACTIVE’); COMMIT; wf_directory.deleterole(lc_role_name , ‘WF_LOCAL_ROLES’ , 0); COMMIT; END; / PL/SQL Script to Create Adhoc Role PL/SQL Script to Remove… Read More »

PL/SQL Script to Remove and Add Users to Adhoc Role

DECLARE ln_role_users_count NUMBER; lc_role_name apps.wf_roles.NAME%TYPE := ‘XX_TEST_ROLE’; BEGIN —————————— –Checking if Adhoc Role Exits —————————— SELECT COUNT (1) INTO ln_role_users_count FROM apps.wf_user_roles WHERE NAME = lc_role_name;   IF ln_role_users_count > 0 THEN ——————————– –Removing users from Adhoc Role ——————————– apps.wf_directory.removeusersfromadhocrole (role_name => lc_role_name);   dbms_output.put_line("Users removed from Role!"); END IF; ——————————– –Adding users to Adhoc… Read More »

PL/SQL Script to Create Adhoc Role

DECLARE ln_role_count NUMBER; lc_role_name apps.wf_roles.NAME%TYPE := ‘XX_TEST_ROLE’; lc_role_display_name apps.wf_roles.description%TYPE := ‘XX Test Role’; BEGIN —————————— –Checking if Adhoc Role Exits —————————— SELECT COUNT (1) INTO ln_role_count FROM apps.wf_roles WHERE NAME = lc_role_name;   IF ln_role_count = 0 THEN ——————— –Creating Adhoc Role ——————— apps.wf_directory.createadhocrole (role_name => lc_role_name, role_display_name => lc_role_display_name, notification_preference => ‘MAILHTM2’ );  … Read More »

Attaching Concurrent Program Output as Workflow Email Notification Attachment

This article explains how to attach a concurrent program output as a Workflow email notification. Prerequisites DBA Directory should be created with Concurrent Program output path A new document category should be created under “Application Developer –> Attachments –> Document Categories” Steps to Implement Call API “FND_DOCUMENTS_PKG.INSERT_ROW” to detail the information of document to be… Read More »

Create Event/Subscription button is Missing, How to Enable?

By default Event/Subscription button is visible only through SYSADMIN login. This is due to a setup in ‘Administration‘ tab of Workflow Administrator, where only ‘SYSADMIN’ is configured as Workflow System Administrator as shown in the below screen shot. To make Event/Subscription button visible to all other users who has access to Workflow Administrator responsibility, ‘SYSADMIN’… Read More »

Important Tables of Oracle Workflow and their Description

Table Name Description WF_ITEMS WF_ITEMS is the runtime table for workflow processes. Each row defines one work item within the system. WF_ITEM_TYPES The WF_ITEM_TYPES table defines an item that is transitioning through a workflow process. WF_ITEM_ATTRIBUTES The WF_ITEM_ATTRIBUTES table stores definitions of attributes associated with a process. Each row includes the sequence in which the… Read More »

How to Close Approval or Response Required based Notifications from backend?

Earlier we have seen how to close FYI based notification. Here in this article lets see how to close Approval/Response based notification from backend. Since its Approval/Response based notification, first we need to set the Response RESULT value using API wf_notification.setattrtext and then close notification by responding to it using API wf_notification.respond. Syntax — –Setting… Read More »