Skip to content

Commit 49ba79c

Browse files
Merge pull request #273072 from hhunter-ms/hh-246475
[Dapr/AKS] Update workflow commands to use beta
2 parents ddbf399 + 01b1fca commit 49ba79c

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

articles/aks/dapr-workflow.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: hannahhunter
66
ms.reviewer: nuversky
77
ms.service: azure-kubernetes-service
88
ms.topic: article
9-
ms.date: 04/05/2023
9+
ms.date: 04/23/2024
1010
ms.subservice: aks-developer
1111
ms.custom: devx-track-azurecli
1212
---
@@ -76,15 +76,15 @@ For more information, see the [Deploy an AKS cluster][cluster] tutorial.
7676

7777
### Install Dapr on your AKS cluster
7878

79-
Install the Dapr extension on your AKS cluster. Before you start, make sure you've:
79+
Install the Dapr extension on your AKS cluster. Before you start, make sure you have:
8080
- [Installed or updated the `k8s-extension`][k8s-ext].
8181
- [Registered the `Microsoft.KubernetesConfiguration` service provider][k8s-sp]
8282

8383
```sh
8484
az k8s-extension create --cluster-type managedClusters --cluster-name myAKSCluster --resource-group myResourceGroup --name dapr --extension-type Microsoft.Dapr
8585
```
8686

87-
Verify Dapr has been installed by running the following command:
87+
Verify Dapr is installed:
8888

8989
```sh
9090
kubectl get pods -A
@@ -108,7 +108,7 @@ kubectl apply -f redis.yaml
108108

109109
### Run the application
110110

111-
Once you've deployed Redis, deploy the application to AKS:
111+
Once Redis is deployed, deploy the application to AKS:
112112

113113
```sh
114114
kubectl apply -f deployment.yaml
@@ -131,7 +131,7 @@ echo $DAPR_URL
131131

132132
## Start the workflow
133133

134-
Now that the application and Dapr have been deployed to the AKS cluster, you can now start and query workflow instances. Begin by making an API call to the sample app to restock items in the inventory:
134+
Now that the application and Dapr are deployed to the AKS cluster, you can now start and query workflow instances. Restock items in the inventory using the following API call to the sample app:
135135

136136
```sh
137137
curl -X GET $APP_URL/stock/restock
@@ -140,41 +140,44 @@ curl -X GET $APP_URL/stock/restock
140140
Start the workflow:
141141

142142
```sh
143-
curl -X POST $DAPR_URL/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/1234/start \
143+
curl -i -X POST $DAPR_URL/v1.0-beta1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=1234 \
144144
-H "Content-Type: application/json" \
145145
-d '{ "input" : {"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}}'
146146
```
147147

148148
Expected output:
149149

150-
```json
151-
{"instance_id":"1234"}
150+
```
151+
HTTP/1.1 202 Accepted
152+
Content-Type: application/json
153+
Traceparent: 00-00000000000000000000000000000000-0000000000000000-00
154+
Date: Tue, 23 Apr 2024 15:35:00 GMT
155+
Content-Length: 21
152156
```
153157

154158
Check the workflow status:
155159

156160
```sh
157-
curl -X GET $DAPR_URL/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/1234
161+
curl -i -X GET $DAPR_URL/v1.0-beta1/workflows/dapr/1234
158162
```
159163

160164
Expected output:
161165

162166
```json
167+
HTTP/1.1 200 OK
168+
Content-Type: application/json
169+
Traceparent: 00-00000000000000000000000000000000-0000000000000000-00
170+
Date: Tue, 23 Apr 2024 15:51:02 GMT
171+
Content-Length: 580
172+
163173
{
164-
"WFInfo":
165-
{
166-
"instance_id":"1234"
167-
},
168-
"start_time":"2023-03-03T19:19:16Z",
169-
"metadata":
170-
{
171-
"dapr.workflow.custom_status":"",
172-
"dapr.workflow.input":"{\"Name\":\"Paperclips\",\"Quantity\":1,\"TotalCost\":99.95}",
173-
"dapr.workflow.last_updated":"2023-03-03T19:19:33Z",
174-
"dapr.workflow.name":"OrderProcessingWorkflow",
175-
"dapr.workflow.output":"{\"Processed\":true}",
176-
"dapr.workflow.runtime_status":"COMPLETED"
177-
}
174+
"instanceID":"1234",
175+
"workflowName":"OrderProcessingWorkflow",
176+
"createdAt":"2024-04-23T15:35:00.156714334Z",
177+
"lastUpdatedAt":"2024-04-23T15:35:00.176459055Z",
178+
"runtimeStatus":"COMPLETED",
179+
"dapr.workflow.input":"{ \"input\" : {\"Name\": \"Paperclips\", \"TotalCost\": 99.95, \"Quantity\": 1}}",
180+
"dapr.workflow.output":"{\"Processed\":true}"
178181
}
179182
```
180183

0 commit comments

Comments
 (0)