2 Replies Latest reply: Jun 15, 2016 2:39 AM by Magnus Lovsten RSS

    Script Parameters in QMC delay

    Amien Amien

      I have in QMC a parameter set in Reload --> Script parameters.

      I read this parameter in the QVW. I noticed when i change the parameter there is a delay.

      So when i change the parameter and manually reload the QVW file, the update parameter is not correct. When i wait 5 seconds and then manually reload the QVW in QMC, the parameter is passed though correctly. Anyone noticed this behavior? And knows how to solve this? I tried to put a SLEEP in the QVW, but it seems the parameter is already passed though, before that.


      Thanks in advanced

        • Re: Script Parameters in QMC delay
          Marcus Sommer

          I think the qmc needs some time to store these parameters and I could imagine that these values aren't stored directly else within a temp-file and all x seconds checked a service if there any changes and stored it then finally (with the purpose to avoid any conflicts between different services which want to write in this file) - which delayed the whole process. I'm not sure if there are available settings to customize these process and if it would be adviseable to do it.


          A sleep-statement within the qmc didn't work because the task meta-data will be read at first and to open the app is then the second step.


          I think there would be workarounds possible but very probably more inconvenient then to wait for 5 seconds.


          - Marcus

          • Re: Script Parameters in QMC delay
            Magnus Lovsten

            Hi Amien


            Unfortunately this is the way it's working.


            I'll try to explain:

            When you save a task, the Management Service needs to be stored in the QVPR database. After this it needs to be sent to the Distribution Service which will update it's local task definitions on file (default location C:\ProgramData\QlikTech\DistributionService\Tasks). Then all Distribution Services within the cluster (same handling with or without cluster) will read the task definitions from file into the memory of the application. First when this is done the task will run with the new definition.


            There is no way to see in the QMC when the new definition is ready. But just like you state, if you wait a few seconds it will run with the new defintion. The recommendation is never trigger a task directly after editing it.