diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md index c7aebca4e9e..3caeddad25f 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md @@ -496,9 +496,8 @@ public class MonitorWorkflow extends Workflow { } // Put the workflow to sleep until the determined time - // Note: ctx.createTimer() method is not supported in the Java SDK yet try { - TimeUnit.SECONDS.sleep(nextSleepInterval.getSeconds()); + ctx.createTimer(nextSleepInterval); } catch (InterruptedException e) { throw new RuntimeException(e); } @@ -745,4 +744,4 @@ External events don't have to be directly triggered by humans. They can also be - Try out the following examples: - [Python](https://github.com/dapr/python-sdk/tree/master/examples/demo_workflow) - [.NET](https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow) - - [Java](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows) \ No newline at end of file + - [Java](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows)