async activateVariant(mPropertyBag) {
			function logAndReject(oError) {
				Log.error(oError);
				return Promise.reject(oError);
			}

			let oElement;
			if (typeof mPropertyBag.element === "string") {
				oElement = Component.getComponentById(mPropertyBag.element);
				if (!(oElement instanceof Component)) {
					oElement = Element.getElementById(mPropertyBag.element);

					if (!(oElement instanceof Element)) {
						return logAndReject(Error("No valid component or control found for the provided ID"));
					}
				}
			} else if (mPropertyBag.element instanceof Component || mPropertyBag.element instanceof Element) {
				oElement = mPropertyBag.element;
			}

			const oAppComponent = Utils.getAppComponentForControl(oElement);
			if (!oAppComponent) {
				return logAndReject(Error("A valid variant management control or component (instance or ID) should be passed as parameter"));
			}

			const oVariantModel = oAppComponent.getModel(VARIANT_MODEL_NAME);
			if (!oVariantModel) {
				return logAndReject(Error("No variant management model found for the passed control or application component"));
			}

			if (mPropertyBag.standardVariant && !oElement.isA("sap.ui.fl.variants.VariantManagement")) {
				return logAndReject(Error("With using standardVariant and no variantReference, a variant management control must be passed as element"));
			}

			const sVariantReference = mPropertyBag.standardVariant
				? oVariantModel.getVariantManagementReferenceForControl(mPropertyBag.element)
				: mPropertyBag.variantReference;

			// if the variant management reference is not available, the variant is not yet loaded
			if (!oVariantModel.getVariantManagementReference(sVariantReference).variantManagementReference) {
				try {
					await VariantManagementState.loadVariant({
						reference: oVariantModel.sFlexReference,
						variantReference: sVariantReference
					});
				} catch (oError) {
					return logAndReject(Error(`Variant with reference '${sVariantReference}' could not be found`));
				}
			}

			const sVariantManagementReference = oVariantModel.getVariantManagementReference(sVariantReference).variantManagementReference;
			if (!sVariantManagementReference) {
				return logAndReject(Error("A valid control or component, and a valid variant/ID combination are required"));
			}

			// sap/fe is using this API very early during app start, sometimes before FlexState is initialized
			await oVariantModel.waitForVMControlInit(sVariantManagementReference);

			try {
				return oVariantModel.updateCurrentVariant({
					variantManagementReference: sVariantManagementReference,
					newVariantReference: sVariantReference,
					appComponent: oAppComponent
				});
			} catch (oError) {
				Log.error(oError);
				throw oError;
			}
		}
Activates the passed variant applicable to the passed control/component.
If the Variant is not available and the backend supports lazy loading, a backend request is made to fetch the variant.
If the flag standardVariant is set to true, the standard variant is activated and the variantReference is ignored.
In this scenario the passed element must be the variant management control.

@param {object} mPropertyBag - Object with parameters as properties
@param {sap.ui.base.ManagedObject|string} mPropertyBag.element - Component or control (instance or ID) on which the <code>variantModel</code> is set
@param {string} mPropertyBag.variantReference - Reference to the variant that needs to be activated
@param {boolean} [mPropertyBag.standardVariant] - If set to true, the standard variant is activated and the variantReference is ignored

@returns {Promise} Resolves after the variant is activated or rejects if an error occurs

@public