Skip to content

Workflow.getWorkflowExecution fails if stub created via Workflow.newExternalWorkflowStub  #1237

@tsurdilo

Description

@tsurdilo
      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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions