Setting hierarchy from script

Post Reply
manuelvio
Newbie
Posts: 2
Joined: Mon Feb 22, 2021 8:18 am

Setting hierarchy from script

Post by manuelvio » Mon Feb 22, 2021 3:51 pm

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

laurentd
Member
Posts: 36
Joined: Wed Mar 13, 2019 2:06 pm

Re: Setting hierarchy from script

Post by laurentd » Mon Feb 22, 2021 4:03 pm

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.
Laurent De Wilde, Solution Architect @ Enfocus

manuelvio
Newbie
Posts: 2
Joined: Mon Feb 22, 2021 8:18 am

Re: Setting hierarchy from script

Post by manuelvio » Mon Feb 22, 2021 4:41 pm

Thanks Laurent, I think I'll settle on your workaround until this feature will be available again.

Cheers

Manuel

Post Reply