如何在Java reactor中从以前的flatMap中传递onErrorResume中的参数
我有下面的代码如何在Java reactor中从以前的flatMap中传递onErrorResume中的参数,java,reactor,Java,Reactor,我有下面的代码 .map(agc -> new cTaskServiceCommand(or, agc, request)) .flatMap(command -> cTaskService.cTask(command)) .flatMapMany(event -> Mono.just(event).concatWith(Mono.justOrEmpty(event.getThrowable()).flatMap(Mono::error))) .cast(orEvent.cla
.map(agc -> new cTaskServiceCommand(or, agc, request))
.flatMap(command -> cTaskService.cTask(command))
.flatMapMany(event -> Mono.just(event).concatWith(Mono.justOrEmpty(event.getThrowable()).flatMap(Mono::error)))
.cast(orEvent.class)
.onErrorResume(throwable -> myFactory.createorEvent(or, throwable))
但我想像下面这样将一个参数从命令传递到命令
.onErrorResume(throwable -> myFactory.createorEvent(or, throwable, command.getName()))
我怎样才能做到这一点。需要将参数从上一个flatMap对象传递到onErrorResume