Skip to content

Commit c9deaba

Browse files
committed
update namespaces
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 115d25e commit c9deaba

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

articles/azure-functions/durable/durable-functions-sequence.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Java sample isn't available yet.
160160
This 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;
163164
using Microsoft.DurableTask;
164165

165166
[DurableTask]
@@ -246,7 +247,10 @@ This sample is shown for .NET, JavaScript, Java, and Python.
246247
The 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

251255
DurableTaskGrpcWorker worker = DurableTaskSchedulerWorkerExtensions.createWorkerBuilder(connectionString)
252256
.addOrchestration(new TaskOrchestrationFactory() {
@@ -367,6 +371,7 @@ Java sample coming soon.
367371
Activities in the Durable Task SDK inherit from `TaskActivity<TInput, TOutput>`:
368372

369373
```csharp
374+
using System.Threading.Tasks;
370375
using Microsoft.DurableTask;
371376
using Microsoft.Extensions.Logging;
372377

@@ -461,7 +466,8 @@ This sample is shown for .NET, JavaScript, Java, and Python.
461466
Activities 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;
586593
using 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
656663
result = 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;
672683
import com.microsoft.durabletask.azuremanaged.DurableTaskSchedulerClientExtensions;
673684

674685
// Create the client

0 commit comments

Comments
 (0)