Replies: 1 comment
-
Hi @rosdev3 , just to try and summarise, if I understand correctly you are able to create a zip file but you also need to unzip it or read it's content, is that the case? Unfortunately, Build Tools for Aria does not add any actual vRO logic on top of what is already existing there, e.g. in your case the A possible workaround that I could think of would be to add a polyglot subproject to your project. That would allow you to use a different runtime to execute your logic. After that you have multiple options, e.g.
Whichever option you choose, once pushed to vRO it will take form of a polyglot action which you can call like any other vRO action, e.g. System.getModule("my.nodejs.actions").unzipFile(filePath). In case you don't have experience with polyglot you can try creating a sample project from the following archetype: https://github.com/vmware/build-tools-for-vmware-aria/blob/main/maven/archetypes/polyglot/create.sh It will create one for you that contains a sample for all 3 polyglot types - nodejs, ps and py. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have an Actions script that gathers information from several external APIs and sends those via mail to a requester. This is called via an Aria Automation Catalog item / Workflow to get all the required inputs.
Since the gathered text-based information can become quite large, I decided to try to create a zip-compressed file that can be added in the mail.
I was able to use the ZipWriter class that is embedded in Orchestrator / build tools to generate the zip. the
ZipWriter
is finally called with thewriteZip()
function to build the zip to a a temp folder in the Orchestrator appliance.This also where I get stuck.
There is a FileReader class available to read a file from the fileSystem, but it can only output the file as string what malforms the zip.
I then tried to import this zip file into a ResourceElement what works fine, the created ResourceElement results in the correct Zip file then you export it in the GUI.
The issue here is that there is in the code not a way to read it as a working zip.
resourceElement.getContentAsMimeAttachment().content
will also output as a malformed zip.Does anybody have experience with working with Zip files in Actions?
Is there a solution available?
Beta Was this translation helpful? Give feedback.
All reactions