@@ -160,6 +160,7 @@ Java sample isn't available yet.
160160This code shows an orchestrator that calls three activities in sequence and passes each output to the next activity:
161161
162162``` csharp
163+ using System .Threading .Tasks ;
163164using Microsoft .DurableTask ;
164165
165166[DurableTask ]
@@ -246,7 +247,10 @@ This sample is shown for .NET, JavaScript, Java, and Python.
246247The following code shows an orchestrator that calls three activities in sequence:
247248
248249``` java
249- import com.microsoft.durabletask.* ;
250+ import com.microsoft.durabletask.DurableTaskGrpcWorker ;
251+ import com.microsoft.durabletask.DurableTaskSchedulerWorkerExtensions ;
252+ import com.microsoft.durabletask.TaskOrchestration ;
253+ import com.microsoft.durabletask.TaskOrchestrationFactory ;
250254
251255DurableTaskGrpcWorker worker = DurableTaskSchedulerWorkerExtensions . createWorkerBuilder(connectionString)
252256 .addOrchestration(new TaskOrchestrationFactory () {
@@ -367,6 +371,7 @@ Java sample coming soon.
367371Activities in the Durable Task SDK inherit from ` TaskActivity<TInput, TOutput> ` :
368372
369373``` csharp
374+ using System .Threading .Tasks ;
370375using Microsoft .DurableTask ;
371376using Microsoft .Extensions .Logging ;
372377
@@ -461,7 +466,8 @@ This sample is shown for .NET, JavaScript, Java, and Python.
461466Activities in Java are defined using ` TaskActivityFactory ` :
462467
463468``` java
464- import com.microsoft.durabletask.* ;
469+ import com.microsoft.durabletask.TaskActivity ;
470+ import com.microsoft.durabletask.TaskActivityFactory ;
465471
466472.addActivity(new TaskActivityFactory () {
467473 @Override
@@ -583,6 +589,7 @@ Start an orchestration from a client application. The client schedules the orche
583589# [ C#] ( #tab/csharp )
584590
585591``` csharp
592+ using System ;
586593using Microsoft .DurableTask .Client ;
587594
588595// Create the client
@@ -655,7 +662,7 @@ print(f"Started orchestration with ID: {instance_id}")
655662# Wait for the orchestration to complete
656663result = client.wait_for_orchestration_completion(instance_id, timeout = 60 )
657664
658- if result and result.runtime_status == OrchestrationStatus. COMPLETED :
665+ if result and result.runtime_status == " COMPLETED" :
659666 print (f " Orchestration completed with result: { result.serialized_output} " )
660667```
661668
@@ -668,7 +675,11 @@ This sample is shown for .NET, JavaScript, Java, and Python.
668675# [ Java] ( #tab/java )
669676
670677``` java
671- import com.microsoft.durabletask.* ;
678+ import java.time.Duration ;
679+
680+ import com.microsoft.durabletask.DurableTaskClient ;
681+ import com.microsoft.durabletask.NewOrchestrationInstanceOptions ;
682+ import com.microsoft.durabletask.OrchestrationMetadata ;
672683import com.microsoft.durabletask.azuremanaged.DurableTaskSchedulerClientExtensions ;
673684
674685// Create the client
0 commit comments