Skip to content

Probably rewrite workflow example for better understanding #944

@kaibocai

Description

@kaibocai

Describe the proposal

I am reading the workflow example and find it a little bit messy due to combining all APIs in a single workflow example. I was wondering should we separate the single huge workflow into several examples, each giving a more concrete example of a set of APIs. This may help user to better understand it.

Also continueAsNew API has a break change with the release here https://github.com/microsoft/durabletask-java/releases/tag/1.2.0. It will not continue executing logic after it (an exception is thrown out in the durabletask SDK to force yield control back to the sidecar). So example here

if (shouldComplete) {
ctx.getLogger().info("Child-Workflow> Calling ChildWorkflow...");
var childWorkflowInput = "Hello ChildWorkflow!";
var childWorkflowOutput =
ctx.callSubWorkflow(DemoSubWorkflow.class.getName(), childWorkflowInput, String.class).await();
ctx.getLogger().info("Child-Workflow> returned: " + childWorkflowOutput);
ctx.getLogger().info("Workflow finished");
ctx.complete("finished");
return;
}
will never be triggered once upgrade durabletask-java to v1.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions