Вы находитесь на странице: 1из 9

16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

Shivmohan Purohit's Oracle ERP BLOG

Oracle Workflow

Oracle Workflow – Account Generator Process


(https://knoworacle.wordpress.com/2010/11/19/oracl
e-workflow-account-generator-process/)

November 19, 2010November 19, 2010 Shivmohan Purohit  Apps Add-in Tools,
Interview Questions, Knowledge Base, Oracle Technical, Oracle Workflow, System Administrator
account generator, Oracle Workflow, wfload, wfstat, wf_debug, wf_items, wf_status.sql

i
4 Votes

What does the Account Generator process do?


The Account Generator process builds charge, budget, accrual, and variance accounts for each purchase
order, release, and requisition distribution based on the distribution’s destination type. It is a
synchronous Workflow process.

What are the Pre-requisites to use Account Generator?


Before using the Account Generator you must:
– Define your Accounting flexfield structure for each set of books.
– Define flexfield segment values and validation rules.
– Set up Oracle Workflow.
– Decide whether you want to use the Account Generator processes as seeded in Oracle Purchasing, or
you need to customize them to meet your accounting needs
https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 1/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

What are the steps to generate the WFSTAT output for Account Generator?

A: 1. Set the following profiles:


– Account Generator: Run in Debug Mode=> Yes
– Account Generator: Purge Runtime Data=> No
PO: Set Debug Workflow On => Yes
2. Make sure that the concurrent program “Purge Workflow Obsolete Runtime Data” is NOT running.
3. Open Purchase Order/Requisitions form, go to the distributions window, enter necessary fields and
click on charge account field to start generating the charge account. After the account generator has done
building the account, or errors out, do the following from the toolbar (DO NOT exit the form or navigate
to any other block or record, otherwise this information would be lost):

Help=> Diagnostics => Examine


Enter in 1st field => parameter
Enter in 2nd field => charge_acc_wf_itemkey

Then tab out. The Item key will appear in the third field.
4. Now save the purchase order/requisition. If you are not able to save, then clear the distribution record
and navigate back to the shipment window and save the form. Saving the form is must, because a
commit is required to save the workflow information in tables, for generating the wfstat output.
5. If step#3 could not give you an item key, then use the following query to identify the relevant item
key:

Select item_key, item_type, begin_date


from wf_items
where item_type = ‘&item_type’
order by begin_date desc;

For PO, use ‘POWFPOAG’ item type in above query, and for requisition, use ‘POWFRQAG’.
6. To generate the WFSTAT output,
Run the sql in $FND_TOP/sql/wfstat.sql with above item_type and item_key. Spool the output.
7. To get the wf debug information, run the following query:

SELECT item_key, item_type, debug_message


FROM po_wf_debug
WHERE item_key = ‘&Item_key’
ORDER BY execution sequence;

How do you determine the WF Item Key value to run wfstatus.sql for Account Generator workflows?
The item key is required in order to run wfstatus.sql for account generator. The wfstatus.sql gives
important debug messages, including error messages for processes that are erroring out. This provides
the same information that the Workflow Monitor does, if the Workflow Monitor is setup.
Steps to determine the WF Item Key value:
The item key can be found in the Workflow–>Status form in Projects (Querying by item type and dates)
or, more generally, via SQL*Plus from the table WF_ITEMS. A sample script for ge ing the key is below:

Select item_key, begin_date, end_date


from wf_items
where item_type = ‘PAAPINVW’
and begin_date between ‘&low_start’ and ‘&high_start’;

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 2/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

If this does not definitively identify your item you can query on the various items in the Workflow status
form to give you more information about the activities associated with them.

How do I save my workflow definition to the database?


There are three options to use when saving your workflow definition to the database:

Option #1

If you have the file open in workflow builder select File -> SaveAs -> Database. Enter the apps username
and password and provide the connection string (from the tnsnames.ora in the
%ORACLE_HOME%\network\admin directory).
Option #2

The WFLOAD utility is used for loading and extracting workflow definition files to and from the
database.

Command Line Syntax:


WFLOAD 0 Y {UPLOAD | DOWNLOAD | UPGRADE | FORCE}
[filepatch [item type]]</APPS pwd>

NOTE: The item type parameter is used only for the DOWNLOAD mode.
Option #3

Run the concurrent program, Workflow Definitions Loader. The system administrator will need to add
this concurrent program to a request security group for the responsibility that you want to run this
program from.

How do I trace errors in my Workflow processes?


