Skip to content

DurableTasks: Warning when workflow started outside of the SDK context #1378

Description

@salaboy

Expected Behavior

Not sure, but at least the warning should be more clear about why it is failing on the durable task side.

Actual Behavior

You start a Java application with some workflows registered, but instead of using the application to create a new instance, you send a curl request to the Dapr API to start a new workflow instance.

In that situation, because the App doesn't have started the workflow and probably don't have the context, durable task framework prints this warning:

2025-05-16T15:28:17.408+01:00  WARN 20378 --- [pool-3-thread-1] io.dapr.durabletask                      : The orchestrator failed with an unhandled exception: java.lang.NullPointerException: Cannot invoke "io.dapr.durabletask.TaskOrchestrationFactory.create()" because "factory" is null

Release Note

RELEASE NOTE:

Activity

  1. salaboy commented on May 16, 2025

    @salaboy
    ContributorAuthor

    Related to: #1357

  2. salaboy commented on May 16, 2025

    @salaboy
    ContributorAuthor

    After further inspection, the Warning only appears if you call a Workflow that is not registered or use the wrong name of the workflow. I think the only action item here is to refine the Warning message on the durable-task.

  3. salaboy commented on May 17, 2025

    @salaboy
    ContributorAuthor

    One thing to try here is to add a log line here: https://github.com/dapr/durabletask-java/blob/main/client/src/main/java/io/dapr/durabletask/TaskOrchestrationExecutor.java#L62 to evaluate if the context is null and mention that there is no context associated with the workflow that you are trying to execute, because it doesn't exist. But this is all handled in the SDK code.

    As mentioned before, this will not happen if all the requests come from an application that is using the SDK

  4. siri-varma commented on May 19, 2025

    @siri-varma
    Contributor

    @salaboy I can look at this.

  5. siri-varma commented on May 19, 2025

    @siri-varma
    Contributor

    /assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

durabletaskwork for dapr/durabletask-javakind/bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions