Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Benqbyao
Contributor II
Contributor II

Query on Qliksense App deployment (by API) to avoid downtime to End User

Currently for Qliksense App deployment,  we will follow below manual flow for existing app on target server:

1. import the new version of the app without data to target server

2. replace the existing app with the new version of the app by using Publish + Replace function

3. then the target app is updated with new version without data

4. Reload the app 

5. Reload completed and the app is refreshed with data

as following the above flow, between step 2 and step 5,  the target app will be showing No data to End User (the length of the period is depending how long the reload needs to take, and for our case, lots of apps take more thank 1.5 hours to complete the reload), So we have one Requirement from business that the App should be always available with data to End User Even during the deployment.

So May I check with Qlik Support if any function of Qliksense can fulfill this requirement ?

if yes, whether any API (or a flow of API call) support this as well so that we can automate the deployment process as well. 

thanks for your support in advance

Labels (2)
1 Solution

Accepted Solutions
Marc
Employee
Employee

The functionality in QlikView publisher is different to Qlik Sense.

In QlikView the Publisher Reloads the app then distributes the reloaded copy for consumption.
The script in my previous post, essentially replicates that functionality. Except where the publisher would monitor the reload process and replace the client app upon completion, the script does it.

 

the options are

Import the new version (without data) replacing the Visualization app. Then reload the app. (users have to wait until the new version is reloaded to use the app)

or 

Import the new version and reload it. after the reload is completed replace the visualization app. (as per the script in the previous post)

 

 

 

View solution in original post

4 Replies
Marc
Employee
Employee

Why not reload the app prior to doing the publish replace?

1. import the new version of the app without data to target server

- Reload the new version of the app 

- Once reload is complete replace the original 

2. replace the existing app with the new version of the app by using Publish + Replace function

 

the following uses the PowerShell module Qlik-CLI-Windows 

$AppFileToImport = "C:\ProgramData\Qlik\Sense\Repository\DefaultApps\Reloads Monitor.qvf"
$AppIDToReplace = "19aa6b3a-7c11-4577-8df1-3dbbbcde8ae4"

Connect-Qlik -TrustAllCerts
## https://help.qlik.com/en-US/sense-developer/February2022/APIs/RepositoryServiceAPI/index.html?page=319
$ImportedApp = Import-QlikApp -file $AppFileToImport -name "Temp-$($AppIDToReplace)" -upload

$timecheck = [datetime]::Now
## https://help.qlik.com/en-US/sense-developer/February2022/APIs/RepositoryServiceAPI/index.html?page=892
Invoke-QlikPost "/qrs/app/$($ImportedApp.id)/reload"

$reloadTask = Get-QlikReloadTask -Filter "app.id eq $($ImportedApp.id)" -Full -raw
## compare the last starttime to the timecheck (pause to wait for the task to start
while ([datetime]$reloadTask.operational.lastExecutionResult.startTime -lt $timecheck ){
Start-Sleep -Milliseconds 500
$reloadTask = Get-QlikReloadTask -Filter "app.id eq $($ImportedApp.id)" -Full -raw
}

$QlikTask = Get-QlikTask -filter "id eq $($reloadTask.id)" -full
while (-not ($QlikTask.operational.lastExecutionResult.status -in "FinishedFail","FinishedSuccess")){
Start-Sleep -Seconds 1
$QlikTask = Get-QlikTask -filter "id eq $($reloadTask.id)" -full
}

if ($QlikTask.operational.lastExecutionResult.status -eq "FinishedSuccess"){
    Switch-QlikApp -id $ImportedApp.id -appId $AppIDToReplace
    ## Optional to clean up
    #Remove-QlikApp $ImportedApp.id
}
Benqbyao
Contributor II
Contributor II
Author

Hi Marc,

thanks for your suggestion.  the approach suggested by you looks more like an indirect way - Import, then reload new app first,  and finally replace the old app with the new reloaded new app.


We are looking for whether QlikSense can have similar feature like Qlikview that only reload completed then will replace the target dashboard (can complete within one step so that we no need to monitor whether the new app reload complete or not), so that the reload activity is transparent to end users. thanks

 

Marc
Employee
Employee

The functionality in QlikView publisher is different to Qlik Sense.

In QlikView the Publisher Reloads the app then distributes the reloaded copy for consumption.
The script in my previous post, essentially replicates that functionality. Except where the publisher would monitor the reload process and replace the client app upon completion, the script does it.

 

the options are

Import the new version (without data) replacing the Visualization app. Then reload the app. (users have to wait until the new version is reloaded to use the app)

or 

Import the new version and reload it. after the reload is completed replace the visualization app. (as per the script in the previous post)

 

 

 

Benqbyao
Contributor II
Contributor II
Author

Thanks so much Marc for Clarification and providing the options, Much appreciated😀