12.5. Pattern Binding with Variable Example

This is what pattern binding using a variable looks like:
rule ...
when
    $p : Person()
then
    System.out.println( "Person " + $p );
end

Note

The prefixed dollar symbol ($) is not mandatory.