Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jul 31, 2023 5:34:17 AM
Sep 6, 2021 9:17:13 AM
This article explains how to perform task chaining for your QCS apps using Qlik Application Automation. It'll start with a simple app reload example and finishes with a complex task chain example.
Content:
Create a new automation and follow these steps to reload a Qlik Cloud app:
Example automation:
Result in the editor:
The output from the Do Reload block contains information about the reload. The "status" field for example will indicate whether the reload was successful.
Reloads can either be done synchronously or asynchronously. This is configured by selecting a value for the field "Run Mode" in the inputs tab of the Reloads block.
Async: set the Run Mode to "Start reload and continue". When executed, the block will trigger a reload and output the reload id. The automation will continue immediately. Use the reload id in the block "Get Reload Record" to get the reload's status.
Sync: set the Run Mode to "Wait for reload to complete". When the block is executed, the automation won't continue until the reload is finished. Once the reload is finished the block will output the reload's result and the automation will continue.
Now for a basic task chain, drag an additional "Do Reload" block in the editor and attach it to the automation.
Go to the Inputs tab in the first Reloads block and set the Run Mode to "Wait for reload to complete". This way, the second reload block will only execute once the first reload block is finished.
In the previous example, the second reload will always execute once the first reload is finished. Regardless of the result. In some cases, you might only want to start the second reload when the first reload finished successfully.
A JSON file containing the above automation is attached to this article as basic_task_chain.json. How to import an automation
Bonus: feel free to add functionality to the "No" part of the Condition block. Maybe use the Email connector to send out an email or send a message to a channel in Slack.
In some cases, you'll want to trigger multiple app reloads to start simultaneously. And wait for all of them to finish before continuing the automation.
This part continues on the automation that was created in part 5. "Task chain with a loop".
In most use cases, what happens after the parallel reloads will depend on the returned results. To do this, we'll need to filter the results from the "Wait For Reloads To Complete" block.
A JSON file containing the above automation is attached to this article as parallel_task_chain_with_condition.json How to import an automation
Hi Emil,
I wanna setup reload of an App in two different times a day
1. Run @ 12:10 AM
2. Run @ 10:30 AM
How to setup an Automation for this scenario?
Thanks,
Kalyan
Hello @DGSundaram_Qlik
Do you think this helps you with your question? We have an open Automation Schedule idea (on-roadmap) which I suggest you leave your notes on and vote on.
In addition, I would recommend this article by Marius: Qlik Application Automation: How to use the create and update automation blocks, and change automati...
All the best,
Sonja
@DGSundaram_Qlik You can find an automation similar to the one you are looking for here: https://community.qlik.com/t5/Qlik-Application-Automation/scheduling-an-automation-at-specific-time/...
Some modifications would be needed, but I think this shows the concept of having an automation rescheduling itself based on a certain condition.
I am trying to figure out a way to get the Reload App Block to retry a couple times if it failed using a loop and reload another app in parallel. Is this possible to do this without creating additional automations?
When I try to set the reload to continue it will go back into the loop then fail due to the reload already running. Only way around I can think to get the code to run in a async loop is to create multiple automations to run the loop internally with on automation running them in parallel. But with the 5000 free automation limit we are concerned with costs building up.
Hello @MrWendal
I recommend posting this query directly in our Qlik Application Automation forum or otherwise suggest an idea in our ideation portal.
All the best,
Sonja
Hi,
I wish chaining reload tasks would be the same manner as in Sense or QlikView.
It will make life much easier..