koupr01
Contributor
Contributor

FileRead Orchestrator API problem

Hi,

My Workflow is using a FileReader object to open and read a file stored on the local machine but it keeps failing with permission denied on the file. I have assigned complete permissions to the file for "Everyone" so permissions are not the real problem here. Is there a problem with this API? Could someone perhaps try that on own machine to see if the problem will be visible there too?

Here is the code of my custom Action ran from my custom workflow which simply exucutes this Action:

System.log("BEGIN-READ");

var fh = new FileReader("C:\test_file.txt"); // note I have double "\" there but this forum is not formating it properly

fh.open();

var content = fh.readAll()

fh.close();

System.log("END-READ");

Thanks,

Prema

0 Kudos
1 Reply
Burke-
VMware Employee
VMware Employee

Have you made the necessary changes to the js-io-rights.conf file as described on page 49 of the vCO Admin guide and restarted your vCO Server service?

This change is required to allow the reading/writing of files on your vCO server.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos