
In this Document
APPLIES TO:Oracle Purchasing - Version 11.5.10 to 12.2 [Release 11.5 to 12.2]IBM AIX on POWER Systems (32-bit) Oracle Solaris on SPARC (32-bit) HP Tru64 UNIX Linux x86 z*OBSOLETE: Microsoft Windows 2000 HP-UX PA-RISC (64-bit) IBM AIX on POWER Systems (64-bit) z*OBSOLETE: IBM AIX 4.3 Based Systems (64-bit) HP-UX PA-RISC (32-bit) Obsolete Linux Intel (64-bit) Oracle Solaris on SPARC (64-bit) PURPOSE
The purpose of this article is to explain the use of the script wfstat and wfretry in order to monitor and retry workflow processes. File wfstat.sql is a script that can be run to determine why a document is stuck. It usually provides the user with information that can be used to resolve the stuck document. Once the problem has been resolved, wfretry can be executed on the stuck document to get it moving through the system again. TROUBLESHOOTING STEPSIn order to run wfstat and wfretry, the user must have access to the APPS schema.
Running WFSTAT and WFRETRYInstructions to run wfstatRun wfstat to determine why a document is stuck in In Process / Pre-Approved or a workflow process has failed. This script comes seeded with the Oracle Applications and can be found in the $FND_TOP/sql directory residing on your database server machine. 1. Login to SQL*Plus in the APPS schema and enter username/password. 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';
3. Run the script and create an output file: 3.1 Start spooling an output file: For example:
Note: The
PO Approval analyzer incorporates the same information as the wfstat.sql script plus other validations to troubleshoot issues with the approval process, including employee authority checks, critical patches, invalid objects, data integrity validations and more. Reference
Note 1525670.1 for instructions to download and run the script.
Instructions to run wfretryWhen a workflow errors, once the cause of the error is resolved, you MUST always resubmit it, the system will not automatically process it again. If you implement the POERROR workflow, it will automatically retry certain document manager errors. Refer to Note:224028.1 - Oracle Purchasing POERROR Workflow Setup and Usage Guide White Paper for implementation details. This script comes seeded with the Oracle Applications and can be found in the $FND_TOP/sql directory residing on your database server machine. 1. Login to SQL*Plus in the APPS schema and enter username/password. 2. Identify the parameter values. The wfretry script requires wf_item_type and wf_item_key. The following scripts will return their values. Run one of the following queries, entering the problematic Purchase Order Number or Requisition Number, (be sure to enclose the number in single quotes): 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';
3. Run the script wfretry with the following parameters: a- wf_item_type (retrieved from above script) b- wf_item_key (retrieved from above script) c- Label: The label field is used to call the workflow startup process for the document type in question. This can be located in the Oracle Purchasing application. Responsibility Purchasing Super User: Navigation: Setup -> Purchasing -> Document Types
Alternate retry method
SQL> exec wf_engine.handleError('&WF_ITEM_TYPE','&WF_ITEM_KEY'); Responsibility System Administrator: Navigation: Sysadmin -> Request -> Run Set the parameters Instructions to run wfstat for Createpo workflow
select requisition_header_id
from po_requisition_headers_all where segment1 = '&Enter_Req_Number' and org_id = &org_id;
select item_type, Item_key
from wf_items where item_key like '&REQ_HDR_ID'||'%' and item_type='CREATEPO' and root_activity = 'OVERALL_AUTOCREATE_PROCESS';
select item_type, Item_key
from wf_items where parent_item_type='CREATEPO' and parent_item_key = '&WF_ITEM_KEY';
SQL> @wfstat <item_type> <item_key>
Note: An alternate method to obtain the workflow data for createpo workflow is through the data collection script from
CREATEPO Workflow - Data Collection Script
Note 1415918.1.
Instructions to run wfstat for Account Generator Workflow
Account Generator: Purge Runtime Data = NO Still Have Questions?
|