Thanks very much Wolfgang - that was clumsy of me!

I corrected a couple of other errors, my code now runs, but does not work.
Am I approaching this correctly?

rule "Patient Access Rule"
        when
                #conditions
                RqTargetType( $subjectAttribs : rqAttribs )
                RqAttrib (attribType == "subject", designator == 
"subject.role", 
                        attribValue == "patient") from $subjectAttribs  
                RqAttrib (attribType == "subject", designator == "subject.id",
                        $subjectId: attribValue) from $subjectAttribs
                
                $resource: RqTargetType( )
                RqAttrib (attribType == "resource", designator == 
"resource.patient", 
                        attribValue == $subjectId ) from 
$resource.getRqAttribs()
                RqAttrib (attribType == "resource", designator == 
"resource.id", 
                        $resourceId: attribValue ) from $resource.getRqAttribs
        then 
                #actions
                System.out.println( "resource: " + $resourceId );
                System.out.println( "subject: " + $subjectId );
                System.out.println( "Patient Access rule decision: Permit" );
                decisions.add("Permit");
end

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Matching-items-based-on-values-in-lists-tp1075556p1076024.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to