A: If a customized workflow process errors you should check the error stack (using the Workflow
Monitor and/or wfstatus.sql script), if the procedure in error does NOT begin with WF_.. OR _… then
you need to debug your own pl/sql procedures.
If standards in the Workflow Guide for exception handling have not been followed, you can still tell
whether the problem is with your code, because Oracle Workflow traps external exceptions and reports
these as

Activity Status: ERROR


Activity Result: #EXCEPTION

This is what would show up in the workflow monitor or any status report or form inquiry for the failing
activity.

How do I customize the Account Generator Workflow process for my company?


A: Customers are expected to customize the Account Generator process. You can do this by editing the
existing process or creating your own process, but this MUST be within the seeded ‘Item Type’. You
should NOT create a NEW ‘Item Type’ as this would NEVER be run by Account Generator.
If you create a new process, you must ensure it is “Runnable.”

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 3/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

You must then assign the appropriate process to the Accounting Flexfield structure in the Account
Generator Process window in Oracle Applications (login as System Administrator, Application ->
Flexfields -> Key -> Accounts and query up the required Accounting flexfield structure).

2 Comments

How To Make All The Responsibilities Read Only


For A User
(https://knoworacle.wordpress.com/2010/05/19/how-
to-make-all-the-responsibilities-read-only-for-a-
user/)

May 19, 2010 Shivmohan Purohit  Application Developer, Apps Add-in Tools, Oracle
Applications Technical, Oracle Fixed Assets Technical, Oracle GL Technical, Oracle HRMS Technical,
Oracle Payables Technical, Oracle Projects Technical, Oracle Receivables Technical, Oracle Technical,
Oracle Workflow, System Administrator custom.pll, customization, form read only

i
1 Votes

Here is a sample code could be used to make all the responsibilities read only for a specific user. I am
sure we can use it in different variations.

1. Open the Custom.pll in the Form Builder.


2.Add the following sample code in the Procedure Event for the event WHEN-NEW-FORM-INSTANCE
3.Compile the Custom.pll and place under the directory $AU_TOP/resource

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 4/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

BEGIN
IF event_name = ‘WHEN-NEW-FORM-INSTANCE’ THEN
IF FND_PROFILE.VALUE(‘USER_NAME’)=’<USER_NAME>‘ THEN
BEGIN
COPY(‘Entering app_form.query_only_mode.’,’global.frd_debug’);
COPY(‘YES’, ‘PARAMETER.QUERY_ONLY’);
APP_MENU2.SET_PROP(‘FILE.SAVE’, ENABLED,PROPERTY_OFF);
APP_MENU2.SET_PROP(‘FILE.ACCEPT’, ENABLED,PROPERTY_OFF);
formname := NAME_IN(‘system.current_form’);
blockname := GET_FORM_PROPERY(formname, FIRST_BLOCK);
WHILE (blockname is not null) LOOP
IF (GET_BLOCK_PROPERTY(blockname, BASE_TABLE) is not NULL) THEN
SET_BLOCK_PROPERTY(blockname, INSERT_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blockname, UPDATE_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blockname, DELETE_ALLOWED, PROPERTY_FALSE);
END IF;
blockname := GET_BLOCK_PROPERTY(blockname, NEXTBLOCK);
END LOOP;
END query_only_mode;
END;

The above code will make all the Responsibilities read only for a specific user.

It will fundamentally make all the form functions to behave as passing the parameter QUERY_ONLY.

2 Comments

Distinction between configuration, personalization,


and extensibility.
(https://knoworacle.wordpress.com/2010/03/02/confi
guration-personalization-extensibility/)

March 2, 2010March 2, 2010 Shivmohan Purohit  Application Developer, General


Technical, Knowledge Base, Oracle Applications Technical, Oracle Technical, Oracle Workflow, System
Administrator Application Developer, configuration, customization, development, form, OA
Framwork, OAF, oracle r12, Personalization, profile options

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 5/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

Rate This

Distinction between configuration, personalization, and extensibility.

Configuration provides setup and administrative choices using the native features of the product. Some
configuration examples include:

Profile Options
User-defined fields (Flexfield)
Function Security Setup
Data Security Setup
and a lot more….

Personalization enables you to declaratively tailor the UI look-and-feel, layout or visibility of page
content to suit a business need or a user preference. Some personalization examples include:

Tailor the order in which table columns are displayed.


Tailor a query result.
Tailor the color scheme of the UI.
Folder Forms
Forms Personalization
Oracle Application Framework (OAF)

Extensibility is about extending the functionality of an application beyond what can be done through
personalization. Some extensibility examples include:

Add new functional flows


Extend or override existing business logic
Using Oracle Forms Developer, Oracle JDeveloper and Oracle Workflow

2 Comments

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 6/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

