Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions examples/workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ When you run the example, you will see output like this:
```


### Cross-app Workflow
### Multi-app Workflows

This example demonstrates how to call child workflows and activities in different apps. The multiple Dapr CLI instances can be started using the following commands:

Expand All @@ -361,9 +361,9 @@ sleep: 20
-->

```sh
dapr run --app-id wfexample3 python3 cross-app3.py &
dapr run --app-id wfexample2 python3 cross-app2.py &
dapr run --app-id wfexample1 python3 cross-app1.py
dapr run --app-id wfexample3 python3 multi-app3.py &
dapr run --app-id wfexample2 python3 multi-app2.py &
dapr run --app-id wfexample1 python3 multi-app1.py
```
<!-- END_STEP -->

Expand All @@ -379,9 +379,9 @@ among others. This shows that the workflow calls are working as expected.

#### Error handling on activity calls

This example demonstrates how the error handling works on activity calls across apps.
This example demonstrates how the error handling works on activity calls in multi-app workflows.

Error handling on activity calls across apps works as normal workflow activity calls.
Error handling on activity calls in multi-app workflows works as normal workflow activity calls.

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.

Expand All @@ -404,9 +404,9 @@ sleep: 20

```sh
export ERROR_ACTIVITY_MODE=true
dapr run --app-id wfexample3 python3 cross-app3.py &
dapr run --app-id wfexample2 python3 cross-app2.py &
dapr run --app-id wfexample1 python3 cross-app1.py
dapr run --app-id wfexample3 python3 multi-app3.py &
dapr run --app-id wfexample2 python3 multi-app2.py &
dapr run --app-id wfexample1 python3 multi-app1.py
```
<!-- END_STEP -->

Expand All @@ -424,9 +424,9 @@ among others. This shows that the activity calls are failing as expected, and th

#### Error handling on workflow calls

This example demonstrates how the error handling works on workflow calls across apps.
This example demonstrates how the error handling works on workflow calls in multi-app workflows.

Error handling on workflow calls across apps works as normal workflow calls.
Error handling on workflow calls in multi-app workflows works as normal workflow calls.

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.

Expand All @@ -445,9 +445,9 @@ sleep: 20

```sh
export ERROR_WORKFLOW_MODE=true
dapr run --app-id wfexample3 python3 cross-app3.py &
dapr run --app-id wfexample2 python3 cross-app2.py &
dapr run --app-id wfexample1 python3 cross-app1.py
dapr run --app-id wfexample3 python3 multi-app3.py &
dapr run --app-id wfexample2 python3 multi-app2.py &
dapr run --app-id wfexample1 python3 multi-app1.py
```
<!-- END_STEP -->

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def call_activity(
retry_policy: Optional[RetryPolicy] = None,
app_id: Optional[str] = None,
) -> task.Task[TOutput]:
# Handle string activity names for cross-app scenarios
# Handle string activity names for multi-app workflow scenarios
if isinstance(activity, str):
activity_name = activity
if app_id is not None:
self._logger.debug(
f'{self.instance_id}: Creating cross-app activity {activity_name} for app {app_id}'
f'{self.instance_id}: Creating multi-app workflow activity {activity_name} for app {app_id}'
)
else:
self._logger.debug(f'{self.instance_id}: Creating activity {activity_name}')
Expand Down Expand Up @@ -106,7 +106,7 @@ def call_child_workflow(
retry_policy: Optional[RetryPolicy] = None,
app_id: Optional[str] = None,
) -> task.Task[TOutput]:
# Handle string workflow names for cross-app scenarios
# Handle string workflow names for multi-app workflow scenarios
if isinstance(workflow, str):
workflow_name = workflow
self._logger.debug(f'{self.instance_id}: Creating child workflow {workflow_name}')
Expand Down
4 changes: 2 additions & 2 deletions ext/dapr-ext-workflow/dapr/ext/workflow/workflow_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def call_activity(
Parameters
----------
activity: Activity[TInput, TOutput] | str
A reference to the activity function to call, or a string name for cross-app activities.
A reference to the activity function to call, or a string name for multi-app workflow activities.
input: TInput | None
The JSON-serializable input (or None) to pass to the activity.
app_id: str | None
Expand All @@ -145,7 +145,7 @@ def call_child_workflow(
Parameters
----------
orchestrator: Orchestrator[TInput, TOutput] | str
A reference to the orchestrator function to call, or a string name for cross-app workflows.
A reference to the orchestrator function to call, or a string name for multi-app workflows.
input: TInput
The optional JSON-serializable input to pass to the orchestrator function.
instance_id: str
Expand Down
Loading