I'm trying to get validation to work in long running conversations:-
@Begin(join=true)
public String findVenues() {
// Utility method, sets up an outjected DataModel
findAll();
// Redirect to result display page
return "displayFoundVenues";
}
public String editVenue() {
// Set the bijected venue to the DataModelSelection
venue = selectedVenue;
// Redirect to edit venue page
return "editVenue";
}
@IfInvalid(outcome=Outcome.REDISPLAY)
@End
public String updateVenue() {
// Clear the venues found in the previous search
venues = null;
// Redirect to the venue search page
return "venueSearch";
}
InvalidStateException: validation failed for: uk.co.splendid.sms.model.venue.Venue
@IfInvalid(outcome=Outcome.REDISPLAY)
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public String updateVenue() {
return "confirm";
}
@End
public String exit() {
venues = null;
return "venueSearch";
}