Oracle Application Workflows FAQ


(https://knoworacle.wordpress.com/2009/05/07/oracl
e-application-workflows-faq/)

May 7, 2009May 8, 2009 Shivmohan Purohit  Apps Add-in Tools, General Technical,
Interview Questions, Oracle Technical, Oracle Workflow faq oracle workflow, notification, oracle
alerts, Oracle Workflow

i
1 Votes

1. I do not wish to have “Notification Detail.html” a achment in my email notifications. How can I
avoid?

Set the Email preference to HTML mail. It will send notifications as HTML-forma ed e-mail only,
without any standard a achments. However users must read their e-mail using an HTML e-mail client.
If there are custom a achments defined for individual notifications in a process, those a achments will
be included.

2. What is the impact of reducing “Processor Min Loop Sleep” for agent listeners or components for
type “Workflow Agent Listener”?

This parameter carries minimum amount of time in seconds the processing thread(s) will sleep when
nothing has been read. Thread only sleeps when it does not process anything in last iteration. If there is
steady stream of messages, sleep should not ma er. If there are bursts of messages with no activity in
between, this parameter will only affect how soon agent listener reacts to and process new messages. So,
if reaction time needs to be improved, sleep can be reduced but note, it will also cause more polling and
in absence of activity it may not be worth it.

3. How to remove Action History region from notifications in Applications 11.5.10?

Define the special message a ribute #HISTORY with a null value to suppress the action history for a
notification. Please see Oracle Workflow Developer’s Guide for more information.

4. Why does the Email notification shows red cross mark in the place of GIF image?

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 7/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

Oracle Workflow Java mailer will a empt to resolve image references in notifications only if the
notification contains a framework region. The source URL for the image needs to be accessible from the
recipient’s client. When the image is behind a firewall, than the email client may not have access to it.
Image can also be a ached to an email if the ATTACH_IMAGES mailer configuration parameter is
enabled.

5. When a contact is created for the customer, a role is ge ing created for the contact with notification
preference as ‘QUERY’. Hence the mailer is not sending email notification to this contact. How the
notification preference can be defaulted to ‘MAILHTML’ or ‘MAILTEXT’ for these roles?

If the role is being created using the wf_directory.createAdhocUser API, It is possible to set the
notification preference in the API call, otherwise the default notification preference would be used. The
default notification preference is controlled in the “Workflow Administrator Web Applications”
responsibility. There is an “Administration” link. On that page you will find the default notification
preference se ing.

6. Why the summary email notifications are not closed automatically even after enabling the Autoclose
FYI mailer parameter?

This is expected behavior. Enabling Autoclose FYI is applicable only to notifications that are being
emailed individually to the users with Notification Preference MAILHTML, MAILTEXT, MAILATTH or
MAILHTM2 but not with SUMMARY or SUMHTML. However, since the summary notifications contain
only the subject headers for the individual notifications, they have to be reviewed/actioned before
closing the notification.

7. For some records, WF_NOTIFICATION_OUT table shows the message state 3, which means such
messages are expired. Should I rebuild the queue to bring these messages back to normal state?

Some messages could expire and move to exception queue after certain retries.

Following select statement can be executed to check the retry count and message status.

Select corr_id, msg_state, retry_count, count(msg_id) from applsys.aq$wf_notification_out group by


corr_id, msg_state, retry_count;

Instead of rebuilding the queue, use the concurrent program “Move messages from Exception to Normal
Queue of Workflow Agent” to move messages from exception queue to normal queue for agent
WF_NOTIFICATION_OUT.

8. How to stop sending out the “Cancel” emails when notification time out occurs in standalone
workflow 2.6.4?

It is not possible at standalone workflow 2.6.4 code level.

Note: For Embedded workflow, the WF: Mailer Cancellation Email profile option has been obsoleted in
11i.ATG_PF.H Rollup 3 patchset level as this feature has been replaced by the Send E-mails For Canceled
Notifications (SEND_CANCELED_EMAIL) mailer parameter.

9. A message a ribute of type ‘Text’ and source ‘Respond’ has been created for a response required
approval notification to allow approvers to enter any comments. So, what is the maximum length of text
can approver enter as comments?

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 8/9
16/07/2019 Oracle Workflow | Shivmohan Purohit's Oracle ERP BLOG

Maximum length of a Text a ribute is 4000 bytes. It is stored within a VARCHAR2 column and thus it
can be upto 4000 bytes and not characters. Please note that multibyte character can take more than 1
byte.

6 Comments

https://knoworacle.wordpress.com/category/oracle-applications-technical/oracle-workflow/ 9/9

Вам также может понравиться