Skip Rule not working
Summary
We have requirement to reject PO's if Item is Revision Controlled and Revision number not exist on Purchase Order/BPAContent
I have created one Rule at pre approval stage and selected rule always applies and setup action to auto reject. From BPM define Skip rule for same participant with below query. But PO's getting auto approved even though Revision number not entered for PO. Can someone help me if the query is correct or not.
orcl:query-database(concat('SELECT count(l.po_line_id) abc FROM po_headers_all h,po_lines_all l,egp_system_items_b e WHERE h.po_header_id = l.po_header_id and l.ITEM_REVISION is null and l.item_id=e.INVENTORY_ITEM_ID and e.organization_id=''300000002012004'' and e.REVISION_QTY_CONTROL_CODE=''1'' AND h.po_header_id =', /task:task/task:payload/task:DocumentId), true(),true(),'jdbc/ApplicationDBDS') = 0
1