VMware Cloud Community
mmonkman
Enthusiast
Enthusiast
Jump to solution

vRA 7.6 - capture unique reference from catalog request in payload

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
Jump to solution

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
Jump to solution

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

mmonkman
Enthusiast
Enthusiast
Jump to solution

You're quite right Steve.  Thank you!

Reply
0 Kudos