if (context != null) { // this is a JSF request
ConversationContext conversationContext = instance(contextId).select(HttpConversationContext.class).get();
if (conversationContext.isActive()) {
Conversation conversation = conversationContext.getCurrentConversation();
if (!conversation.isTransient()) {
path = new FacesUrlTransformer(path, context)
.toRedirectViewId()
.toActionUrl()
.appendConversationIdIfNecessary(conversationContext.getParameterName(), conversation.getId())
.encode();
}