简体   繁体   中英

No Workflow Resource found in the template in Logic App

I am trying to copy the logic app code from code view and paste it in the logic app project that I created locally.

Once I have pasted the code, I am trying to right click and open the file using logic app designer, then I am getting an error No workflow resource found in the template in Logic App.

Request some help if someone has faced this problem before.

I would suggest you to copy each array separately like triggers and actions and paste it in local project. I have done the same thing and i am able to open the designer. Below are steps I followed,

  1. Created a standard logic app in portal.

  2. Created a workflow as shown below,在此处输入图像描述

  3. Created a local project in vs code as followed by document .

{
"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. Copied actions json from portal to 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. Now copied triggers code from portal to vs code.
"triggers": {

"manual": {

"inputs": {},

"kind": "Http",

"type": "Request"

}

}
  1. Saved the workflow.json file in vs code.
  2. Able to open designer from local project,在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM