我决定在这里问,因为逻辑应用团队不会在 github 上回答我。无论如何,我尝试按照本指南在 VS Code 中本地运行逻辑应用程序:创建单租户工作流 Visual Studio 代码(我也尝试过遵循其他指南),但是当我运行它时总是遇到同样的错误:
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"
}
连接.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')"
}
}
}
}
主机.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": "**********************************"
}
}