Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic App custom built-in connectors deployment #711

Closed
LSchuster opened this issue Jan 27, 2023 · 8 comments
Closed

Logic App custom built-in connectors deployment #711

LSchuster opened this issue Jan 27, 2023 · 8 comments
Labels

Comments

@LSchuster
Copy link

LSchuster commented Jan 27, 2023

We have created a custom built-in connectors following this documentation https://learn.microsoft.com/en-us/azure/logic-apps/create-custom-built-in-connector-standard and a few other examples.

Locally the Logic App can be debugged in VS Code and the custom actions are working correctly.
image

But when we deploy the Logic App project we cant find the actions in the logic app designer and when we deploy a workflow using that action it is not displayed correctly.
image

We already have checked the files deployed to the Logic App using Kudu. There we can see that the dll containing the IExtensionConfigProvider, IServiceOperationsProvider and custom startup is present, as well as the extensions.json containing the reference to the dll and its startup class.

`[assembly: Microsoft.Azure.WebJobs.Hosting.WebJobsStartup(typeof(qbq.Hamburg.LogicApp.Extensions.MLLP.MLLPStartup))]
namespace qbq.Hamburg.LogicApp.Extensions.MLLP
{
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Hosting;
using Microsoft.Extensions.DependencyInjection.Extensions;

public class MLLPStartup : IWebJobsStartup
{
    public void Configure(IWebJobsBuilder builder)
    {
        builder.AddExtension<MLLPServiceProvider>();
        builder.Services.TryAddSingleton<MLLPServiceOperationProvider>();            
    }
}

}`

image
image
image

The only error i can find is the following
Workflow Error: operationName='WorkflowDefinitionProvider.ProcessWorkflow', message='Workflow 'Stateful1' validate and create workflow operation failed, the exception is 'The value '/serviceProviders/MLLP' provided for the 'serviceProviderConfiguration.serviceProviderId' for 'Send_a_Message_to_a_MLLP_Service' is not valid.'', exception='Microsoft.Azure.Workflows.Common.ErrorResponses.ErrorResponseMessageException: The value '/serviceProviders/MLLP' provided for the 'serviceProviderConfiguration.serviceProviderId' for 'Send_a_Message_to_a_MLLP_Service' is not valid. at Microsoft.Azure.Workflows.Data.Engines.EdgeFlowDefinitionValidationEngine.ValidateServiceProviderAction(String actionName, FlowTemplateAction action, InsensitiveDictionary1 triggers)
at Microsoft.Azure.Workflows.Data.Engines.EdgeFlowDefinitionValidationEngine.OnValidateFlowAction(FlowPropertiesDefinition definition, String flowName, String actionName, InsensitiveDictionary1 parameterValues, FlowOperationConfiguration flowOperationConfiguration, Boolean hasOpenApiOperationInWorkflow, IntegrationAccount integrationAccount) at Microsoft.Azure.Workflows.Data.Engines.FlowDefinitionValidationEngine.ValidateFlowActions(FlowPropertiesDefinition definition, InsensitiveDictionary1 parameterValues, String flowName, IntegrationAccount integrationAccount)
at Microsoft.Azure.Workflows.Data.Engines.FlowDefinitionValidationEngine.ValidateFlowTemplate(FlowPropertiesDefinition definition, InsensitiveDictionary1 templateParameters, String flowName, IntegrationAccount integrationAccount, InsensitiveDictionary1 appSettings)
at Microsoft.Azure.Workflows.Data.Engines.FlowDefinitionValidationEngine.ValidateFlow(String flowName, Flow existingFlow, FlowPropertiesDefinition definition, IntegrationAccount integrationAccount, InsensitiveDictionary1 appSettings) at Microsoft.Azure.Workflows.Web.Engines.EdgeFlowWebManagementEngine.ValidateAndCreateFlow(String flowName, FlowPropertiesDefinition flowPropertiesDefinition) at Microsoft.WindowsAzure.ResourceStack.Common.Algorithms.AsyncRetry.Retry(Func1 action, Int32 retryCount, TimeSpan retryInterval, CancellationToken cancellationToken, Nullable1 retryTimeout, Func2 isRetryable, Action1 errorAction, Func2 retryAfter)
at Microsoft.Azure.Workflows.WebJobs.Extensions.Initialization.WorkflowFunctionDefinitionProvider.ProcessWorkflow(FlowFunction flowFunction, ConcurrentDictionary2 flowsProcessed)', extensionVersion='1.3.7.0', siteName='mllp-on-azure-builtin-la', slotName='Production', activityId='ce37dbbf-4dd6-4ec5-8290-4096ef3a799a'.

