在逻辑应用程序的模板中找不到工作流资源

问题描述 投票:0回答:1

我正在尝试从代码视图复制逻辑应用代码并将其粘贴到我本地创建的逻辑应用项目中。

粘贴代码后,我尝试右键单击并使用逻辑应用设计器打开文件,然后收到错误在逻辑应用的模板中找不到工作流资源。

如果有人以前遇到过这个问题,请寻求帮助。

azure-logic-apps
1个回答
0
投票

我建议您单独复制每个数组(例如触发器和操作)并将其粘贴到本地项目中。我做了同样的事情,我能够打开设计器。以下是我遵循的步骤,

  1. 在门户中创建了标准逻辑应用程序。

  2. 创建了如下所示的工作流程, enter image description here

  3. 在 VS Code 中创建了一个本地项目,如下文档

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {}
},
"kind": "Stateful"
}
  1. 将操作 json 从门户复制到 VS Code。
"actions": {
            "Initialize_variable": {
                "inputs": {
                    "variables": [
                        {
                            "name": "str",
                            "type": "string"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            },
            "Lists_blobs_(V2)": {
                "inputs": {
                    "host": {
                        "connection": {
                            "referenceName": "azureblob"
                        }
                    },
                    "method": "get",
                    "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/foldersV2/@{encodeURIComponent(encodeURIComponent('xxxx'))}",
                    "queries": {
                        "nextPageMarker": "",
                        "useFlatListing": false
                    }
                },
                "metadata": {
                    "xxxx": "/xxxx"
                },
                "runAfter": {
                    "Initialize_variable": [
                        "Succeeded"
                    ]
                },
                "type": "ApiConnection"
            }
        }
  1. 现在将触发器代码从门户复制到 VS Code。
"triggers": {

"manual": {

"inputs": {},

"kind": "Http",

"type": "Request"

}

}
  1. 在 VS Code 中保存工作流.json 文件。
  2. 能够从本地项目中打开设计器, enter image description here
© www.soinside.com 2019 - 2024. All rights reserved.