I not 100% sure about this (because I haven't tried it myself) but here is my suggestion for -
Check this out Dealing Gracefully with ViewExpiredException in JSF2.
if (t instanceof ViewExpiredException) {
ViewExpiredException vee = (ViewExpiredException) t;
At this point you can get the view id
as follows -
vee.getViewId();
And then based on the view id
do the desired navigation.
NavigationHandler nh = facesContext.getApplication().getNavigationHandler();
//check condition, set view
nv.handleNavigation(facesContext, null, "/view-id?faces-redirect=true");
facesContext.renderResponse();
Or, I think you could also do -
FacesContext.getExternalContext().redirect(url);
FacesContext.responseComplete();
to redirect.