sdk-java
sdk-java copied to clipboard
Workflow.getWorkflowExecution fails if stub created via Workflow.newExternalWorkflowStub
GreetingWorkflow parentWorkflow = Workflow.newExternalWorkflowStub(GreetingWorkflow.class,
Workflow.getInfo().getParentWorkflowId().get());
Promise<WorkflowExecution> parentExec = Workflow.getWorkflowExecution(parentWorkflow);
throws
Caused by: java.lang.ClassCastException: class io.temporal.internal.sync.ExternalWorkflowStubImpl cannot be cast to class io.temporal.workflow.ChildWorkflowStub (io.temporal.internal.sync.ExternalWorkflowStubImpl and io.temporal.workflow.ChildWorkflowStub are in unnamed module of loader 'app')
per javadoc it should also work with externalworkflow stub