sdk-java
sdk-java copied to clipboard
Local Activity asynchronously started at the end of the workflow implementation leads to failure
Expected Behavior
@Override
public void wofklowMethod() {
Async.procedure(activity::execute);
}
An activity scheduled at the end of the workflow code asynchronously without waiting on the promise should be ignored. Alternatively, it may be executed. Such a code shouldn't block workflow completion, it's not an invalid workflow implementation.
Actual Behavior
It leads to
io.grpc.StatusRuntimeException: NOT_FOUND: workflow execution already completed exception on worker with workflow never completing.
Steps to Reproduce the Problem
Unit test: https://github.com/Spikhalskiy/java-sdk/commit/718fe8e794a50188c639e79a6ee47576960ae353
@Spikhalskiy please add to sdk features. Not 100% sure we put it there
Related to #1722