This project contains the source for a custom workflow connector. Custom connectors allow us to build logic application functionality we can reuse, and allow us to write C# that we can use to perform any actions we like.
Connectors perform either triggers or actions. A trigger can be used to start a sequence of actions when an event is detected, an action is generally some work to perform.
Please see our [Contributing] (./docs/CONTRIBUTING.md) guide to understand our process (maintainer list, PR Process) before making contributions to this repository.
Locally Workflow Designer is using host.json from workflow-designtime folder. And loads dlls from ExtensionBundle specified there. host.json example:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
"version": "[1.*, 2.0.0)"
}
}
Microsoft.Azure.Functions.ExtensionBundle.Workflows loads dlls from: C:\Users<username>.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows<version>\bin.
So to make designer work we need to copy our Connecter dll there and update extensions.json in the same location to include the Connector.
Update extensions.json here: C:\Users<username>.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows<version>\bin. To include new Cosmos connector add at the end of the file the following (check the namespace and connector Startup class):
{
"name": "CosmosDbServiceProvider",
"typeName": "Microsoft.Azure.Workflows.ServiceProvider.Extensions.CosmosDB.Action.CosmosDbTriggerStartup, Microsoft.Azure.Workflows.ServiceProvider.Extensions.CosmosDB.Action, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
}
- To make runtime work locally the func should be run from the following place: <logicApp repo>\src\bin\Debug\netcoreapp3.1.
NOTE: When building connector locally:
- Pack the connector as Nuget package (*.nupkg).
- Publish the package locally to "C:\test\nuget" source. For example: nuget.exe add Asos.Azure.Workflows.ServiceProviders.Cosmos.Extension.1.0.9.nupkg -source C:\test\nuget
- Update global NuGet.config to use local nuget source (local project nuget.config can be used too).
- Build the Logic App project to restore dependencies.
If you want to install the compiled nuget package into a project, follow these steps
-
Go to VSTS, generate a PAT that has rights to Read from Package sources
-
Copy the PAT that is generated
-
Run the following command to add the nuget source locally, switching the PAT token
dotnet nuget add source https://pkgs.dev.azure.com///_packaging//nuget/v3/index.json -n -u -p --store-password-in-clear-text