Oracle Apps Search

Wednesday, July 29, 2009

Oracle Workflow FAQ

Why Workflow why not plain PL/SQL

Some of the intriguing facts of why workflow is used rather than plain pl/sql is due to following reasons,
  • Simplicity of the solution
  • Easier to develop separate small activities(procedure) instead of single big one.
  • Easy for future re-usability by just changing the Workflow activities
  • Easier to change the order of processing by moving the activities
  • Saving time by just moving the activities
  • and most interestingly, Visible solution to provide an overview of business process.

Workflow Upload Errors

Sometimes uploading/saving a workflow to the database may cause constraint errors as below,

- 1602: Could not save.
- 1400: Could not save to database. MODE=UPGRADE EFFDATE=
- 1401: Could not upload ACTIVITY entity 'POAPPRV/POAPPRV_TOP'.
- 210: Oracle Error: ORA-00001: unique constraint (APPLSYS.WF_PROCESS_ACTIVITIES_U2) violated
ORA-01403: no data found
ORA-06512: at "APPS.WF_LOAD", line 1988
ORA-06512: at line 1
. SQL text: BEGIN WF_LOAD.UPLOAD_PROCESS_ACTIVITY(:process_item_type, :process_name, :process_version, :activity_item_type, :activity_name, :instance_id, :instance_label, :protect, :custom, :start_end, :default_result, :icon_geometry, :perform_role, :perform_role_type, :user_comment, :level_error); END;

So to avoid these kind of errors we need to remove the workflow from the database and then re-load the workflow.

Offending rows are found by $FND_TOP/sql/wfrefchk.sql and Workflow should be removed from the database by the script provided by oracle at $FND_TOP/sql/wfrmitt.sql
This takes ItemType as the parameter.

Now upload the workflow from the command line with the following command,

WFLOAD apps/apps@ XXXX.wft

UPLOAD - honors both protection and customization level of the workflow
UPGRADE - honors only protection level of data
FORCE - FORCE upload regardless of protection or customization levels.

Unable to set NLS_LANGAUGE Error while saving or opening a Workflow from a Database:

210: Oracle Error: ORA-01403: No Data Found: SQL Text: SELECT NLS_LANGAUGE from WF_LANGAUGES where :1 IN(NLS_LANGAUGE, CODE)

This error occurs while you try to open an existing workflow from an Oracle Database or Save changes of an Workflow to the Database as below,



This error occurs if no NLS_LANG environment variable comprising Language, Territory and Character Set in the form of Language_Territory.CharacterSet is setup, or if you have installed more than one ORACLE_HOME with different NLS_LANG value.

The fix is to correct the NLS_LANG Variables for installed ORACLE_HOME 's using the regedit option from RUN command, and setup an NLS_LANG environment variable as below,

My Computer -> Properties -> Advanced -> Environment variables ->

Setup new Environment variable NLS_LANG with value ‘AMERICAN_AMERICA.UTF8’.

And suppose if you have more than one Oracle Home installed in the system, then modify the NLS_LANG variable value in regedit to ‘AMERICAN_AMERICA.UTF8’.

This setup is for AMERICA, please use the NLS Language setup specific to your usage.


Hiding 'Request Information' & Reassign/Forward button in an Email Notification

Sometimes you may need to hide the Request Information button for an Email-notification according to client business requirements. For this oracle had provided a special message attribute with the internal name #HIDE_MOREINFO to hide the Request Information button in the notification details page.
Usually when users view a notification that require a response from their worklist page, the response region in the notification details page includes the Request Information button by default. If you want to prevent users from requesting more information about a notification, you can add #HIDE_MOREINFO attribute to control whether the Request Information button is displayed or hidden.

The #HIDE_MOREINFO attribute must be either of type text or Lookup added to the associated message. To hide Request Information button, set the value of this attribute to Y as below. To display the Request Information button, set the value to N.


Hiding Reassign button is similar to this, but you need to use #HIDE_REASSIGN attribute being created with Constant Value 'Y' to hide the Reassign button and with 'N' to show the Reassign Button. But the Reassign button functionality only works for the users without System Administration privilege, as System Administrator can always Reassign/Forward the Notification.


Cancel/Abort the Workflow Process in Error:

You need to Cancel/Abort the process which you wish to Purge or stop the Notifications for the workflow processes completed in Error, which you will be able to do it using the API, WF_ENGINE.AbortProcess, as below,

begin
wf_engine.AbortProcess('WF_TEST', 'TEST-198','TEST_WF_MAIN');
exception
when others then
dbms_output.put_line('Exception:'||SQLERRM);
end;
/

Print This Post

2 comments:

  1. Hi kiran,
    You have solve my problem of hiding more information button.
    I have a requirement that my user want reminder notification after three business days. i.e excluding saterday,sunday. can u please help me to do so.
    Thanks.
    Please reply on nathumatte@gmail.com
    .. Natthu Matte

    ReplyDelete
  2. Hi Kiran,
    Thanks you solve my problem of hiding 'more information button',
    Now I have a requirement that my user want a notification after three business days, means excluding saterday,sunday.
    Can you please help me to do so.
    Plz reply on nathumatte@gmail.com.
    ...Natthu Matte.

    ReplyDelete