You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Approvals Dynamic SQL query using database query is giving XPATH error.

Received Response
edited Jul 12, 2021 9:22PM in Payables, Payments & Cash Management 7 comments


I am trying to extend the dynamic SQL Approval queries for AP Invoices. I tried to pass 2 below BPM task attributes as Invoice Id field.



After, I submitted the Invoice for Approval, its giving me below error (sample for one of above attribute).. 


Can someone validate if I am missing anything in XPATH expression. FYI.. related SQL query is giving me Approver name. ORABPEL-09500 XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is orcl:query-database(concat('select LISTAGG(input_value_constant10, '', '') WITHIN GROUP(ORDER BY INPUT_VALUE_CONSTANT9) approverslist from FUSION.AP_INVOICES_ALL AIA, FUSION.AP_INVOICE_LINES_ALL AILA, FUSION.AP_INVOICE_DISTRIBUTIONS_ALL AIDA, FUSION.GL_CODE_COMBINATIONS GCC, FUSION.XLA_MAPPING_SET_VALUES VS WHERE AIA.INVOICE_ID = AILA.INVOICE_ID AND AILA.INVOICE_ID = AIDA.INVOICE_ID AND AIA.INVOICE_ID = AIDA.INVOICE_ID AND AILA.LINE_NUMBER = AIDA.INVOICE_LINE_NUMBER AND GCC.CODE_COMBINATION_ID = AIDA.DIST_CODE_COMBINATION_ID AND AIA.INVOICE_ID = ',/task:task/task:payload/ns2:getInvoiceHeader1Response/ns2:result/ns1:InvoiceId,' AND VS.MAPPING_SET_CODE like ''PWC_INV_DYNAMIC_APPROVERS'' AND NVL(AIA.ATTRIBUTE1,''NULL'') = NVL(VS.INPUT_VALUE_CONSTANT1,''NULL'') AND GCC.SEGMENT4 BETWEEN NVL(VS.INPUT_VALUE_CONSTANT2,''NULL'') AND NVL(VS.INPUT_VALUE_CONSTANT3,''NULL'') AND NVL(AIA.ATTRIBUTE2,''NULL'') BETWEEN NVL(VS.INPUT_VALUE_CONSTANT4,''NULL'') AND NVL(VS.INPUT_VALUE_CONSTANT5,''NULL'') AND AIA.INVOICE_AMOUNT BETWEEN VS.INPUT_VALUE_CONSTANT6 AND VS.INPUT_VALUE_CONSTANT7 AND AIA.INVOICE_ID =',/task:task/task:payload/ns2:getInvoiceHeader1Response/ns2:result/ns1:InvoiceId) ,true(),true(),'jdbc/ApplicationDBDS'). The XPath expression failed to execute;

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!