class AAIUpdateTasks {

    public void updateHeatStackIdVolumeGroup(BuildingBlockExecution execution) {
        try {
            GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
            String heatStackId = execution.getVariable("heatStackId");
            if (heatStackId == null) {
                heatStackId = "";
            }
            VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID);
            CloudRegion cloudRegion = gBBInput.getCloudRegion();
            volumeGroup.setHeatStackId(heatStackId);

            aaiVolumeGroupResources.updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion);
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIUpdateTasks updateHeatStackIdVolumeGroup", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}