P. 1
XML in iProcurement

XML in iProcurement

|Views: 225|Likes:
Published by francy_raj2556

More info:

Published by: francy_raj2556 on Aug 24, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

04/20/2014

pdf

text

original

The overall Oracle PO XML functionality is a workflow-based process with a parent
process (POXML) and 2 child processes (POXMLSETUP and POXMLSEND) in the
workflow. POXML is the item type and it has 2 processes POXMLSETUP and
POXMLSEND in poxmlwf.wft. These PO XML workflows then essentially utilize
Oracle's Workflow Business Events based system to place the XML documents in an
outbound queue where a java servlet called the Oracle Transport Agent (OTA) picks up the
document and sends it to a trading partner via an established protocol (typically HTTP,
HTTPS or SMTP).

When troubleshooting PO XML issues, it is important to remember that the overall process
is performed in a chronologically sequential fashion. The purpose of this troubleshooting
treatise is to identify the progress and results of each of the sequential steps when utilizing
PO XML processes.

Step 1: The PO is
submitted for
approval running

POAPPRV

Confirm the Purchase Order is Approved and XML event created by setting the debug
and checking the wfstatus for POAPRV (seeded workflow file poxwfpoa.wft):

WFSTATUS: Get the proper values for the ITEM_TYPE and the ITEM_KEY by
replacing &PO_NUMBER below with the actual PO number.
SQL> col wf_item_key format a20

SELECT org_id, po_header_id, wf_item_type, wf_item_key
FROM po_headers_all
WHERE segment1 = '&PO_NUMBER';

Download from Metalink scripts bde_wf_item.sql (Note: 187071.1) and from sqlplus as
the user APPS run the script passing the Workflow Item Type and Workflow Item Type
values obtained in the output above.
example : SQL>@bde_wf_item.sql
Please enter ITEM_TYPE:
Please enter ITEM_KEY:

Then rename the output from bde_wf_item.lst to bde_wf_item_.lst.

Check the output for any apparent errors related to the XML. Confirm the Purchase
Order was approved successfully, and there are end dates. Check relevant workflow
attributes, including but not limited to:
ECX_PARTY_ID, ECX_PARTY_SITE_ID, XML_EVENT_KEY,
ECX_DEBUG_LEVEL (for proper debugging), ECX_DOCUMENT_ID
(po_header_id), etc.

In 115.10 the ECX_DEBUG_LEVEL event parameter will no longer be honored.
XML/Log files will now be stored in the FND_LOG_ATTACHMENTS table
(message_text field). ECX_UTL_LOG_DIR will no longer be used for writing XML
log files. See Note 359452.1 for more information.

See Appendix A of this document for an example of bde_wf_item for POAPPRV.

13

Step 2: Workflow
POXML
(Setup and
Send) is run.

Get the bde_wf_item.sql output for POXML, Setup and Send events (seeded workflow
file poxmlwf.wft):

a) Get results of workflow POXML / POXMLSETUP

i)

Checking the output from Step1 above, find the value for

XML_EVENT_KEY attribute.

ii)

Then run bde_wf_item.sql again and pass Item Type as POXML and Item
Key as the value obtained for XML_EVENT_KEY

Using the results, check the following activities and attributes (including but not limited
to the following):
-Ensure the child process is end dated
-Verify the ECX_EVENT_NAME attribute
-Check the following ECX attributes:
ECX_PARTY_ID, ECX_PARTY_SITE_ID, ECX_PARTY_TYPE
(S-supplier, C- customer), ECX_TRANSACTION_SUBTYPE,
ECX_TRANSACTION_TYPE (PO)
-Ensure that the "Raise XML PO event" completes

See Appendix B of this document for an example of bde_wf_item for POXML Setup
and Send.

b) Get the results of workflow POXML / POXMLSEND
iii)

Checking the output from Step a above (POXML / POXMLSETUP),
again find the value for the XML_EVENT_KEY attribute.

iv)

Then rerun bde_wf_item.sql again and pass Item Type as POXML and
Item Key as the value obtained for the XML_EVENT_KEY
Using these results verify the following data:
-Verify the POXMLSEND is end dated
-Ensure in the POXMLSEND workflow that the WF_SEND activity has
COMPLETE and has a Result status of ECX_OXTA_SUCCESS
-Note the ECX Document Numbers session and the corresponding logfile
and out_msgid file (this is the message payload id)

See Appendix C of this document for an example of bde_wf_item for POXML.

Step 3:

XML Gateway
Generates
the
Payload

Message is
Enqueued for
Sending.

1. As part of the workflow calls made from Purchasing (POXML) the XML Gateway
module generates the XML payload document.

a) for 11.5.9 and lower:
Do the following queries from sqlplus connected as the APPS user to turn on the
debugger:

update applsys.wf_item_attributes
set text_default = '3'
where item_type = 'POXML' and name = 'ECX_DEBUG_LEVEL'

b) Debug for 11.5.10:
See Doc ID 300298.1 - How Has XML Gateway Logging Changed In 11.5.10 ?
and reference Doc ID 359452.1 - How To Get The Log Files For Troubleshooting
XML Transactions

The debug logfile (named like: OAGOUTPOPRO.log) is similar to a stack
trace. See Appendix D for an example of the log file.

Check the bottom of the logfile for any errors or problems. Review the
ECX_DOCLOGS, check the WF_INFO, EVENT_NAME, and most importantly the
STATUS.

14

See an example of the XML in Appendix E of this document.

Note: Remember to turn off the debugger as may affect performance.

2. To verify the Agent Listener is running:
SELECT a.NAME AGENT_NAME , s.NAME SYSTEM_NAME, a.status STATUS
FROM WF_AGENTS a, WF_SYSTEMS s
WHERE a.system_guid = s.guid
AND a.name like 'ECX%'

3. Once generated, the Workflow Agent enqueues the message into the
ECX_OUTQUEUE table for sending.

Use following to check queue for message: SQL> select * from ecx_outqueue

Also review the generation logfile and check ECX_OUTBOUND_LOGS section,
ensure the message = ECX_MSG_CREATED_ENQUEUED
Problems in dequeue will be written to either database alert.log, or the default OTA
logfile (commonly apache error_log).

Step 4: XML is sent
by OTA
to SupplierThe XML document is then picked up by the Oracle Transport Agent (OTA) and sent

to the Supplier.

Review tables the ECX_EXTERNAL_LOGS and ECX_OXTA_LOGMSG for the
OTA handling:

SQL> Select * from ecx_oxta_logmsg where sender_message_id = ‘YourMessageID’

To enable debugging mode set the parameter -DOXTALogDebugMsg = true in
jserv.properties (for 11i10 in xmlsvcs.properties). This will write to the iAS / Apache
error_log file.
Also quick check its running using: http://[url:port]/OA_HTML/US/ECXOTAPing.htm

15

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->