sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

Local Activity asynchronously started at the end of the workflow implementation leads to failure

Open Spikhalskiy opened this issue 3 years ago • 1 comments

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 avatar Jun 25 '22 01:06 Spikhalskiy

@Spikhalskiy please add to sdk features. Not 100% sure we put it there

bergundy avatar Jun 25 '22 03:06 bergundy

Related to #1722

Spikhalskiy avatar Apr 20 '23 18:04 Spikhalskiy