File tree 1 file changed +2
-3
lines changed
daprdocs/content/en/developing-applications/building-blocks/workflow
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -496,9 +496,8 @@ public class MonitorWorkflow extends Workflow {
496
496
}
497
497
498
498
// Put the workflow to sleep until the determined time
499
- // Note: ctx.createTimer() method is not supported in the Java SDK yet
500
499
try {
501
- TimeUnit . SECONDS . sleep (nextSleepInterval. getSeconds() );
500
+ ctx . createTimer (nextSleepInterval);
502
501
} catch (InterruptedException e) {
503
502
throw new RuntimeException (e);
504
503
}
@@ -745,4 +744,4 @@ External events don't have to be directly triggered by humans. They can also be
745
744
- Try out the following examples:
746
745
- [ Python] ( https://github.com/dapr/python-sdk/tree/master/examples/demo_workflow )
747
746
- [ .NET] ( https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow )
748
- - [ Java] ( https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows )
747
+ - [ Java] ( https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows )
You can’t perform that action at this time.
0 commit comments