Skip to content

Commit b44352c

Browse files
authored
Remove ManualTrigger reference
ManualTrigger has been removed in recent versions of Azure Functions. This PR swaps all references of `[ManualTrigger]` with `[QueueTrigger]`. Resolves https://github.com/MicrosoftDocs/azure-docs/issues/51340
1 parent 0586f54 commit b44352c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/azure-functions/durable/durable-functions-instance-management.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ The following code is an example function that starts a new orchestration instan
3838
# [C#](#tab/csharp)
3939

4040
```csharp
41-
[FunctionName("HelloWorldManualStart")]
41+
[FunctionName("HelloWorldQueueTrigger")]
4242
public static async Task Run(
43-
[ManualTrigger] string input,
43+
[QueueTrigger("start-queue")] string input,
4444
[DurableClient] IDurableOrchestrationClient starter,
4545
ILogger log)
4646
{
@@ -157,7 +157,7 @@ This method returns `null` (.NET) or `undefined` (JavaScript) if the instance do
157157
[FunctionName("GetStatus")]
158158
public static async Task Run(
159159
[DurableClient] IDurableOrchestrationClient client,
160-
[ManualTrigger] string instanceId)
160+
[QueueTrigger("check-status-queue")] string instanceId)
161161
{
162162
DurableOrchestrationStatus status = await client.GetStatusAsync(instanceId);
163163
// do something based on the current status.
@@ -359,7 +359,7 @@ You can use the `TerminateAsync` (.NET) or the `terminate` (JavaScript) method o
359359
[FunctionName("TerminateInstance")]
360360
public static Task Run(
361361
[DurableClient] IDurableOrchestrationClient client,
362-
[ManualTrigger] string instanceId)
362+
[QueueTrigger("terminate-queue")] string instanceId)
363363
{
364364
string reason = "It was time to be done.";
365365
return client.TerminateAsync(instanceId, reason);
@@ -424,7 +424,7 @@ The parameters to `RaiseEventAsync` (.NET) and `raiseEvent` (JavaScript) are as
424424
[FunctionName("RaiseEvent")]
425425
public static Task Run(
426426
[DurableClient] IDurableOrchestrationClient client,
427-
[ManualTrigger] string instanceId)
427+
[QueueTrigger("event-queue")] string instanceId)
428428
{
429429
int[] eventData = new int[] { 1, 2, 3 };
430430
return client.RaiseEventAsync(instanceId, "MyEvent", eventData);
@@ -618,7 +618,7 @@ For example, let's say you have a workflow involving a series of [human approval
618618
[FunctionName("RewindInstance")]
619619
public static Task Run(
620620
[DurableClient] IDurableOrchestrationClient client,
621-
[ManualTrigger] string instanceId)
621+
[QueueTrigger("rewind-queue")] string instanceId)
622622
{
623623
string reason = "Orchestrator failed and needs to be revived.";
624624
return client.RewindAsync(instanceId, reason);
@@ -670,7 +670,7 @@ This method has two overloads. The first overload purges history by the ID of th
670670
[FunctionName("PurgeInstanceHistory")]
671671
public static Task Run(
672672
[DurableClient] IDurableOrchestrationClient client,
673-
[ManualTrigger] string instanceId)
673+
[QueueTrigger("purge-queue")] string instanceId)
674674
{
675675
return client.PurgeInstanceHistoryAsync(instanceId);
676676
}

0 commit comments

Comments
 (0)