【发布时间】:2021-09-04 21:54:41
【问题描述】:
我决定在这里提问,因为逻辑应用团队不会在 github 上回答我。无论如何,我尝试按照本指南在 VS Code 中本地运行逻辑应用程序:Create Single Tenant Workflows Visual Studio Code(我也尝试按照其他指南进行操作)但是在运行它时总是遇到同样的错误:
Job dispatching error: operationName='JobDispatchingWorker.ExecuteTriggerInnerLoop', jobPartition='F106FDA38562443473E3DC4790D974E6:2D08585773452306434462235104894CU00', jobId='08585773234586434462235104894CU00', message='Job dispatching worker unable to execute inner trigger loop.', exception='System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Convert.ToDouble(String value)
at Microsoft.Azure.Workflows.Common.Logging.FlowEventSource.JobHistory(String jobPartition, String jobId, String callback, String startTime, String endTime, String executionTimeInMilliseconds, String
executionDelayInMilliseconds, String executionIntervalInMilliseconds, String executionStatus, String executionMessage, String executionDetails, String nextExecutionTime, String subscriptionId, String correlationId, String principalOid, String principalPuid, String tenantId, String dequeueCount, String advanceVersion, String triggerId, String messageId, String state, String organizationId, String activityVector, String realPuid, String altSecId, String additionalProperties, String jobDurabilityLevel)
at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.HandleJobExecution(JobTrigger trigger, JobDefinition definition, BackgroundJob backgroundJob, DateTime startTime, DateTime endTime, TimeSpan executionTime, TimeSpan executionDelay, TimeSpan executionInterval, JobExecutionResult executionResult, Boolean executeJobInline)
at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.ExecuteJobWithCancellation(JobTrigger trigger, JobDefinition definition, CancellationToken cancellationToken)
at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.ExecuteJobWithWatchdog(JobTrigger trigger, JobDefinition definition)
at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.ExecuteTriggerInnerLoop(JobTrigger trigger, JobDefinition definition)', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.0.0.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.
错误发生在
Host lock lease acquired by instance ID '00000000000000000000000051282CB2'
workflow.json(由 vsc 设计器生成):
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Send_an_email_(V2)": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "office365"
}
},
"method": "post",
"body": {
"To": "myEmail@something.com",
"Subject": "@triggerOutputs()?['body']?['name']",
"Body": "<p>@{triggerOutputs()?['body']?['name']} has been Updated</p>"
},
"path": "/v2/Mail"
},
"runAfter": {}
}
},
"triggers": {
"When_a_blob_is_Added_or_Modified_in_Azure_Storage": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"path": "test/host"
},
"serviceProviderConfiguration": {
"connectionName": "AzureBlob",
"operationId": "whenABlobIsAddedOrModified",
"serviceProviderId": "/serviceProviders/AzureBlob"
}
}
}
},
"contentVersion": "1.0.0.0",
"outputs": {}
},
"kind": "Stateless"
}
connections.json
{
"serviceProviderConnections": {
"AzureBlob": {
"parameterValues": {
"connectionString": "@appsetting('AzureBlob_connectionString')"
},
"serviceProvider": {
"id": "/serviceProviders/AzureBlob"
},
"displayName": "sample"
}
},
"managedApiConnections": {
"office365": {
"api": {
"id": "/subscriptions/***/providers/Microsoft.Web/locations/***/managedApis/office365"
},
"connection": {
"id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Web/connections/office365"
},
"connectionRuntimeUrl": "https://***.**.common.logic-***.azure-apihub.net/apim/office365/***/",
"authentication": {
"type": "Raw",
"scheme": "Key",
"parameter": "@appsetting('office365-connectionKey')"
}
}
}
}
host.json
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
"version": "[1.*, 2.0.0)"
}
}
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=***;AccountKey=**********",
"FUNCTIONS_WORKER_RUNTIME": "node",
"WORKFLOWS_TENANT_ID": "***",
"WORKFLOWS_SUBSCRIPTION_ID": "***",
"WORKFLOWS_RESOURCE_GROUP_NAME": "***",
"WORKFLOWS_LOCATION_NAME": "***",
"WORKFLOWS_MANAGEMENT_BASE_URI": "https://management.azure.com/",
"AzureBlob_connectionString": "***********",
"office365-connectionKey": "**********************************"
}
}
【问题讨论】:
-
在您的工作流程中的某个地方,它尝试将字符串解析为 double 并失败。可能是在工作流步骤之间传递了错误的数据格式。如果没有看到您的工作流代码的最小示例,几乎不可能说更多。
-
我添加了一个 workflow.json 文件,但是它是由 VSC 扩展通过逻辑应用设计器自动生成的
-
工作流程看起来不错。我可以在这里毫无问题地运行逻辑应用程序。你能告诉我们更多关于你的环境吗?
-
@ManuelBatsching 我有所有必要的 vs 代码扩展,(C#、Azure 帐户、函数、逻辑应用程序(标准)、Azurite。我还有 Azure Functions 核心工具版本 3.0.3477(64 位) )、.NET Core SDK 3.1.410、.NET 运行时:Microsoft.AspNetCore.App 3.1.16、Microsoft.NETCore.App 3.1.16、Microsoft.WindowsDesktop.App 3.1.16,最后我有 node.js v 12。 *.
-
@ManuelBatsching 我添加了连接、主机和 local.settings.json 文件,如果有帮助,请告诉我是否需要更多信息。
标签: azure-logic-apps azure-functions-core-tools azure-logic-app-standard