Skip to content

Instantly share code, notes, and snippets.

@theredpea
Last active October 23, 2018 20:14
Show Gist options
  • Save theredpea/ccbaaf48bb2ad0147f7ae9bf29e2a047 to your computer and use it in GitHub Desktop.
Save theredpea/ccbaaf48bb2ad0147f7ae9bf29e2a047 to your computer and use it in GitHub Desktop.

Architeqt notes

  • blueprintProp

    • only if you set up your Qlik to use this custom prop; I think my customer/client did not use that option;
    • and only if you query the endpoint to get the list of "blueprint" apps
    • distinction: blueprintProp (an app can be made into a blueprint; i.e. is considered a "template"); vs blueprint (the actual JSON object, mostly serializeapp results) /*
    • Nate says: The '@' is the tip that the config.qmc.blueprintProp (whose default value is 'Blueprint')

    • is a Qlik Custom Property which is created in the QMC

    • So it means if (all can be checked in QMC)

      1. Blueprint custom property exists;
      2. Blueprint custom property allows two possible values true / false;
      3. Blueprint custom property Can be applied to apps ;
      4. and some app has a value for this Blueprint custom property; either true or false;

    then this QRS query will find the false ones (+ne+true) <- not-equal-to-true */

  • blueprintTag

    • /**
      • Appended onto Generic Objects to tag them as blueprint item
      • Sets the approved flag to tell the client that it's a base core app item.
    • */
  • https://help.qlik.com/en-US/sense-developer/September2018/APIs/EngineAPI/definitions-NxVariableListItem.html

    • qIsReserved
    • qIsConfig
    • qIsScriptCreated
  • Customer adapts it this way:

    • return blueprintMaker

    • .applyTo(

      • appsIdsSync,
      • sourceAppBlueprint,
      • config.engine,
      • approvedObjects,
      • publishedObject,
      • appId,
      • sheetId,
      • modifiedDatesFilter);
  • The METHODS is just a name for the assemble-blueprints; which contains a function for each thing you can sync

    • sheets: syncSheet,

    • dimensions: syncDimension,

    • measures: syncMeasure,

    • snapshots: syncSnapshot,

    • stories: syncStory,

    • masterobjects: syncMasterObject,

    • variables: syncVariable,

    • bookmarks: syncBookmark

    • Customer modified sheets; architeqt assumes an object should always be re-published at the end; that published objects are the only things worth "templatizing/blueprinting/syncing"; Customer adds a check which will unpublish if needed

    • The actual syncing happens with one method: setFullPropertyTree(def); where def presumably comes from serializeapp, indeed, the latter of which uses getFullPropertyTree(def)

    • TODO: Why is syncStory a method here; here, but not in the serializeapp library; did I confuse something? Is snapshot a synonym?

    • Clarifying: the def

    • Applying with architeqt

    • architeqt iterate/maps over the sheets or stories; each item contains its def

    • maps results with a Promise to apply each sheet/story at a time

    • Creating with serializeapp

    • Note serializeapp does two things:

      1. Get lists; see LISTS (uses getList)
    1. Get specific objects; see METHOD_MAP (uses a unique method for each)
  • owner

  • Original Architeqt doesnt change owners;

    • only handles published sheets -- confirmed, Architeqt always re-publishes
    • I think only expected to handle approved sheets; pelase confirm? But if true, approved sheets aren't able to be unpublished or deleted, therefore doesn't much matter who is their owner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment