sfc1.setFieldName( "field1" );
sfc1.setFieldType( DataType.TYPE_STRING );
sfc1.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
sfc1.setValue( "$f1" );
sfc1.setOperator( "==" );
p1.addConstraint( sfc1 );
FactPattern p2 = new FactPattern( "Person" );
SingleFieldConstraint sfc2 = new SingleFieldConstraint();
sfc2.setFieldName( "field2" );
sfc2.setFieldType( DataType.TYPE_STRING );