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
among others. This shows that the workflow calls are working as expected.
312
+
313
+
314
+
#### Error handling on activity calls
315
+
316
+
This example demonstrates how the error handling works on activity calls across apps.
317
+
318
+
Error handling on activity calls across apps works as normal workflow activity calls.
319
+
320
+
In this example we run `app3` in failing mode, which makes the activity call return error constantly. The activity call from `app2` will fail after the retry policy is exhausted.
321
+
322
+
<!-- STEP
323
+
name: Run apps
324
+
expected_stdout_lines:
325
+
- '== APP == app1 - triggering app1 workflow'
326
+
- '== APP == app1 - received workflow call'
327
+
- '== APP == app1 - triggering app2 workflow'
328
+
- '== APP == app2 - received workflow call'
329
+
- '== APP == app2 - triggering app3 activity'
330
+
- '== APP == app3 - received activity call'
331
+
- '== APP == app3 - raising error in activity due to error mode being enabled'
332
+
- '== APP == app2 - received activity error from app3'
333
+
- '== APP == app2 - returning workflow result'
334
+
- '== APP == app1 - received workflow result'
335
+
- '== APP == app1 - returning workflow result'
336
+
sleep: 20
337
+
-->
338
+
339
+
```sh
340
+
export ERROR_ACTIVITY_MODE=true
341
+
dapr run --app-id wfexample3 --dapr-grpc-port 50013 python3 cross-app3.py &
342
+
dapr run --app-id wfexample2 --dapr-grpc-port 50012 python3 cross-app2.py &
343
+
dapr run --app-id wfexample1 --dapr-grpc-port 50011 python3 cross-app1.py
344
+
```
345
+
<!-- END_STEP -->
346
+
347
+
348
+
When you run the apps with the `ERROR_ACTIVITY_MODE` environment variable set, you will see output like this:
349
+
```
350
+
...
351
+
app3 - received activity call
352
+
app3 - raising error in activity due to error mode being enabled
353
+
app2 - received activity error from app3
354
+
...
355
+
```
356
+
among others. This shows that the activity calls are failing as expected, and they are being handled as expected too.
357
+
358
+
359
+
#### Error handling on workflow calls
360
+
361
+
This example demonstrates how the error handling works on workflow calls across apps.
362
+
363
+
Error handling on workflow calls across apps works as normal workflow calls.
364
+
365
+
In this example we run `app2` in failing mode, which makes the workflow call return error constantly. The workflow call from `app1` will fail after the retry policy is exhausted.
366
+
367
+
<!-- STEP
368
+
name: Run apps
369
+
expected_stdout_lines:
370
+
- '== APP == app1 - triggering app1 workflow'
371
+
- '== APP == app1 - received workflow call'
372
+
- '== APP == app1 - triggering app2 workflow'
373
+
- '== APP == app2 - received workflow call'
374
+
- '== APP == app2 - raising error in workflow due to error mode being enabled'
375
+
- '== APP == app1 - received workflow error from app2'
376
+
- '== APP == app1 - returning workflow result'
377
+
sleep: 20
378
+
-->
379
+
380
+
```sh
381
+
export ERROR_WORKFLOW_MODE=true
382
+
dapr run --app-id wfexample3 --dapr-grpc-port 50023 python3 cross-app3.py &
383
+
dapr run --app-id wfexample2 --dapr-grpc-port 50022 python3 cross-app2.py &
384
+
dapr run --app-id wfexample1 --dapr-grpc-port 50021 python3 cross-app1.py
385
+
```
386
+
<!-- END_STEP -->
387
+
388
+
When you run the apps with the `ERROR_WORKFLOW_MODE` environment variable set, you will see output like this:
389
+
```
390
+
...
391
+
app2 - received workflow call
392
+
app2 - raising error in workflow due to error mode being enabled
393
+
app1 - received workflow error from app2
394
+
...
395
+
```
396
+
among others. This shows that the workflow calls are failing as expected, and they are being handled as expected too.
0 commit comments