You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-node-model-upgrade.md
+282-3Lines changed: 282 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ The v4 programming model is supported by the v3.x of the `durable-functions` npm
45
45
46
46
In the v4 programming model, `function.json` files are a thing of the past! In v3, you would have to register your orchestration, entity, and activity triggers in a `function.json` file, and export your functionimplementation using `orchestrator()` or `entity()` APIs from the `durable-functions` package. With v3.x of `durable-functions`, APIs were added to the `app` namespace on the root of the package to allow you to register your durable orchestrations, entities, and activities directly in code! Find the below code snippets for examples.
> Use the `input.durableClient()` method to register a durable client extra input to your client function. Use `getClient()` as normal to retrieve a `DurableClient` instance.
502
+
503
+
## Update your Durable Client API calls
504
+
505
+
In `v3.x` of `durable-functions`, multiple APIs on the `DurableClient` class (renamed from `DurableOrchestrationClient`) have been simplified to make calling them easier and more streamlined. For many optional arguments to APIs, you now pass one options object, instead of multiple discrete optional arguments. Below is an example of these changes:
506
+
507
+
:::zone pivot="programming-language-javascript"
508
+
509
+
# [v4 model](#tab/v4)
510
+
511
+
```javascript
512
+
const client = df.getClient(context)
513
+
const status = await client.getStatus('instanceId', {
514
+
showHistory: false,
515
+
showHistoryOutput: false,
516
+
showInput: true
517
+
});
518
+
```
519
+
520
+
# [v3 model](#tab/v3)
521
+
522
+
```javascript
523
+
const client = df.getClient(context);
524
+
const status = await client.getStatus('instanceId', false, false, true);
> Make sure to update your `DurableClient` API calls from discrete optional arguments to options objects, where applicable. See the list above for all APIs affected.
0 commit comments