Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Re: How to get the package workflow belongs to?

$
0
0

If you have to do this on remote vCo server then you can use the REST plug-in.

 

HTTP get on /packages/ gets all the package list

/package/packageName/ get all the content of a workflow.

 

You will get JSON strings. You can convert these to object doing var pckgDetail = eval(jsonString);

 

Here is an example when getting the package content

 

var workflows = pckgDetail.workflows;        for (var w = 0; w < workflows.length; w++) {            var workflow = workflows[w];            var attributes = workflow.attributes;                for (var j = 0; j < attributes.length; j++) {                var attribute = attributes[j];                if (attribute.name == "id") {                    if (attribute.value == workflowId) {                         packageArray.push(pckgDetail.name);                    }                }            }           }

Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>