Child of a Child Workflow

Hi
I have following scenario:

Parent workflow–> Child workflow–> Child of Child workflow

I am calling both Child and Child of Child workflow using child workflow stub

    ChildWorkflowOptions childWorkflowOptions =
            ChildWorkflowOptions.newBuilder()
                    .setWorkflowId("childWorkflow-").build();
    ChildofChildWorkflow child = Workflow.newChildWorkflowStub(ChildofChildWorkflow.class, childWorkflowOptions);

However, I am getting the following exception:

java.lang.Error: Unknown workflow type “ChildofChildWorkflow”. Known types are [ParentWorkflow, ChildWorkflow]

Please let me know its not possible to use childworkflow stub in Child of Child workflow.

Thanks for the help
Best Regards’
Krishnendu

Hello @Krishnendu_Kunti

that should be fine,

ensure you register the ChildofChildWorkflow in the worker when you create it

worker.registerWorkflowImplementationTypes, it looks like you have only registered ParentWorkflow, ChildWorkflow

let me know if it works.

Antonio

Hi @antonio.perez

Thank you for pointing out.

Best Regards
Krishnendu