-
Notifications
You must be signed in to change notification settings - Fork 16
Call Local Function Actions
A workflow can call a local function written using the .Net Framework using the Call a Local Function action. The action configuration includes the name of the function to be called, along with any parameters. The function must be written using the .NET Framework 4.8 and must exist in an assembly that has been copied to the lib\custom\net472 folder in the Logic App.
When unit testing a workflow that calls a local function, the dependency needs to be removed. The testing framework does this by replacing the Call a Local Function action with a HTTP connector that is configured to call a mock HTTP server that is managed by the testing framework. This allows the action to run independently of other functions.
Replacing the action like this does not affect the functionality of the action or change the behaviour. Every Call a Local Function action generates an input request which is then passed to the called function. The called function then generates an output which is then processed by the rest of the workflow. As long as the same message structures are used in the request and response for the HTTP connector and mock HTTP server, the rest of the workflow will execute in exactly the same way.
- Home
- Using the Testing Framework
- Test Configuration
- Azurite
- Local Settings File
- Test Execution Logs
- Stateless Workflows
- Handling Workflow Dependencies
- Fluent API
- Automated testing using a DevOps pipeline
- Summary of Test Configuration Options
-
Example Mock Requests and Responses
- Call a Local Function action
- Invoke Workflow action
- Built-In Connectors:
- Service Bus
- SMTP
- Storage Account
- SQL Server