Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Export Resource Element (XML/text) from vCO using wf or scripts

$
0
0

Hi folks,

 

I'm playing with the XML file in the vCO recently, and things are going pretty good!

 

I could import a XML file as the resource element like this:

 

var ResourceElement = Server.createResourceElement(ResourceElementCategory,"winServers.xml",mime,"text/xml");

 

from which, the "ResourceElementCategory" object allows me to browse my local computer and all the shared folders in the LAN.

 

But after I read/write to that resource element, I'd like to export it to the same location where I imported. I know I can do it manually in vCO, but is there a way to do it in scripts/WF?

 

I've made several attempts using mimeAttachment.write() method, but it is not working very well:

var mime = InResource.getContentAsMimeAttachment();
mime.write("C:\Users\Dirty Dipster\Desktop\XML","play.xml");

 

From the vCO API, it says: mimeAttachment.write(Object, Object) - directory, filename

 

Did I miss-use this method?

 

Thanks!


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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