if (log.isDebugEnabled())
log.debug("The task was canceled by the user, so now calling " + nextPageForCancelController());
nextPageResponse = nextPageForCancelController().performAction();
} else if (taskResult instanceof Exception) {
// Invoke error controller
IERXPerformWOActionForResult errorController = nextPageForErrorController();
errorController.setResult(_result);
if (log.isDebugEnabled())
log.debug("The task had an error, so now calling " + errorController);
nextPageResponse = errorController.performAction();
} else {
// Invoke the expected result controller
if (log.isDebugEnabled())
log.debug("The task completed normally. Now setting the result, " + taskResult
+ ", and calling " + nextPageForResultController());