Current implementation of StepReporter is way too far from ideal. There is no option to report multi-level steps and it's necessary to finish steps manually each time (inside every agent).
To improve this it is necessary to have a Closable interface implementation, for example:
try(StepReporter.sendStep("Step name")) {
doSomething();
doSomethingElse();
}
Another option is to use lambdas:
StepReporter.sendStep("Step name", () -> {
doSomething();
StepReporter.sendStep("Inner step name", () -> {
doSomethingElse();
});
});
Current implementation of StepReporter is way too far from ideal. There is no option to report multi-level steps and it's necessary to finish steps manually each time (inside every agent).
To improve this it is necessary to have a Closable interface implementation, for example:
Another option is to use lambdas: