1.Create an integration account or use existing integration account which is one time setup. Select the pricing tier as standard.
a. To link integration account to logic app.
a)In integration account's navigation menu, under Settings, select Callback URL.Find the Generated Callback URL property value, copy the value, and save the URL to use later for linking.
b.On your logic app's navigation menu, under Settings, select Environment variables.On the Environment variables page, check whether the app setting named WORKFLOW_INTEGRATION_ACCOUNT_CALLBACK_URL exists.
c.If the app setting doesn't exist, at the end of the settings list, add a new app setting by entering the following:
"WORKFLOW_INTEGRATION_ACCOUNT_CALLBACK_URL":""
d.In the Integration account navigate to Settings > Schemas, click on "Add", and upload a valid schema.
2.Open the designer in VS code and incorporate an HTTP request trigger.
3.Insert an XML Validation action.
4.For the content you wish to validate, choose the property token as the body.
5.Set the Source to Integration account.
6.For the Name, select the valid XML schema that has been uploaded in Integration account.
7.Implement a Response action with a status code of 200.
8.Create a parallel response action with a status code of 400. For the body, use the "body" token from the XML validation. In settings, under "Run after", opt for the "Has failed" option and uncheck the "Is successful" action.
9.Save the workflow.
10.Launch Postman.
11.Choose "Post" and input the workflow runtime URL. In Postman, select body > raw, add the valid XML, set the document type to XML, and press send.
Expected: Run should get success in run history.
Actual: Run in run history is in running state instead of success and having more logs.
[2024-10-09T10:10:10.029Z] System.Private.CoreLib: Exception while executing function: Functions.WorkflowDispatcher. System.Private.CoreLib: Unable to cast object of type 'Microsoft.Azure.Workflows.Data.Configuration.EdgeFlowSqlDataProviders' to type 'Microsoft.Azure.Workflows.Integration.Configuration.IntegrationAccountFlowDataProviders'.
[2024-10-09T10:10:10.044Z] Error message: correlationId='65109fd9-502b-4022-99bf-c3c50930eb1d', operationName='FunctionActionExecutionEngine.ExecuteAction', message='Unhandled exception is encountered: cancellation: 'False'', exception='System.InvalidCastException: Unable to cast object of type 'Microsoft.Azure.Workflows.Data.Configuration.EdgeFlowSqlDataProviders' to type 'Microsoft.Azure.Workflows.Integration.Configuration.IntegrationAccountFlowDataProviders'.
[2024-10-09T10:10:10.047Z] at Microsoft.Azure.Workflows.Integration.Extensions.IFlowConfigurationHolderExtensions.GetIntegrationAccountFlowDataProviders(IFlowConfigurationHolder holder)
[2024-10-09T10:10:10.052Z] at Microsoft.Azure.Workflows.Worker.Jobs.XmlValidationActionJob.ExecuteAction(FlowRunActionExecutionContext actionExecutionContext)
[2024-10-09T10:10:10.060Z] at Microsoft.Azure.Workflows.WebJobs.Engines.FunctionActionExecutionEngine.ExecuteEdgeActionCallback(EdgeActionExecutionContext edgeExecutionContext, CancellationToken cancellationToken)
[2024-10-09T10:10:10.075Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Trigger.WorkflowRuntimeTriggerProcessor.HandleFlowTrigger(EdgeActionExecutionContext edgeBindingExecutionContext, Binder binder, CancellationToken cancellationToken)
[2024-10-09T10:10:10.084Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.093Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.MethodInvoker2.InvokeAsync(Object target, Object[] parameters) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 535 [2024-10-09T10:10:10.096Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 273
[2024-10-09T10:10:10.099Z] at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in //src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 83 [2024-10-09T10:10:10.101Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.104Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2.InvokeAsync(Object instance, Object[] arguments) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 53 [2024-10-09T10:10:10.109Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 584 [2024-10-09T10:10:10.112Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 551 [2024-10-09T10:10:10.117Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 368', organizationId='', activityVector='IN.07', additionalProperties='{"ParentActivityId":"00-96030283dfada45903e68b6a9d3b283e-dfe8135cd17f1124-00"}', extensionVersion='1.94.1.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='1806ceb8-c01d-4644-898c-c7da94435d1a'. [2024-10-09T10:10:10.125Z] Job error: correlationId='65109fd9-502b-4022-99bf-c3c50930eb1d', operationName='FunctionActionExecutionEngine.ExecuteAction', jobPartition='B931E6827E2F461AAF76CC0D78B9D0BD:2D08584731412887141969188202979CU00', jobId='08584731412887141969188202979CU00-XML:3A5FVALIDATION', message='Job terminated unexpectedly: unknown exception encountered. Job start time '10/9/2024 9:20:11 AM', end time '1/21/2025 9:19:57 AM' and total executed '24' time(s).', exception='System.InvalidCastException: Unable to cast object of type 'Microsoft.Azure.Workflows.Data.Configuration.EdgeFlowSqlDataProviders' to type 'Microsoft.Azure.Workflows.Integration.Configuration.IntegrationAccountFlowDataProviders'. [2024-10-09T10:10:10.128Z] at Microsoft.Azure.Workflows.Integration.Extensions.IFlowConfigurationHolderExtensions.GetIntegrationAccountFlowDataProviders(IFlowConfigurationHolder holder) [2024-10-09T10:10:10.133Z] at Microsoft.Azure.Workflows.Worker.Jobs.XmlValidationActionJob.ExecuteAction(FlowRunActionExecutionContext actionExecutionContext) [2024-10-09T10:10:10.139Z] at Microsoft.Azure.Workflows.WebJobs.Engines.FunctionActionExecutionEngine.ExecuteEdgeActionCallback(EdgeActionExecutionContext edgeExecutionContext, CancellationToken cancellationToken) [2024-10-09T10:10:10.141Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Trigger.WorkflowRuntimeTriggerProcessor.HandleFlowTrigger(EdgeActionExecutionContext edgeBindingExecutionContext, Binder binder, CancellationToken cancellationToken) [2024-10-09T10:10:10.144Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.147Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.MethodInvoker2.InvokeAsync(Object target, Object[] parameters) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 535
[2024-10-09T10:10:10.150Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 273 [2024-10-09T10:10:10.155Z] at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in //src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 83
[2024-10-09T10:10:10.157Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.163Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2.InvokeAsync(Object instance, Object[] arguments) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 53
[2024-10-09T10:10:10.180Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 584
[2024-10-09T10:10:10.199Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 551
Describe the Bug with repro steps
Prerequisites:
1.Create an integration account or use existing integration account which is one time setup. Select the pricing tier as standard.
a. To link integration account to logic app.
a)In integration account's navigation menu, under Settings, select Callback URL.Find the Generated Callback URL property value, copy the value, and save the URL to use later for linking.
b.On your logic app's navigation menu, under Settings, select Environment variables.On the Environment variables page, check whether the app setting named WORKFLOW_INTEGRATION_ACCOUNT_CALLBACK_URL exists.
c.If the app setting doesn't exist, at the end of the settings list, add a new app setting by entering the following:
"WORKFLOW_INTEGRATION_ACCOUNT_CALLBACK_URL":""
d.In the Integration account navigate to Settings > Schemas, click on "Add", and upload a valid schema.
2.Open the designer in VS code and incorporate an HTTP request trigger.
3.Insert an XML Validation action.
4.For the content you wish to validate, choose the property token as the body.
5.Set the Source to Integration account.
6.For the Name, select the valid XML schema that has been uploaded in Integration account.
7.Implement a Response action with a status code of 200.
8.Create a parallel response action with a status code of 400. For the body, use the "body" token from the XML validation. In settings, under "Run after", opt for the "Has failed" option and uncheck the "Is successful" action.
9.Save the workflow.
10.Launch Postman.
11.Choose "Post" and input the workflow runtime URL. In Postman, select body > raw, add the valid XML, set the document type to XML, and press send.
Expected: Run should get success in run history.
Actual: Run in run history is in running state instead of success and having more logs.
What type of Logic App Is this happening in?
Standard (VSCode)
Which operating system are you using?
Windows
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
No response
Screenshots or Videos
Logs:
[2024-10-09T10:10:10.023Z] Executed 'Functions.WorkflowDispatcher' (Failed, Id=9c3b1486-dba0-429b-9bff-869c0b022c81, Duration=52ms)
[2024-10-09T10:10:10.029Z] System.Private.CoreLib: Exception while executing function: Functions.WorkflowDispatcher. System.Private.CoreLib: Unable to cast object of type 'Microsoft.Azure.Workflows.Data.Configuration.EdgeFlowSqlDataProviders' to type 'Microsoft.Azure.Workflows.Integration.Configuration.IntegrationAccountFlowDataProviders'.
[2024-10-09T10:10:10.044Z] Error message: correlationId='65109fd9-502b-4022-99bf-c3c50930eb1d', operationName='FunctionActionExecutionEngine.ExecuteAction', message='Unhandled exception is encountered: cancellation: 'False'', exception='System.InvalidCastException: Unable to cast object of type 'Microsoft.Azure.Workflows.Data.Configuration.EdgeFlowSqlDataProviders' to type 'Microsoft.Azure.Workflows.Integration.Configuration.IntegrationAccountFlowDataProviders'.
[2024-10-09T10:10:10.047Z] at Microsoft.Azure.Workflows.Integration.Extensions.IFlowConfigurationHolderExtensions.GetIntegrationAccountFlowDataProviders(IFlowConfigurationHolder holder)
[2024-10-09T10:10:10.052Z] at Microsoft.Azure.Workflows.Worker.Jobs.XmlValidationActionJob.ExecuteAction(FlowRunActionExecutionContext actionExecutionContext)
[2024-10-09T10:10:10.060Z] at Microsoft.Azure.Workflows.WebJobs.Engines.FunctionActionExecutionEngine.ExecuteEdgeActionCallback(EdgeActionExecutionContext edgeExecutionContext, CancellationToken cancellationToken)
[2024-10-09T10:10:10.075Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Trigger.WorkflowRuntimeTriggerProcessor.HandleFlowTrigger(EdgeActionExecutionContext edgeBindingExecutionContext, Binder binder, CancellationToken cancellationToken)
[2024-10-09T10:10:10.084Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker
2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.093Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.MethodInvoker
2.InvokeAsync(Object target, Object[] parameters) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 535 [2024-10-09T10:10:10.096Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 273[2024-10-09T10:10:10.099Z] at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in //src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 83 [2024-10-09T10:10:10.101Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker
2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.104Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker
2.InvokeAsync(Object instance, Object[] arguments) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 53 [2024-10-09T10:10:10.109Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 584 [2024-10-09T10:10:10.112Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 551 [2024-10-09T10:10:10.117Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 368', organizationId='', activityVector='IN.07', additionalProperties='{"ParentActivityId":"00-96030283dfada45903e68b6a9d3b283e-dfe8135cd17f1124-00"}', extensionVersion='1.94.1.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='1806ceb8-c01d-4644-898c-c7da94435d1a'. [2024-10-09T10:10:10.125Z] Job error: correlationId='65109fd9-502b-4022-99bf-c3c50930eb1d', operationName='FunctionActionExecutionEngine.ExecuteAction', jobPartition='B931E6827E2F461AAF76CC0D78B9D0BD:2D08584731412887141969188202979CU00', jobId='08584731412887141969188202979CU00-XML:3A5FVALIDATION', message='Job terminated unexpectedly: unknown exception encountered. Job start time '10/9/2024 9:20:11 AM', end time '1/21/2025 9:19:57 AM' and total executed '24' time(s).', exception='System.InvalidCastException: Unable to cast object of type 'Microsoft.Azure.Workflows.Data.Configuration.EdgeFlowSqlDataProviders' to type 'Microsoft.Azure.Workflows.Integration.Configuration.IntegrationAccountFlowDataProviders'. [2024-10-09T10:10:10.128Z] at Microsoft.Azure.Workflows.Integration.Extensions.IFlowConfigurationHolderExtensions.GetIntegrationAccountFlowDataProviders(IFlowConfigurationHolder holder) [2024-10-09T10:10:10.133Z] at Microsoft.Azure.Workflows.Worker.Jobs.XmlValidationActionJob.ExecuteAction(FlowRunActionExecutionContext actionExecutionContext) [2024-10-09T10:10:10.139Z] at Microsoft.Azure.Workflows.WebJobs.Engines.FunctionActionExecutionEngine.ExecuteEdgeActionCallback(EdgeActionExecutionContext edgeExecutionContext, CancellationToken cancellationToken) [2024-10-09T10:10:10.141Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Trigger.WorkflowRuntimeTriggerProcessor.HandleFlowTrigger(EdgeActionExecutionContext edgeBindingExecutionContext, Binder binder, CancellationToken cancellationToken) [2024-10-09T10:10:10.144Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.147Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.MethodInvoker
2.InvokeAsync(Object target, Object[] parameters) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 535[2024-10-09T10:10:10.150Z] at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in //src/WebJobs.Script/Description/DotNet/DotNetFunctionInvoker.cs:line 273 [2024-10-09T10:10:10.155Z] at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in //src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 83
[2024-10-09T10:10:10.157Z] at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker
2.InvokeAsync(TReflected instance, Object[] arguments) in D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 22 [2024-10-09T10:10:10.163Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker
2.InvokeAsync(Object instance, Object[] arguments) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 53[2024-10-09T10:10:10.180Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 584
[2024-10-09T10:10:10.199Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 551
[2024-10-09T10:10:10.202Z] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 368', organizationId='', activityVector='IN.07', additionalProperties='{"ParentActivityId":"00-96030283dfada45903e68b6a9d3b283e-dfe8135cd17f1124-00"}', extensionVersion='1.94.1.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='1806ceb8-c01d-4644-898c-c7da94435d1a'.
Browser
VS Code
Additional context
VSIX Version: 4.96.0