Plan Type

Standard

Steps to Reproduce the Bug or Issue

  1. Follow Documentation: https://learn.microsoft.com/en-us/azure/logic-apps/create-custom-built-in-connector-standard
  2. Upload created package to nuget.org
  3. Convert Logic App project to nuget based project
  4. Reference Nuget package in Logic App project
  5. Deploy Logic App project to Standard Logic App deployed in Azure

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Initialize_variable": {
                "inputs": {
                    "variables": [
                        {
                            "name": "Name",
                            "type": "string",
                            "value": "Lukas"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            },
            "Response": {
                "inputs": {
                    "body": {
                        "status": "yes"
                    },
                    "statusCode": 200
                },
                "kind": "http",
                "runAfter": {
                    "Send_a_Message_to_a_MLLP_Service": [
                        "Succeeded"
                    ]
                },
                "type": "Response"
            },
            "Send_a_Message_to_a_MLLP_Service": {
                "inputs": {
                    "parameters": {
                        "content": "asdasd",
                        "topic": "asdasd"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "MLLP",
                        "operationId": "WriteMessage",
                        "serviceProviderId": "/serviceProviders/MLLP"
                    }
                },
                "runAfter": {
                    "Initialize_variable": [
                        "Succeeded"
                    ]
                },
                "type": "ServiceProvider"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "manual": {
                "inputs": {
                    "method": "GET"
                },
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

No response

Additional context

No response

AB#16927181

@timjansenortec
Copy link

I also have a setup with a custom connector for Logic Apps Standard. This is working OK for me.

Do you maybe still have the setting in the logic app that indicates to use the 'standard' extension bundle?
setting AzureFunctionsJobHost__extensionBundle__version

@LSchuster
Copy link
Author

LSchuster commented Jan 30, 2023

Hey timjansenortec, thats exactly what i was doing wrong, i have deployed the same project to a new logic app standard and it worked.

But now i have the problem that i cant see the run information.
image
The action does everything and is also giving outputs to the Response, but i cannot get any information about the run of this action.
All other actions work correctly and show the run information.

The Error says "Error loading component", i cant find any logs in Application Insights, or the storage account.

Did you also enounter this problem?

@timjansenortec
Copy link

I can see the Inputs+Outputs of my custom connector just fine.
Not sure what could be the issue...did you specify the Inputs+Outputs on the custom connector schema?

@LSchuster
Copy link
Author

I did it like in this repository https://github.com/Baran121/KafkaExt/tree/main/Providers in the WriteMessageApiOperationManifest.cs

@timjansenortec
Copy link

The example in that repository looks OK.
I don't know what the issue could be then.

@kritollm
Copy link

I had exactly the same problem. All the examples I've seen from Microsoft, as well as the example you used have an RGBA value for BrandColor. The weird thing is that the designer doesn't support RGBA, only RGB. The Javascript code crashes, that's why you can't see the result.

4287090426 = 0xFF87CEFA. So if you change to something like this, you can see the result: BrandColor = 0xcccccc

ToHexThrow

@github-actions
Copy link

This issue is stale because it has been open for 45 days with no activity.

@github-actions github-actions bot added the stale label Mar 29, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants