}
public void afterPhase(PhaseEvent phaseEvent) {
log.fine("After phase " + phaseEvent.getPhaseId().toString());
final FacesContext facesContext = phaseEvent.getFacesContext();
final JbpmJsfContextImpl jbpmJsfContext = getJbpmJsfContext(facesContext);
if (jbpmJsfContext != null) {
if (facesContext.getResponseComplete()) {
// No matter what phase, context should be closed.
closeContext(jbpmJsfContext);
removeJbpmJsfContext(facesContext);