Skip to main content

Document Manager Error Failed With Error Number 3 (DOC_MGR_ERROR) for Purchasing Workflows

Document Open State Errors


Document Manager failures are classified as Doc Mgr Error 1 (Document Approval Manager timeout)
or Doc Mgr Error 2 (Document Approval Manager Not Active).
Any other document manager exception is considered a Doc Mgr Error 3 and the cause can be related to setup issues or a code fix.


How to find additional error messages
When the purchase order or requisition approval workflow fails with a Doc Mgr Error 3 exception, the POERROR workflow will send a notification to the preparer or owner of the document. This notification will display additional error messages. These messages come from the SYSADMIN_ERROR_MSG workflow attribute that is populated by the purchase order or requisition approval workflow during its execution.

1. In order to see the errors via the application, log in as the preparer or document owner and go to the worklist to review the 'Document manager failed' notification. This is an example of one notification sent to the preparer after a document manager exception, with the additional error message highlighted.

If needed, use this script to identify the owner of the document manager notification for a specific document:

     select recipient_role, subject from wf_notifications
     where status = 'OPEN'
     and message_type = 'POERROR'
     and message_name = 'DOC_MANAGER_FAILED'
     and subject like '%&document_number%';



2. In order to see the errors via SQL*Plus, follow these instructions to obtain the value of the SYSADMIN_ERROR_MSG error message for a specific workflow:

2.1. Identify the workflow item type and item key for the document.

Requisition:

     SQL > select hr.name, prh.segment1, prh.wf_item_type, prh.wf_item_key
     from po_requisition_headers_all prh,
     hr_all_organization_units hr
     where prh.org_id = hr.organization_id and
     prh.segment1 = '&Enter_Req_Number';


Purchase Order:

     SQL > select hr.name, poh.segment1, poh.wf_item_type, poh.wf_item_key
     from po_headers_all poh,
     hr_all_organization_units hr
     where poh.org_id = hr.organization_id and
     poh.segment1 = '&Enter_PO_Number';


Purchase Order Release:

     SQL > select hr.name, poh.segment1, por.release_num, por.wf_item_type, por.wf_item_key
     from po_headers_all poh,
     po_releases_all por,
     hr_all_organization_units hr
     where poh.org_id = hr.organization_id and
     por.org_id = poh.org_id and
     poh.po_header_id = por.po_header_id and
     poh.segment1 = '&Enter_PO_Number' and
     por.release_num = '&Enter_Release_Num';


2.2. Run this script using the values retrieved from step 2.1 to see the SYSADMIN_ERROR_MSG value:

     select wiav.name attr_name,
     substr(nvl(wiav.text_value, nvl(to_char(wiav.number_value),to_char(wiav.date_value,'DD- MON-YYYY hh24:mi:ss'))),1,300) value
     from wf_item_attribute_values wiav,
     wf_item_attributes wia
     where wiav.item_type = '&item_type'
     and wiav.item_key = '&item_key'
     and wia.item_type = wiav.item_type
     and wia.name = wiav.name
     and wiav.name = 'SYSADMIN_ERROR_MSG'
     and wia.type <> 'EVENT';


The second column will display additional error messages. For the previous example, the result is as follows:

SYSADMIN_ERROR_MSG
po.plsql.PO_DOCUMENT_ACTION_AUTH.approve:60:po_req_supply returned false - po.plsql.PO_DOCUMENT_ACTION_PVT.do_action:110:unexpected error in action call



Most common issues for Release 12 and 12.1




Message name (sysadmin error message)

Workflow activity/Package

Comprenhensive list of known issues

Null (sysadmin error message is null)

Error might occur in any package that calls the document manager


po.plsql.PO_DOCUMENT_ACTION_AUTH.approve:60:po_req_supply returned false -
po.plsql.PO_DOCUMENT_ACTION_PVT.do_action:110:unexpected error in action call.

APPROVE_DOC (Approve the PO)
APPROVE_REQ (Approve the Requisition)
PO_REQAPPROVAL_ACTION.APPROVE_DOC


po.plsql.PO_DOCUMENT_ACTION_AUTH.reject:210:po_req_supply returned false -
po.plsql.PO_DOCUMENT_ACTION_PVT.do_action:110:unexpected error in action call

REJECT_DOC (Reject The PO)
PO_REQAPPROVAL_ACTION.REJECT_DOC


po.plsql.PO_DOCUMENT_ACTION_CLOSE.auto_update_close_status:30:100 ORA-01403: no data found
po.plsql.PO_DOCUMENT_ACTION_CLOSE.auto_close_po:120:unexpected error in updating closed status -
po.plsql.PO_DOCUMENT_ACTION_PVT.do_action:110:unexpected error in action call

OPEN_DOC_STATE (Open document state)
PO_REQAPPROVAL_ACTION.OPEN_DOC_STATE


po.plsql.DOCUMENT_ACTION_CHECK.authority_checks_setup:40:100ORA-01403: no data found - po.plsql.PO_DOCUMENT_ACTION_CHECK.authority_check:20:unexpected error in authority_checks_setup -
po.plsql.PO_DOCUMENT_ACTION_PVT.do_action:110:unexpected error in action call

VERIFY_APPROVER_AUTHORITY (Does Approver Have Authority?)
PO_REQAPPROVAL_ACTION.VERIFY_AUTHORITY



How to retry the workflow for documents Stuck in Pre-Approved or In Process Status
Follow instructions in Note 312582.1 'How To Resubmit a Document For Approval When the Document is IN PROCESS Due To PO Document Approval Manager Errors' to retry affected workflows.


========================================================================

