Hello,
In my below command I get this error:
Caused by: java.lang.IllegalStateException: Cannot request current Scope if none is active
@CommandHandler
public void handle(PHACommand cmd, WebClient webClient, ConfigCommandProperties configCommandProperties) {
PHAEvent event = new PHAEvent(cmd.externalId, cmd.internalId, cmd.agreementId);
webClient.post().uri(configCommandProperties.getUrl() + "v1.0/pha")
.contentType(MediaType.APPLICATION_JSON).bodyValue(event).exchange().subscribe(clientResponse -> {
if (clientResponse.statusCode().equals(HttpStatus.OK)) {
AggregateLifecycle.apply(event); // ERROR
} else {
throw new BankDataSyncException();
}
});
}