Custom BPM rule query
Summary:
We are creating BPM rule using custom SQL Query to get the Project Owner as Approver when we raise a Requisition
Content (please ensure you mask any confidential information):
Version (include the version you are using, if applicable): 22D
Code Snippet (add any code snippets that support your topic, if applicable): I have created following custom Query to get the Project Owner(Customer Project role) as pre approver. Can you please review and advice on the syntax of below Query
orcl:query-database( (SELECT ppn.full_name FROM por_requisition_lines_all pla, por_req_distributions_all pda, pjt_project_resource ppr, PJF_PROJECTS_ALL_B ppav,PER_PERSON_NAMES_F ppn WHERE pda.requisition_line_id = pla.requisition_line_id AND pda.pjc_project_id = ppr.project_id AND ppav.PROJECT_ID =ppr.PROJECT_ID and ppr.person_id = ppn.person_id AND ppr.person_id IS NOT NULL * and project_role_id = 300000062743067 and ppav.PROJECT_STATUS_CODE = 'ACTIVE' and pla.requisition_header_id= ', /task:task/task:payload/ns4:findReqHeaderDimensionResponse/ns4:result/ns2:RequisitionHeaderId ,' ) connect by prior node.PARENT_PK1_VALUE = node.pk1_start_value order by level ) ,true(),true(),'jdbc/ApplicationDBDS')