FactPattern factPattern = new FactPattern();
factPattern.setFactType( "Person" );
factPattern.setBoundName( "$p" );
m.lhs = new IPattern[]{ factPattern };
ActionUpdateField auf1 = new ActionUpdateField();
auf1.setVariable( "$p" );
ActionFieldValue afv1 = new ActionFieldValue();
afv1.setField( "name" );
afv1.setType( DataType.TYPE_STRING );
afv1.setNature( FieldNatureType.TYPE_LITERAL );
afv1.setValue( "Fred" );
auf1.setFieldValues( new ActionFieldValue[]{ afv1 } );
ActionSetField asf = new ActionSetField();
asf.setVariable( "$p" );
ActionFieldValue afv2 = new ActionFieldValue();
afv2.setField( "gender" );
afv2.setType( DataType.TYPE_STRING );
afv2.setNature( FieldNatureType.TYPE_LITERAL );
afv2.setValue( "X" );
asf.setFieldValues( new ActionFieldValue[]{ afv2 } );
ActionUpdateField auf2 = new ActionUpdateField();
auf2.setVariable( "$p" );
ActionFieldValue afv3 = new ActionFieldValue();
afv3.setField( "age" );
afv3.setType( DataType.TYPE_NUMERIC_INTEGER );
afv3.setNature( FieldNatureType.TYPE_LITERAL );
afv3.setValue( "55" );
auf2.setFieldValues( new ActionFieldValue[]{ afv3 } );
m.rhs = new IAction[]{ auf1, asf, auf2 };
m.name = "my rule";