code: public Object thenApply(InvocationContext ctx, VisitableCommand command,
                                      InvocationSuccessFunction function) {
        return addCallback(ctx, command, function);
     }
docs: After the current stage completes successfully, invoke {@code function} and return its result.
  
  The result may be either a plain value, or a new {@link InvocationStage}.