}
campaign.addObjectInstance(oi);
// create a new encounter (facade entity object, object instance)
Encounter enc = new Encounter();
enc.setName(Messages.getString("encounter.common.ui.action.build.encounter.default_name.text"));
enc.setObjectInstance(oi);
// save the instance and template
try {
campaign.save();
oi.save();