CommandEntryExtender extender = commandEntryManager.createCommandEntryExtender(oldCommandEntry);
CommandEntry duplicatedCommandEntry = extender.duplicateCommandEntry(newInvocation.getGroup(),mappingSet);
Set<InteractionList> invocations = new TreeSet<InteractionList>();
invocations.add(newInvocation);
duplicatedCommandEntry.setInteractionLists(invocations);
commandEntryManager.create(duplicatedCommandEntry); // also sets the ID for sorting
newCommandEntries.add(duplicatedCommandEntry);
}
newInvocation.setCommandEntries(newCommandEntries);
SmsDbManager smsDbManager = new SmsDbManager(locale,session);
smsDbManager.createInvocation(newInvocation);