Mark,
The post immediately prior to this has been edited following checking it out in SQL.
The Action and Criteria as they're now stated will work in Aware.
They will work because not closing the open parentheses following 'EXISTS A WHERE (B IN A.B_ra..' indicates that what follows is a subquery which is to use any unclosed (ie. no ")") object prior ('A' at that point) and should evaluate each instance of each prior unclosed object (ie. each instance of A) one by one in the following subquery.. 'EXISTS C WHERE (A IN C.A_ra)'.
Theoretically there could be multiple nested subqueries, each indicated by not closing the parentheses.
It's probably not as efficient as it could be because A has to be first so it is in context for the following subquery, thus all instances of A are evaluated, not just instances of A which are selected in C.
Not closing the parentheses is in effect just like:
Process1
FIND A
Subprocess1
Subprocess1 (Input: A)
FIND B WHERE A IN B.A_ra
..in that each instance of A will be evaluated one at a time in the subprocess.
It could be made more efficient so only instances of A which are Peer to the current instance of C are evaluated.
However, this would require a Reference Attribute (multiple/Peer) in A for C and in B for A.
If there were, then the guts of the statement would change to:
...B WHERE NOT(EXISTS A WHERE (C IN A.C_ra AND EXISTS B WHERE (A IN B.A_ra)))
..ie., instances of A to which the current Instance of C is a Peer will be passed one by one to the subquery, which will return instances of B to which A is a Peer.