Rasmus Christensen
Rasmus Christensen

Reputation: 8541

Azure durable functions across repositories

I'm trying to make a workflow with azure durable functions. To use ActivityTrigger the functions as I can read should be in the same function app.

I currently have 2 repositories, and due to the business modeling it's seperated into two repositorier. It might not be possible and I might be doing something wrong. But is it possible to make a duable workflow when the activitytriggers/functions are across two repositories? Like define "Function App" as the same when I start them locally?

I splitted it into two repositories as I want to be able to deploy them independent of each other when updating and the data the functions are using is in different business domains.

Upvotes: 1

Views: 120

Answers (1)

Connor McMahon
Connor McMahon

Reputation: 1358

Splitting a function application into two separate repositories that can be deployed independently is not supported, and I would highly recommend against it even if it was supported. A function application should be seen as a unit of deployment, especially in the case of Durable Functions, where state can be maintained between executions.

You mention that the data being used is in separate business domains being the reason for splitting the logic into two independent repositories. However, since your workflow you are developing using Durable Functions uses data from both domains, independent deployment could be very dangerous.

If you still feel the need to support independent deployment for the business logic for each business domain, create function apps BusinessDomain1FunctionApp, BusinessDomain2FunctionApp, etc, where each of these function apps contain HttpTriggers containing business logic. Then write a single WorkflowFunctionApp, which uses Durable Functions. Each ActivityTrigger can make an HTTP call to trigger the business logic from the appropriate application. Each of these function apps can be kept in there own repo and deployed separately.

Upvotes: 1

Related Questions