RuleModel model = new RuleModel();
model.name = "rule2";
FactPattern pattern = new FactPattern( "Person" );
pattern.boundName = "p";
ActionSetField action = new ActionSetField( "p" );
ActionFieldValue value = new ActionFieldValue( "age",
"42",
SuggestionCompletionEngine.TYPE_NUMERIC );
action.addFieldValue( value );
model.addLhsItem( pattern );
model.addRhsItem( action );
DSLSentence dslCondition = new DSLSentence();
dslCondition.sentence = "This is a sentence";
model.addLhsItem( dslCondition );
DSLSentence dslAction = new DSLSentence();
dslAction.sentence = "say {42}";
model.addRhsItem( dslAction );
rule1.updateContent( BRXMLPersistence.getInstance().marshal( model ) );
rule1.checkin( "" );
repo.save();
//now add a rule with no DSL
model = new RuleModel();
model.name = "ruleNODSL";
pattern = new FactPattern( "Person" );
pattern.boundName = "p";
action = new ActionSetField( "p" );
value = new ActionFieldValue( "age",
"42",
SuggestionCompletionEngine.TYPE_NUMERIC );
action.addFieldValue( value );
model.addLhsItem( pattern );
model.addRhsItem( action );
AssetItem ruleNODSL = pkg.addAsset( "ruleNoDSL",