How to get workflow error in case Dynamic SQL Query Using Database Query Function
Summary:
The BPM workflow participants are created with Dynamic SQL Query Using Database Query Function in AP Invoice workflow. When the query does not return the value, the workflow is not giving the error, but skipping the participant and builds the workflow.
Content (please ensure you mask any confidential information):
The SQL queries is as follows:
orcl:query-database-with-bindvar('select listagg(pu.username,'','' ) within group ( order by pu.username ) user_name from fusion.ap_invoices_all aia , fusion.ap_invoice_distributions_all aida, fusion.gl_code_combinations gcc , fusion.hr_organization_information hoi , fusion.per_users pu, fusion.POZ_SUPPLIERS_V POZ where aia.attribute2 = ''No'' and aida.line_type_lookup_code not in (''NONREC_TAX'',''REC_TAX'') and aida.PO_DISTRIBUTION_ID is null and aia.invoice_id = aida.invoice_id and aida.dist_code_combination_id = gcc.code_combination_id and gcc.segment3 = hoi.org_information1 and gcc.segment1 = hoi.org_information3 and hoi.org_information6 = pu.person_id AND POZ.VENDOR_ID=AIA.VENDOR_ID AND hoi.ORGANIZATION_ID = 300000016469376 AND POZ.VENDOR_NAME=:SupplierName AND AIA.INVOICE_NUM=:invNum',true(),true(),'jdbc/ApplicationDBDS',concat('invNum=', /task:task/task:payload/task:invoiceNum,',SupplierName=',/task:task/task:payload/task:supplierName))