Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using one of of the automation as a task chain where I have configured with 30 app reloads in a single automation but the problem is its getting timed out at 4 hrs. so planning to split the automation into two parts like 15 and 15.My idea here is that my second automation would triggered based on the first automation run is successful.
Any suggestions would be highly appreciated.
Regards,
Raju
Hi @marksouzacosta ,
$(Must_Include=lib://DataFiles/ReloadApp.qvs);
AppIDs:
Load * Inline [
AppID
appid1
appid2
appid3
];
FOR i = 1 TO NoOfRows('AppIDs')
LET vAppID = Peek('AppID', $(i) - 1, 'AppIDs');
Call ReloadApp('$(vAppID)');
NEXT
I am using above script but giving unknow statement error.
Regards,
Raju
Regarding the REST Connection, every time you create a REST Connection Qlik in fact executes the command. So, in the POST Connection you must provide valid parameters.
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @marksouzacosta ,
I have configured with correct details and used in of the appid to create the connection in the requested body parameters.
When I am looping through each appid I am getting error while executing the qvs file.
Regards,
Raju
Can you please also share the code in your QVS file? I think it is something there.
One note: reloading your applications like that will not load them in sequence, but in "parallel"- or close to this. The Post Reload request will not wait the reload to finish to call the next one. That is why I have recommended to add the Call ReloadApp Sub at the end of every Load Script of every application.
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @marksouzacosta ,
LIB CONNECT TO 'ReloadsAPI';
SUB ReloadApp(AppID)
TRACE 🔄 Starting reload for AppID: $(AppID);
// Create JSON body with AppID
LET vJSONBody = '{ "appId": "' & '$(AppID)' & '" }';
// Make API call to trigger app reload
REST_Reload:
LOAD
id AS ReloadID
FROM [lib://ReloadsAPI]
(REST, WITH CONNECTION (BODY "$(vJSONBody)"));
// Capture the reload ID from API response
LET vReloadID = Peek('ReloadID', 0, 'REST_Reload');
// Log success or failure
IF Len(Trim(vReloadID)) > 0 THEN
TRACE ✅ Reload triggered successfully for AppID: $(AppID), Reload ID: $(vReloadID);
ELSE
TRACE ❌ Reload failed for AppID: $(AppID);
ENDIF
END SUB;
LIB CONNECT TO 'ReloadsAPI';
SUB ReloadApp(AppID)
TRACE 🔄 Starting reload for AppID: $(AppID);
// Create JSON body with AppID
LET vJSONBody = '{ "appId": "' & '$(AppID)' & '" }';
// Make API call to trigger app reload
REST_Reload:
LOAD
id AS ReloadID
FROM [lib://ReloadsAPI]
(REST, WITH CONNECTION (BODY "$(vJSONBody)"));
// Capture the reload ID from API response
LET vReloadID = Peek('ReloadID', 0, 'REST_Reload');
// Log success or failure
IF Len(Trim(vReloadID)) > 0 THEN
TRACE ✅ Reload triggered successfully for AppID: $(AppID), Reload ID: $(vReloadID);
ELSE
TRACE ❌ Reload failed for AppID: $(AppID);
ENDIF
END SUB;
This is the script I am using in qvs file.
can you give me some example which needs to be called.
Regards,
Raju
I did some adjustments to your code. This should work if I haven't missed anything:
SUB ReloadApp(AppID)
TRACE :counterclockwise_arrows_button: Starting reload for AppID: $(AppID);
// Create JSON body with AppID
LET vJSONBody = '{""appId"":""$(AppId)"",""partial"":false}';
LIB CONNECT TO 'ReloadsAPI';
// Make API call to trigger app reload
REST_Reload:
SQL SELECT
"id"
FROM
JSON (wrap on) "root"
WITH CONNECTION (
BODY "$(vJSONBody)"
)
;
// Capture the reload ID from API response
LET vReloadID = Peek('id', 0, 'REST_Reload');
// Log success or failure
IF Len(Trim('$(vReloadID)')) > 0 THEN
TRACE :white_heavy_check_mark: Reload triggered successfully for AppID: $(AppID), Reload ID: $(vReloadID);
ELSE
TRACE :cross_mark: Reload failed for AppID: $(AppID);
ENDIF
END SUB;
Then, at the end of first application Load Script you will add the include statement and this line:
Call ReloadApp('e104b1ef-0747-48e1-9947-79537aaa8558'); // The AppID of the next Application
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Interesting approaches.
What I did is to have a main automation that handles the reload chains high-level and on the fly creates automations to perform (trigger) the actual reloads. These ephemeral automations then, upon completion, clean up after themselves - trigger their own deletion.
Hi @tolange,
I usually avoid using automations due the high frequency of the reloads needed and the limited amount of Automation Calls per month - and the limitations of designing complex tasks dependencies. I ended creating my own Task Manager only using Qlik Load Script and Qlik APIs - but this is another story.
Fortunately, new changes are coming to Qlik Cloud Subscriptions that will increase the number of Automation Calls and we may have soon the Qlik Cloud official Task Manager.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @tolange ,
can you explain this deeper or share any community article which helps us in setting the process flow.
Regards,
Raju