You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/logic-apps/create-custom-built-in-connector-standard.md
+26-36Lines changed: 26 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,51 +11,45 @@ ms.date: 05/17/2022
11
11
12
12
# Create custom built-in connectors for Standard logic apps in single-tenant Azure Logic Apps
13
13
14
-
If you need connectors that aren't available in Standard logic app workflows, you can create your own built-in connectors using the same built-in connector extensibility model, which is based on the Azure Functions extensibility model, that's used by built-in connectors available for Standard workflows in [single-tenant Azure Logic Apps](single-tenant-overview-compare.md).
14
+
If you need connectors that aren't available in Standard logic app workflows, you can create your own built-in connectors using the same extensibility modelthat's used by the [*service provider-based built-in connectors*](custom-connector-overview.md#service-provider-interface-implementation) available for Standard workflows in single-tenant Azure Logic Apps. This extensibility model is based on the [Azure Functions extensibility model](../azure-functions/functions-bindings-register.md).
15
15
16
-
This article shows how to create an example custom built-in connector that's based on the Azure Functions extensibility framework. The example creates a sample custom built-in Azure Cosmos DB connector.
16
+
This article shows how to create an example custom built-in Cosmos DB connector, which has a single Azure Functions-based trigger and no actions. The trigger fires when a new document is added to the lease collection or container in Cosmos DB and then runs a workflow that uses the input payload as the Cosmos document.
17
17
18
-
For more information about custom connectors, review [Custom connectors for Standard logic apps](custom-connector-overview.md#custom-connector-standard) and [Azure Functions extensibility model](../azure-functions/functions-bindings-register.md).
18
+
| Operation | Operation details | Description |
19
+
|-----------|-------------------|-------------|
20
+
| Trigger | When a document is received | This trigger operation runs when an insert operation happens in the specified Cosmos DB database and collection. |
21
+
| Action | None | This connector doesn't define any action operations. |
22
+
||||
23
+
24
+
This sample connector uses the same functionality as the [Azure Cosmos DB trigger for Azure Functions](../azure-functions/functions-bindings-cosmosdb-v2-trigger.md), which is based on [Azure Functions triggers and bindings](../azure-functions/functions-triggers-bindings.md). For the complete sample, review [Sample custom built-in Cosmos DB connector - Azure Logic Apps Connector Extensions](https://github.com/Azure/logicapps-connector-extensions/tree/CosmosDB/src/CosmosDB).
25
+
26
+
For more information, review the following documentation:
27
+
28
+
*[Custom connectors for Standard logic apps](custom-connector-overview.md#custom-connector-standard)
* An Azure account and subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23
35
24
-
* Basic knowledge about single-tenant Azure Logic Apps, Standard logic app workflows, connectors, and how to use Visual Studio Code for creating single tenant-based workflows. If you're new to Azure Logic Apps, review the following documentation:
25
-
26
-
*[What is Azure Logic Apps?](logic-apps-overview.md)
36
+
* Basic knowledge about single-tenant Azure Logic Apps, Standard logic app workflows, connectors, and how to use Visual Studio Code for creating single tenant-based workflows. For more information, review the following documentation:
27
37
28
38
*[Single-tenant versus multi-tenant and integration service environment for Azure Logic Apps](single-tenant-overview-compare.md)
29
39
30
40
*[Create an integration workflow with single-tenant Azure Logic Apps (Standard) - Azure portal](create-single-tenant-workflows-azure-portal.md)
31
41
32
-
*[Custom connectors for Standard logic apps](custom-connector-overview.md#custom-connector-standard)
33
-
34
42
*[Visual Studio Code with the Azure Logic Apps (Standard) extension and other prerequisites installed](create-single-tenant-workflows-azure-portal.md#prerequisites). Your installation should already include the [NuGet package for Microsoft.Azure.Workflows.WebJobs.Extension](https://www.nuget.org/packages/Microsoft.Azure.Workflows.WebJobs.Extension/).
35
43
36
44
* An Azure Cosmos account, database, and container or collection. For more information, review [Quickstart: Create an Azure Cosmos account, database, container and items from the Azure portal](../cosmos-db/sql/create-cosmosdb-resources-portal.md).
37
45
38
-
<aname="example-custom-built-in-connector"></a>
39
-
40
-
## Example custom built-in connector
41
-
42
-
This example creates a sample custom built-in Cosmos DB connector that has a single Azure Functions-based trigger and no actions. The trigger fires when a new document is added to the lease collection or container in Cosmos DB and then runs a workflow that uses the input payload as the Cosmos document.
43
-
44
-
| Operation | Operation details | Description |
45
-
|-----------|-------------------|-------------|
46
-
| Trigger | When a document is received | This trigger operation runs when an insert operation happens in the specified Cosmos DB database and collection. |
47
-
| Action | None | This connector doesn't define any action operations. |
48
-
||||
49
-
50
-
The sample connector uses the functionality from the [Azure Functions capability for the Cosmos DB trigger](../azure-functions/functions-bindings-cosmosdb-v2-trigger.md), based on the Azure Functions trigger binding. For the complete sample, review [Sample custom built-in Cosmos DB connector - Azure Logic Apps Connector Extensions](https://github.com/Azure/logicapps-connector-extensions/tree/CosmosDB/src/CosmosDB).
51
-
52
46
## High-level steps
53
47
54
48
The following outline describes the high-level steps to build the example connector:
55
49
56
50
1. Create a class library project.
57
51
58
-
1.IN your project, add a NuGet package named **Microsoft.Azure.Workflows.WebJobs.Extension** as a NuGet reference.
52
+
1.In your project, add the **Microsoft.Azure.Workflows.WebJobs.Extension** NuGet package as a NuGet reference.
59
53
60
54
1. Provide the operations and operation descriptions for your built-in connector by using the NuGet package to implement methods for the interfaces named [**IServiceOperationsProvider**](custom-connector-overview.md#iserviceoperationsprovider) and [**IServiceOperationsTriggerProvider**](custom-connector-overview.md#iserviceoperationstriggerprovider).
61
55
@@ -65,17 +59,13 @@ The following outline describes the high-level steps to build the example connec
65
59
66
60
## Create your class library project
67
61
68
-
To create the sample built-in Cosmos DB connector, complete the following tasks:
69
-
70
62
1. In Visual Studio Code, create a .NET Core 3.1 class library project.
71
63
72
64
1. In your project, add the NuGet package named **Microsoft.Azure.Workflows.WebJobs.Extension** as a NuGet reference.
73
65
74
66
## Implement the service provider interface
75
67
76
-
To provide the operations and their descriptions for the sample built-in connector, in the NuGet package named **Microsoft.Azure.Workflows.WebJobs.Extension** package, implement the methods for the following interfaces.
77
-
78
-
The following diagram shows the interfaces with the method implementations that the Azure Logic Apps designer and runtime expect for a custom built-in connector that has an Azure Functions-based trigger:
68
+
To provide the operations and their descriptions for the sample built-in connector, in the **Microsoft.Azure.Workflows.WebJobs.Extension** NuGet package, implement the methods for the following interfaces. The following diagram shows the interfaces with the method implementations that the Azure Logic Apps designer and runtime expect for a custom built-in connector that has an Azure Functions-based trigger:
79
69
80
70

81
71
@@ -192,11 +182,11 @@ The following sections show how to register your custom built-in connector as an
192
182
193
183
### Create the startup job
194
184
195
-
1. Create a startup class by using the assembly attribute **[assembly:WebJobsStartup]**.
185
+
1. Create a startup class using the assembly attribute named**[assembly:WebJobsStartup]**.
196
186
197
-
1. Implement the **IWebJobsStartup** interface.
187
+
1. Implement the **IWebJobsStartup** interface. In the **Configure()** method, register the extension and inject the service provider.
198
188
199
-
1. In the **Configure()** method, register the extension and inject the service provider. For example, the following code snippet shows the startup class implementation for the sample custom built-in Cosmos DB connector:
189
+
For example, the following code snippet shows the startup class implementation for the sample custom built-in Cosmos DB connector:
Azure Logic Apps has a generic way to handle any Azure Functions built-in trigger by using the **JObject** array. However, if you want to convert the read-only list of Azure Cosmos DB documents into a **JObject** array, you can add a converter. When the converter is ready, register the converter as part of **ExtensionConfigContext** as shown earlier in this example:
280
270
281
271
```csharp
282
-
// Convert the Cosmos cocument list to a JObject array.
272
+
// Convert the Cosmos document list to a JObject array.
When you're done, review the following class diagram that shows the implementation for all the classes in **Microsoft.Azure.Workflows.ServiceProvider.Extensions.CosmosDB**:
278
+
When you're done, review the following class diagram that shows the implementation for all the classes in the **Microsoft.Azure.Workflows.ServiceProvider.Extensions.CosmosDB.dll** extension bundle:
289
279
290
-
***CosmosDbServiceProviderStartup**
291
-
***CosmosDbServiceProvider**
292
280
***CosmosDbServiceOperationsProvider**
281
+
***CosmosDbServiceProvider**
282
+
***CosmosDbServiceProviderStartup**
293
283
294
284

295
285
296
286
## Install your connector
297
287
298
-
To add the NuGet reference from the previous section, in the extension bundle named **Microsoft.Azure.Workflows.ServiceProvider.Extensions.CosmosDB**, update the **extensions.json** file. For more information, go to the **Azure/logicapps-connector-extensions** repo, and review the PowerShell script named [**add-extension.ps1**](https://github.com/Azure/logicapps-connector-extensions/blob/main/src/Common/tools/add-extension.ps1).
288
+
To add the NuGet reference from the previous section, in the extension bundle named **Microsoft.Azure.Workflows.ServiceProvider.Extensions.CosmosDB.dll**, update the **extensions.json** file. For more information, go to the **Azure/logicapps-connector-extensions** repo, and review the PowerShell script named [**add-extension.ps1**](https://github.com/Azure/logicapps-connector-extensions/blob/main/src/Common/tools/add-extension.ps1).
299
289
300
290
1. Update the extension bundle to include the custom built-in connector.
Copy file name to clipboardExpand all lines: articles/logic-apps/custom-connector-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ This article provides an overview about custom connectors for [Consumption logic
31
31
32
32
## Consumption logic apps
33
33
34
-
In [multi-tenant Azure Logic Apps](logic-apps-overview.md), you can create [custom connectors](/connectors/custom-connectors/) from REST APIs to use in Consumption logic app workflows. The [Connectors documentation](/connectors/connectors) provides more overview information about how to create custom connectors for Consumption logic apps, including complete basic and advanced tutorials. The following list also provides direct links to information about custom connectors for Consumption logic apps:
34
+
In [multi-tenant Azure Logic Apps](logic-apps-overview.md), you can create [Swagger-based or SOAP-based custom connectors](/connectors/custom-connectors/) from REST APIs to use in Consumption logic app workflows. The [Connectors documentation](/connectors/connectors) provides more overview information about how to create custom connectors for Consumption logic apps, including complete basic and advanced tutorials. The following list also provides direct links to information about custom connectors for Consumption logic apps:
35
35
36
36
*[Create an Azure Logic Apps connector](/connectors/custom-connectors/create-logic-apps-connector)
37
37
*[Create a custom connector from an OpenAPI definition](/connectors/custom-connectors/define-openapi-definition)
@@ -79,7 +79,7 @@ The following section provides more information about how the extensibility mode
79
79
80
80
Based on the [Azure Functions extensibility model](../azure-functions/functions-bindings-register.md), the built-in connector extensibility model in single-tenant Azure Logic Apps has a service provider infrastructure that you can use to [create, package, register, and install your own built-in connectors](create-custom-built-in-connector-standard.md) as Azure Functions extensions that anyone can use in their Standard workflows. This model includes custom built-in trigger capabilities that support exposing an [Azure Functions trigger or action](../azure-functions/functions-bindings-example.md) as a service provider trigger in your custom built-in connector.
81
81
82
-
The following diagram shows the method implementations that the Azure Logic Apps designer and runtime expects for a custom built-in connector with an Azure Functions-based trigger:
82
+
The following diagram shows the method implementations that the Azure Logic Apps designer and runtime expects for a custom built-in connector with an [Azure Functions-based trigger](../azure-functions/functions-bindings-example.md):
83
83
84
84

0 commit comments