_doWrite = function(mPropertyBag) {
		var sRoute;
		if (mPropertyBag.isLegacyVariant) {
			sRoute = ROUTES.VARIANTS;
		} else if (mPropertyBag.isAppVariant) {
			sRoute = ROUTES.APPVARIANTS;
		} else if (mPropertyBag.isContextSharing) {
			sRoute = ROUTES.CONTEXTS;
		} else if (mPropertyBag.isCondensingEnabled) {
			sRoute = ROUTES.CONDENSE;
		} else if (mPropertyBag.isContextBasedAdaptationEnabled) {
			sRoute = ROUTES.CONTEXT_BASED_ADAPTATION + mPropertyBag.appId + ADAPTATIONS_SEGMENTATION;
		} else {
			sRoute = ROUTES.CHANGES;
		}
		var mParameters = mPropertyBag.transport ? {changelist: mPropertyBag.transport} : {};
		if (mPropertyBag.skipIam) {
			mParameters.skipIam = mPropertyBag.skipIam;
		}
		if (mPropertyBag.parentVersion) {
			mParameters.parentVersion = mPropertyBag.parentVersion;
		}
		InitialUtils.addSAPLogonLanguageInfo(mParameters);
		InitialConnector._addClientInfo(mParameters);
		// single update --> fileName needs to be in the url
		if (mPropertyBag.flexObject && !mPropertyBag.isAppVariant) {
			mPropertyBag.fileName = mPropertyBag.flexObject.fileName;
		}
		var sWriteUrl = InitialUtils.getUrl(sRoute, mPropertyBag, mParameters);
		delete mPropertyBag.reference;
		delete mPropertyBag.fileName;
		var sTokenUrl = InitialUtils.getUrl(ROUTES.TOKEN, mPropertyBag);

		var oRequestOption = WriteUtils.getRequestOptions(
			InitialConnector,
			sTokenUrl,
			mPropertyBag.flexObjects || mPropertyBag.flexObject,
			"application/json; charset=utf-8", "json"
		);
		return WriteUtils.sendRequest(sWriteUrl, mPropertyBag.method, oRequestOption);
	}
Write flex data into LRep back end or update an existing flex data stored in LRep back end

@param {object} mPropertyBag Property bag
@param {string} mPropertyBag.method POST for writing new data and PUT for update an existing data
@param {object[]} [mPropertyBag.flexObjects] Objects to be written (i.e. change definitions, variant definitions etc.)
@param {object} [mPropertyBag.flexObject] Object to be updated
@param {string} mPropertyBag.url Configured url for the connector
@param {string} [mPropertyBag.transport] The transport ID
@param {boolean} [mPropertyBag.isLegacyVariant] Whether the new flex data has file type .variant or not
@param {boolean} [mPropertyBag.isAppVariant] Indicator whether this is an app variant
@param {boolean} [mPropertyBag.isContextSharing] Indicator whether this is a request for context sharing
@param {boolean} [mPropertyBag.skipIam=false] - Indicates whether the default IAM item creation and registration is skipped. This is S4/Hana specific flag passed by only Smart Business
@param {boolean} [mPropertyBag.isCondensingEnabled] Indicator whether this is a request for condensing
@param {boolean} [mPropertyBag.isContextBasedAdaptationEnabled] Indicator whether this is a context-based adaptation
@param {boolean} [mPropertyBag.parentVersion] Indicates if changes should be written as a draft and on which version the changes should be based on
@private
@returns {Promise} Promise resolves as soon as the writing was completed