Skip to content

Commit 04e0f32

Browse files
authored
Merge pull request #4914 from acroca/python-multiapp
Python supports multi-app calls
2 parents 0abf107 + c8d73de commit 04e0f32

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-multi-app.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ Finally, the target app ID must have the activity or child workflow defined and
7373
{{% /alert %}}
7474

7575
{{% alert title="Important Limitations" color="warning" %}}
76-
**SDKs supporting multi-application workflows** - Multi-application workflows are used via the SDKs.
76+
**SDKs supporting multi-application workflows** - Multi-application workflows are used via the SDKs.
7777
Currently the following are supported:
7878
- **Java** (**only** activity calls)
79-
- **Go** (**both** activities and child workflows calls)
80-
- The Python, .NET, JavaScript SDKs support are planned for future releases
79+
- **Go** (**both** activities and child workflows calls)
80+
- **Python** (**both** activities and child workflows calls)
81+
- The .NET and JavaScript SDKs support are planned for future releases
8182
{{% /alert %}}
8283

8384
## Error handling
@@ -139,6 +140,17 @@ public class BusinessWorkflow implements Workflow {
139140

140141
{{% /tab %}}
141142

143+
{{% tab "Python" %}}
144+
145+
```python
146+
@wfr.workflow
147+
def app1_workflow(ctx: wf.DaprWorkflowContext):
148+
output = yield ctx.call_activity('ActivityA', input='my-input', app_id='App2')
149+
return output
150+
```
151+
152+
{{% /tab %}}
153+
142154
{{< /tabpane >}}
143155

144156
## Multi-application child workflow example
@@ -169,6 +181,17 @@ func BusinessWorkflow(ctx *workflow.WorkflowContext) (any, error) {
169181

170182
{{% /tab %}}
171183

184+
{{% tab "Python" %}}
185+
186+
```python
187+
@wfr.workflow
188+
def workflow1(ctx: wf.DaprWorkflowContext):
189+
output = yield ctx.call_child_workflow(workflow='Workflow2', input='my-input', app_id='App2')
190+
return output
191+
```
192+
193+
{{% /tab %}}
194+
172195
{{< /tabpane >}}
173196

174197
## Related links

0 commit comments

Comments
 (0)