Hi
Has anybody an idea how to give a version number to a file resource, which I just created in a vRO workflow element?
Regards
Roman
Hi
Script API docs from here - https://www.vroapi.com/Class/Intrinsics/1.0.0/ResourceElement - show only READ access for the version history
I wondered if the Server.createResourceElement script call would handle versioning so just tried to create the same element twice from an Action in our lab (on vRA 8.10 embedded vRO) - Sadly it fails with an error (which makes sense to be fair)
Seems like access to versioning is only accessible via the Orchestrator REST API ?
It might be simpler to just version the ResourceElement names? i.e., myResourceElement_v0.1
If you go with the API route then I suggest to use a polyglot action in the language of your choice. The context object in the polyglot containers hold an API and a token to make callbacks to itself. Then you can use the appropriate REST libs for the given language to do what you want. I have a simple action that just returns the url and token that I use in other workflows as needed.
def handler(context, inputs):
outputs = {
"vcoUrl": context['vcoUrl'],
"token": context['getToken']()
}
return outputs
Does anyone see the possibility of adding a description to the resource file to be created?
Regards
Got it:
var resElem = Server.createResourceElement(folder, fileName, resElem);
resElem.description = "your description";