Complex flow management by javaconfig