Standard Purchase Order Approval fails with error:ORA-01732: data manipulation operation not legal on this view (Doc ID 2224416.1)



Applies to:


Oracle Purchasing - Version 12.2.6 and later
Information in this document applies to any platform.


Symptoms


Standard Purchase Order approval fails with :

ERROR
-----------------------
Wf_Engine_Util.Function_Call(PO_REQAPPROVAL_ACTION.OPEN_DOC_STATE, POAPPRV, 34029-34187, 312774, RUN)


Errored Activities

Activity (Display Name): OPEN_DOCUMENT_STATE (Open Document State)
Result: #EXCEPTION
Error_Name: 1
Error_Message: User-Defined Exception
Error_Stack: Wf_Engine_Util.Function_Call(PO_REQAPPROVAL_ACTION.OPEN_DOC_STATE, POAPPRV, 34050-34305, 322879, RUN)


SYSADMIN_ERROR_MSG :
po.plsql.PO_DOCUMENT_ACTION_CLOSE.auto_update_close_status:210:-1732
ORA-01732: data manipulation operation not legal on this view -
po.plsql.PO_DOCUMENT_ACTION_CLOSE.auto_close_po:120:unexpected error in updating closed status
po.plsql.PO_DOCUMENT_ACTION_PVT.do_action:110:unexpected error in action call



Changes


 Upgrade to Release 12 environment.


Cause


The issue is caused by a new feature in Release 10gR2 and onward of the Database.

As there are VPD/RLS (security) policies on table/view/synonym referenced, the policies generate a transient view in place of the object name. Optimizer then checks at the time of view merging for the ownership of the different views and if it finds any differences, it raises ORA-1732.

This issue is described in RDBMS internal Bug 4670249 APPS:UNABLE TO UPDATE A TABLE WITH VPD GETTING ORA-1732
- closed as 'Not a bug' by Development with an explanation that this feature exists in database version 10GR2 and onward.



Solution


To implement the solution, execute either recommendation 1 or 2.
Doing both should not be necessary.


Recommendation 1:
Update the init.ora parameter to a value of 'False':
'optimizer_secure_view_merging = FALSE'
a) This can be done by editing the init.ora file which typically requires bouncing the database when completed
b) or the session can be altered by running this SQL: SQL> alter system set optimizer_secure_view_merging=false;


Recommendation 2:
Modify GRANT privileges to Apps: GRANT MERGE ANY VIEW TO <username>;'
privilege to go back to 10gR1 behavior.

Once the recommendation has been chosen that is appropriate for the business, relaunch requisition import and Migrate the solution as appropriate to other environments.


Comments

Popular posts from this blog

How to setup and use AME - Approval Management Engine

Approval Management Engine - AME For Purchase Requisition Approvals Purchase Requisitions can be routed for approval using the AME Approval Management Engine. This whitepaper describes how to setup AME for use with requisition approvals, and shows how a requisition approval list is built based on the AME setup. Approvers in the AME based approver list are assigned to the requisition based on the AME rules setup for the Purchase Requisition Approval transaction. Similar setup can be done for Requester Change Order Approval and for Internal Requisition Approval, although those are not specifically covered in this whitepaper. The screenshots provided are based on 11i.AME.B, and some of the navigation details are specific to 11i.AME.B. However, most of the details provided are applicable to 11i.AME.A and higher including R12. Assign AME Roles and Responsibilities AME responsibilities in 11i.AME.A are assigned directly to the users. However, In R12 or 11i.AME.B and higher, AME respons

How to compile all INVALID objects in Oracle

There are five ways to recompile invalid objects in schema. DBMS_DDL DBMS_UTILITY UTL_RECOMP UTLRP.SQL Manually Recompile > Best Approach 1. DBMS_DDL This procedure is equivalent to the following SQL statement: ALTER PROCEDUREFUNCTIONPACKAGE [.] COMPILE [BODY] Syntax Exec dbms_ddl.alter_compile ( type , schema, name); Type : Must be either PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY or TRIGGER. Schema : Database Username Name : Objects name Example SQL> exec dbms_ddl.alter_compile ('PROCEDURE','SCOTT','TEST'); PL/SQL procedure successfully completed. 2. DBMS_UTILITY This procedure compiles all procedures, functions, packages, and triggers in the specified schema. Syntax Exec dbms_utility.compile_schema ( schema,compile all) Schema : Database Username Compile All : Object type ( procedure, function, packages,trigger) Example SQL> exec dbms_utility.compile_schema('SCOTT'); PL/SQL procedure successfully co

Workflow Important Debug Queries

deq_time is not always populated in WF_DEFERRED. The best way to monitor is to check if there are any READY events select msg_state,count(*) from applsys.aq$wf_deferred  group by msg_state; For getting Item_Type and Display name for Runnable processes. SELECT WFA_ACT.ITEM_TYPE ITEM_TYPE ,   WFA_ACT.NAME PROCESS_NAME ,   WFA_ACT.DISPLAY_NAME DISPLAY_NAME FROM wf_activities_vl wfa_act WHERE wfa_act.runnable_flag = 'Y' AND wfa_act. type            = 'PROCESS' AND sysdate BETWEEN wfa_act.begin_date AND NVL(wfa_act.end_date, sysdate); Query to find records that are pending in each of the workflow agent listener queues SELECT 'select ''' || t.component_name || ' (queue_table: ' || p.queue_table ||        ')''||'' Count: ''||count(*) c from ' || p.owner || '.' || .queue_table ||        ' where deq_time is null and nvl(delay,enq_time)<sysdate-1/24  ||        nvl2(t.correlation_id,