What i didn’t know was that once you read the file its content will be cached internally in vRO and since i need to run the vRO workflow automatically once a day via the vRO scheduler this was not going to work. Thanks to Joerg Lew for sharing (in my case) really critical piece of information.
It did work if i:
- Edit the workflow
- Click the Value link in the Attribute section, in this case the “vcoinput.csv (application/octet-stream) link”
- Select the file, vcoinput.csv, again
- Start the workflow.
I got the recommendation, via the following VMware Communities thread, to create a new mime.attachment variable in a scriptable task instead of using an predefined attribute. The below java script code makes it possible to read the same file over and over again and fetch any new content since the last time the file was read.
- var InputFile = new MimeAttachment(“c:\\scripts\\vcoinput.csv”);
- var Users = InputFile.content;
- var user = Users.split(“,”);
To make it possible for vRO to read a local file, in this case placed in the directory c:\scripts on a Windows 2012 Server running vRO/vCO 5.5.2, you have to add the below line to your js-io-rights.conf configuration file located in the directory C:\Program Files\VMware\Orchestrator\app-server\conf
- +r c:/scripts/vcoinput.csv (actually i only added c:\scripts since i had to later read other files in the same directory)
After you edit the file, make sure to restart the vRO service. Also thank you to VMware community member iliac.