I run my workflows on computer xyz. On this machine I have several data files that I would like to read in and use that data in the workflow. These files are modified fairly regularly.
I run the following code and get the following error:
var myFileReader = new FileReader("c:\\path\file.csv");
myFileReader.open();
testrecord = myFileReader.readAll(); //testrecord is a String variable
myFileReader.close();
Permission denied on file '/var/lib/vco/app-server/bin/c:\path\file.csv' , read not allowed
This shows that orchestrator is trying to read the file from the VCO Appliance vs. my local machine.
Is it possible to have VCO read a file on my local box xyz? Having this file uploaded to the VCO appliance on every modification may be a bridge too far.
Thank you very much for any help.
The Orchestrator appliance cannot automatically access your local machine (like any server). Instead, files that need to be accessed by Orchestrator should be provided in one of the following ways:
The Orchestrator appliance cannot automatically access your local machine (like any server). Instead, files that need to be accessed by Orchestrator should be provided in one of the following ways:
Most unfortunate. Thanks for the help and quick response.
I don't understand the comment "most unfortunate". You simply have "MimeAttachment" as an input to your workflow. The user is prompted to specify the file and then you access the content attribute. How easy is that!
I think this would work for him if you could load up the mime attachment programatically. I just tried but it doesn't seem to work. I did the following:
var file = new File("/some/file/here.txt");
var mimeAttachment = new MimeAttachment(file);
System.log(mimeAttachment.content);
System.log(mimeAttachment.mimeType);
It seems like this should work but it doesn't. There is no content. The mimeType does show as text/plain but I can't get any content to be displayed. If I use the same file as an input and manually select it then it works. Bug or design?
Paul
Carl, I appreciate the feed back. My reply to Burke may have been a little clearer if I had explained a little more.
My workflows are not being run by my clients directly. These are run via PERL accessing the Orchestrator REST API. All I have is a JSON to pass to orchestrator.
I attempted to use the MimeAttachment however, I am lost as to how to pull the Mime from my local box when all I have passed to me is a string path location to the file.
So basically I receive c:\path\file.csv via JSON and then I have to attach the Mime based on that.
If anyone has input into that I would appreciate the help. I marked Burke as correct answer because he is correct and now the finer details of implementation are eluding me.
Thanks for the help.
Paul - thats exactly what I was trying but failing as well.
Unfortunately, I'm not much of a PERL expert so I would need to do lots of searching and testing to figure this out... essentially, you should search for an example of PERL Posting a MimeAttachment and check the vRO API doc to pass that file as a MimeAttachment as part of the input... HOWEVER... in looking at your example, I'm seeing that your example is .csv .... this leads to the question: Is each file simply a csv text file??? If so, forget about MimeAttachment - that's a bit complicated I think. Instead, use "string" as the input type to the workflow that needs this csv content. Now, write your PERL script to get the contents of the csv file (that can't be terribly difficult to figure out...) and pass that string content to the input of the workflow.
End result:
PERL script executed (locally - NOT on vRO Server, I hope this has been the message the whole time )
- PERL script extracts contents of c:\path\file.csv into a string variable
- PERL script formats JSON for vRO Workflow, including the string variable extracted from the csv file
- PERL executes vRO workflow using the JSON formatted body
vRO Starts workflow, parses CSV string as desired.
Ahhh, that makes a lot more sense. Thanks and sorry, I don't have any solution. I will let the other guys work it out. The options to pass it from perl as a string is an interesting idea.
Carl L.
Thanks all. I think Burke nailed it (Yes, the list of assumptions and flow is right on). I'll look into passing a Mime from PERL but passing the file contents as a string is something I can slap together in a couple minutes so I'll start there to get this going and loop back around later.