VMware {code} Community
rlangenfeld
Contributor
Contributor

How to tell when a VApp is safely stored in a catalog


I was wondering when you are programmatically adding a VApp from the cloud to a Catalog, if it's possible to know when it is done? Sometime the code down below:


CatalogItemType catalogItemType = parameterFactory.getCatalogItemType();


catalogItemType.setName(vAppTemplateName);


catalogItemType.setEntity(vAppTemplate.getReference());


CatalogItem returnedCatalogItem = catalog.addCatalogItem(catalogItemType);


Finishes but the catalog is till capturing that VApp. Is there a way to tell when it's done through waitForTasks() or something else? I've tried getting the tasks off of the VApp but there aren't any. We need to know when it's done so it can be deleted safely from the cloud.

0 Kudos
0 Replies