Page 1 of 1

Setting hierarchy from script

Posted: Mon Feb 22, 2021 3:51 pm
by manuelvio
Hi
Generating a job from a node.js script I'd like to set its hierarchy, but I noticed that the previous available methods (like setHierarchyPath) are not included in the node.js engine.
Is there an alternative way to set this value from the script? And if not, what's the suggested method to accomplish this?

Thanks in advance

Manuel

Re: Setting hierarchy from script

Posted: Mon Feb 22, 2021 4:03 pm
by laurentd
Hi Manuel,
This is not possible with Node.js at the moment, it will be added later on again.

I faced the same problem when I wrote the Inject wildcard app.
In its documentation you can see my workaround:
- write the hierarchy path in a private data, e.g. HierarchyPath
- use the Set hierarchy path element, and set the hierarchy Path segment 1 property to the right job private data: [Job.PrivateData:Key="HierarchyPath"]
Even if it is Path segment 1, you can define all the subfolders in one go.

Re: Setting hierarchy from script

Posted: Mon Feb 22, 2021 4:41 pm
by manuelvio
Thanks Laurent, I think I'll settle on your workaround until this feature will be available again.

Cheers

Manuel