Here's the complete code for this scenario solution:
// ...
public SomeEntityKey createSomeEntityDetails(
final SomeEntityDetails details)
throws AppException, InformationalException {
// create an instance of the return struct
final SomeEntityKey key = new SomeEntityKey();
// create a new entity instance
final SomeEntity someEntity = someEntityDAO.newInstance();
// map the details
someEntity.setName(details.details.name);
final DateRange dateRange =
new DateRange(details.details.startDate,
details.details.endDate);
someEntity.setDateRange(dateRange);
// ...more mappings
// do the insert
someEntity.insert();
// map the key assigned
key.someEntityID = someEntity.getID();
// return to the client
return key;
}
// ...
Note that there is no call to TransactionInfo.getInformationalManager().failOperation() - the entity insert operation takes care of all error handling.