Skip to content

Conversation

cicoyle
Copy link
Contributor

@cicoyle cicoyle commented Aug 30, 2025

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
@cicoyle cicoyle requested review from a team as code owners August 30, 2025 11:36
@msfussell msfussell changed the title Feat cross app workflow docs Multi App workflow calls. Sep 1, 2025
Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca force-pushed the feat-cross-app-wf-docs branch from baff25b to 5988cd5 Compare September 3, 2025 09:24
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca force-pushed the feat-cross-app-wf-docs branch from 6dfc23a to 1429561 Compare September 3, 2025 09:36
@JoshVanL
Copy link
Contributor

JoshVanL commented Sep 3, 2025

I think we should merge this first, and I will rebase #4855 and incorporate these changes.

Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca
Copy link
Contributor

acroca commented Sep 8, 2025

@JoshVanL @cicoyle Thoughts?

@cicoyle
Copy link
Contributor Author

cicoyle commented Sep 8, 2025

lgtm - thx @acroca!

@JoshVanL mind re-reviewing?

@cicoyle cicoyle requested a review from JoshVanL September 8, 2025 19:33
Copy link
Contributor

@JoshVanL JoshVanL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cicoyle @acroca reviewed

@@ -16,6 +17,11 @@ Some scenarios where this is useful include:
- Different parts of the workflow need to be executed in different geographic regions due to data residency requirements.
- An involved business process spans multiple teams or departments, each owning their own application.
- Implementation of a workflow spans different programming lanaguages based on team expertise or existing codebases.
- Different team boundaries or microservice ownership.
- Shared activity pools where apps can expose activities and child workflows that can be called from multiple workflow orchestrators running in different applications, see image below:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem quite right to me.

Whether different app IDs share the same activity code, cross workflow execution is based on definite routing, meaning the target app ID is explicit.

It is currently impossible for activity execution to be pooled, and it not something we would intentionally want to support. Execution pooling is done at the app ID level.

Comment on lines -28 to -29
Workflows being durable, if the target activity or child workflow app ID is not available or has not been defined, the parent workflow retry until the target app ID becomes available, indefinitely.
It is paramount that their is co-ordination between the teams owning the different app IDs to ensure that the activities and child workflows are defined and available when needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this been removed?

Comment on lines +51 to +53
When calling cross-app activities or child workflows:
- If the target application does not exist, the call will be retried using the provided retry policy
- If the target application exists but doesn't contain the specified activity or workflow, the call will return an error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, let's keep using the same verbiage, which is "multi app", or "multiple application" execution. We will not be using "cross app".

Comment on lines +52 to +53
- If the target application does not exist, the call will be retried using the provided retry policy
- If the target application exists but doesn't contain the specified activity or workflow, the call will return an error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If the target application does not exist, the call will be retried using the provided retry policy
- If the target application exists but doesn't contain the specified activity or workflow, the call will return an error
- If the target application does not exist, the call will be retried using the provided retry policy.
- If the target application exists but doesn't contain the specified activity or workflow, the call will return an error.

## Error handling

When calling cross-app activities or child workflows:
- If the target application does not exist, the call will be retried using the provided retry policy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gives the impression that if a target app ID is not available, the call that application will not be tried forever. I did not think this was the case- I certainly think it should try forever!


## Multi-application activity example

<img src="/images/workflow-overview/workflow-crossapp-callactivity.png" width=800 alt="Diagram showing cross-app call activity workflow pattern">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-application


The following example shows how to execute child workflows on different target app IDs.

<img src="/images/workflow-overview/workflow-crossapp-suborchestrator.png" width=800 alt="Diagram showing cross-app child workflow pattern">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multi application

@@ -38,9 +42,24 @@ Similarly, all app IDs must use the same actor state store.
Finally, the target app ID must have the activity or child workflow defined, otherwise the parent workflow will retry indefinitely.
{{% /alert %}}

## Multi-application activity examples
{{% alert title="Important Limitations" color="warning" %}}
- **Only some SDKs support cross-app calls** - Cross-app operations are dependent on the specific SDK implementation. Currently only available in the Java (partially) and Go SDKs. Other SDKs (Python, .NET, JavaScript) do not support any cross-app features at this time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants