Wednesday, April 8, 2009

Expense Report Workflow Notifications

Expense Report Workflow Notifications

The mail status of the notification can be SENT, CANCELED, MAIL, UNAVAIL, ERROR, NULL. Let us see in detail about these and the actions required to get the notification to SENT status..

SENT: The notification has been successfully sent to the APPROVER.

CANCELED: The system is setup to send the notifications n times (n can be set in the workflow attributes) with a timeout after 5 days. If the Approver does not approve or reject within the time frame, the workflow will cancel the notification automatically and then the notification will end up in the status CANCELED.

Action: In such cases, RETRY would not work instead ask the preparer to withdraw and re-
submit the expense report.

MAIL: If the notification is not SENT to the approver, the status would be MAIL.

Action: Ask the DBA to bounce the workflow. This would solve the problem most times. But if it doesn’t i.e if the status is still MAIL, then RETRY the activity ‘Request Approval from APPROVER’ using the Workflow Administrator responsibility (demo below). If yet not sent, check the Attributes like Approver’s email etc.

BLANK: Sometimes the value of the status would be NULL.

Action: Sometimes even if the status is BLANK, the notification is sent to the approver. First check with the Approver to see if the notification is sent. If not sent, RETRY the activity.

UNAVAIL: This would happen usually when there is problem with the Approver’s preferences or Email address.

Action: Check the notification preference of the Approver using the below:

SELECT WFU.NAME, WFU.display_name,WFU.notification_preference, email_address ,wfu.status
WHERE in (‘NAME’) (NAME would be the user_name in FND_USER table)

The notification_preference can be set to one of the below
Make sure that it is set to MAILHTML
Also check if the email address returned in the above query is a valid one and matches with the one in HR Employee record (hr_employee table), fnd_user table and the outlook email address.
Also check if the status is ACTIVE in the above query, if the APPROVER is an existing employee and his FND_USER account is ACTIVE.


Action RETRY would solve this case.

Action: Check the ERROR and act accordingly. Some sample Errors:

--Failed Activity AP Validate Expense Report
Activity Type Function
Error Name -20001
Error Message ORA-20001: APP-SQLAP-10000: ORA-00984: column not allowed here occurred in AddDistributionLine with parameters (&PARAMETERS) while performing the following operation: parse cursor
Error Stack AP_WEB_EXPENSE_WF.APValidateExpenseReport(APEXP, 142459, 0, Call DoAPValidationORA-00984: column not allowed here occurred in AddDistributionLine with parameters (&PARAMETERS) while performing the following operation: parse cursor) Wf_Engine_Util.Function_Call(AP_WEB_EXPENSE_WF.APVALIDATEEXPENSEREPORT, APEXP, 142459, 175587, RUN)

Check if the code combinations are all passed in correct and if it exists. There is something wrong in the data which results in this error. If the expense report errors out in this Stage i.e it has not passed the validation, Status in expense report header would not be WEBEXPENSE and hence cannot see this in AP.

--. No Approver/Performer ERROR:
Check to see if there is any supervisor assigned in HR
Check to see if Supervisor exists in USERS list and in HR.
If everything is fine, In the status monitor, query for the Item key
Click on Active History
Check Request approval from APPROVER, hit Update attributes.
Fill in the appropriate Manager Id (Employee ID), Manager name(WF_USER.NAME), Manager Display Name(WF_user.display_name), approver ID, approver name ,Approver display name and hit Apply.
Go back to Active history, Check Request approval from APPROVER, hit Rewind.

--DISCARD folder error:
Failed Activity Request Approval from APPROVER
Activity Type Notice
Error Message 2405: Notification '1251131' has bounced. Check mailer log and discard folder. STATUS=ERROR ROLE=ABHI

Ask the DBA to resend the notification from Workflow mailer. This is due to Mail Format or OUTLOOK version issues.

--Environment context Error:
Failed Activity Request Approval from APPROVER

Activity Type Notice

Error Name WF_ERROR
Error Message [WF_ERROR] ERROR_MESSAGE=3835: Error '-20001 - ORA-20001: Oracle error -20001: ORA-20001: APP-FND-02500: Error occurred during product initialization for MO when executing 'begin MO_GLOBAL.INIT; end;'. SQLCODE = -20001 SQLERROR = ORA-20001: APP-FND-02902: Multi-Org profile option is required. Please set either MO: Security Profile or MO: Operating Unit profile option. has been detected in FND_GLOBAL.INITIALIZE.' encountered during execution of Generate function 'WF_XML.Generate' for event ''. ERROR_STACK= Wf_Engine_Util.Function_Call(AP_WEB_EXPENSE_WF.CALLBACKFUNCTION, APEXP, 144392, SET_CTX) Wf_Engine_Util.Execute_Selector_Function(APEXP, 144392, SET_CTX) Wf_Engine_Util.Function_Call(AP_WEB_EXPENSE_WF.CALLBACKFUNCTION, APEXP, 144392, TEST_CTX) Wf_Engine_Util.Execute_Selector_Function(APEXP, 144392, TEST_CTX) Wf_Engine.CB(TESTCTX, APEXP:144392:175390, ::::) Wf_Engine.oldCB(TESTCTX, APEXP:144392:175390, ::::) WF_MAIL.SetContext(1252292) WF_XML.GenerateDoc(, 1252292) WF_XML.Generate(, 1252292) WF_XML.Generate(, 1252292) Wf_Event.setMessage(, 1252292, WF_XML.Generate) Wf_Event.dispatch_internal()
Error Stack

RETRY would resolve the problem.

If all the attempts were futile in sending the notification to the Approver, the last action to resolve would be to ask the approver to go to IExpense responsibility and approve manually.

1 comment:

Suddi said...

What does it means When an Expense Report Status is NUll ?