We are pleased to announce the public preview of .NET Framework Custom Code for Azure Logic Apps (Standard). This capability allows you to call compiled .NET Framework code from a built-in action in your workflow. In addition, this new capability provides the following benefits:
To use this feature, you will need a working instance of VS Code with all the existing Logic Apps (Standard) prerequisites.
In addition to the requirements already outlined, the following requirements must be satisfied:
To support a streamlined experience of writing custom code and being able to debug and deploy it with your workflows, we are introducing a new logic app workspace template. This new template is available in the latest Logic Apps extension for VS Code. As part of this project template, we will be creating a workspace file and two sample projects. One of the projects will allow you to author custom code and the other project will be for authoring workflows.
Note: You cannot mix custom code and workflows in the same project.
You can create a new logic app workspace using the following steps:
Within the Functions project, we will find a .cs file that contains the function that we created in the previous step. This function will include a default Run method that you can use to get started. This sample method demonstrates some of the capabilities found in calling in our custom code feature including passing different inputs and outputs including complex .NET types.
Note: You can modify the existing Run method to meet your needs, or you can copy and paste the function, including the [FunctionName(“function-name”)] declaration, and rename it to ensure there is a unique name associated with it. Modify this new function as you see fit. You will also need to ensure you don't have 2 "Run" methods. Rename one of them so that you have unique method names.
Once you have completed authoring your code, we need to compile it. As part of the project template that was used to create your Function project, we have included build tasks that will compile your code and then bin place it into the lib/custom/net472 folder within your Logic App project. This folder is where workflows will look for custom code.
To build your code:
With our custom code now compiled and bin placed, we are ready to call it from a workflow. Within the LogicApp project we will have a sample workflow that we can use to call this custom code that we just built. To call this custom code, perform the following steps:
We are now ready to run and debug our solution. We can do so by performing the following steps:
Note: Depending upon the names that you provided during the provisioning step, you may have different values than above.
You can deploy custom code in the same manner as you deploy your workflow project. So whether that is through VS Code or through a CI/CD DevOps process, you just need to ensure that you build your custom code before deployment and ensure that all dependent dlls are in the workflow’s lib/custom/net472 folder prior to deployment.
We currently do not support the authoring of custom code in the Azure Portal, however for custom code that has been deployed, you can add the workflow action and configure different functions, inputs and outputs like any other Logic Apps workflow. You will also be able to access the run history and see inputs/outputs for this action.
Customers are encouraged to use .NET Framework custom code extensibility to complement their low code integration solutions that they build in Azure Logic Apps. In general, custom code extensibility can be used to:
Conversely, .NET Framework custom code extensibility is not a substitute for:
Please refer to the Azure Logic Apps limits and configuration reference for additional details.
We have priortized C# and .NET Framework support to help address BizTalk Migration needs. We also recognize that there may be needs for other languages. Since our existing solution is built upon Azure Functions, we do have opportunities to include additional languages that Azure Functions supports. Please add any additional languages that you would like to see support for in the comments.
If you would like to see a video demonstration of this content, please watch the following YouTube video.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.