Skip to content

Commit 399bce7

Browse files
committed
Add greeting activity to hello-orchestrations sample and remove commented-out client version in versioning sample
1 parent c609f8d commit 399bce7

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

examples/azure-managed/hello-orchestrations/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ const processItem = async (_ctx: ActivityContext, item: string): Promise<number>
4141
return item.length;
4242
};
4343

44+
/** Return a greeting string for the given name. */
45+
const greet = async (_ctx: ActivityContext, name: string): Promise<string> => {
46+
return `Hello, ${name}!`;
47+
};
48+
4449
/** Child orchestration: adds two to the input via two plusOne activity calls. */
4550
const doubleOrchestrator: TOrchestrator = async function* (ctx: OrchestrationContext, value: number): any {
4651
const doubled: number = yield ctx.callActivity(plusOne, value);
@@ -134,6 +139,7 @@ const guidOrchestrator: TOrchestrator = async function* (ctx: OrchestrationConte
134139
.addOrchestrator(guidOrchestrator)
135140
.addActivity(plusOne)
136141
.addActivity(processItem)
142+
.addActivity(greet)
137143
.build();
138144

139145
try {

examples/azure-managed/versioning/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ const simpleOrchestrator: TOrchestrator = async function* (ctx: OrchestrationCon
7474
// --- 1. Schedule with version ---
7575
console.log("\n=== 1. Schedule Orchestration with Version ===");
7676

77-
// Client with a default version
7877
const clientV1 = new DurableTaskAzureManagedClientBuilder()
7978
.connectionString(connectionString)
8079
.logger(logger)

0 commit comments

Comments
 (0)