Forum Stats

  • 3,824,779 Users
  • 2,260,417 Discussions
  • 7,896,310 Comments

Discussions

We are trying to pass a query in BPM rule to fetch approvers but it is not getting accepted

We are trying to pass below query in BPM rule to fetch approvers but it is not getting accepted , and an error thrown .


oraext:query-database(concat("SELECT pu.username Approver FROM hz_ref_entities MRE ,per_users pu WHERE 1 = 1 AND UPPER(MRE.attribute_category) = upper('Procurement_Approval_Matrix_C') AND upper(pu.username) = upper(MRE.EXTN_ATTRIBUTE_CHAR011) AND MRE.EXTN_ATTRIBUTE_CHAR007 = 'US ABC' AND MRE.EXTN_ATTRIBUTE_NUMBER008 <= (SELECT SUM(prl.amount) req_total FROM por_requisition_lines_all prl,por_requisition_headers_all prh WHERE 1=1 AND PRH.requisition_header_id = PRL.requisition_header_id AND prh.REQUISITION_HEADER_ID = ",$Task/task:task/task:payload/ns1:findReqHeaderDimensionResponse/ns1:result/ns2:RequisitionHeaderId," AND NVL(prl.LINE_STATUS, 'N') <> 'CANCELED' AND prl.amount is not null GROUP BY prh.REQUISITION_HEADER_ID) ORDER BY MRE.EXTN_ATTRIBUTE_NUMBER006"),false(),false(),"jdbc/ApplicationDBDS")



Error : RUL-05580: syntax error for token "(" at column "777"



Can any one please help on the above issue