mmonkman
Enthusiast
Enthusiast

vRA 7.6 - capture unique reference from catalog request in payload

Jump to solution

I need to capture a unique ID of a catalog request that can be extracted in payload so I can publish it in a custom attribute on the provisioned vm in vCenter.

It relates to a vm naming workflow which I'm extending to allow for cluster creation.  Publishing the deploymentId for example on the first provisioned vm in the cluster, will help determine the name of the subsequent vm's in the cluster if they are from the same catalog request.

deploymentId would be the most appropriate but it's null.

Help appreciated as always.

Tags (3)
1 Solution

Accepted Solutions
stevedrummond
Hot Shot
Hot Shot

In a machine lifecycle the property __Cafe.Root.Request.Id contains the id of the overall catalog request.

const requestId = payload.machine.properties.__Cafe.Root.Request.Id;

System.debug(requestId); // 02f35427-3916-4370-b529-bcbbff640bb2

View solution in original post

2 Replies
stevedrummond
Hot Shot
Hot Shot

In a machine lifecycle the property __Cafe.Root.Request.Id contains the id of the overall catalog request.

const requestId = payload.machine.properties.__Cafe.Root.Request.Id;

System.debug(requestId); // 02f35427-3916-4370-b529-bcbbff640bb2

View solution in original post

mmonkman
Enthusiast
Enthusiast

You're quite right Steve.  Thank you!

0 Kudos