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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rx98u5pq
Contributor III
Contributor III

Stop Automation Block (Qlik Cloud Services)

Hi all,

For the stop automation block how do you get the block to parse the value of the current RunID?  The automation ID is static as I would just use this automations' ID

Essentially I want the current automation to end when a condition is met but I'm having trouble getting this value.

Thanks

 

rx98u5pq_0-1744729739629.png

 

Labels (2)
11 Replies
marksouzacosta

Hi @rx98u5pq,

If you need to stop the current Run you should use the Stop block under Basic blocks.

marksouzacosta_0-1744742173882.png

If you need the current RunID for some reason, you can use automationid and runid formulas. Following the formulas*:

{ automationid }
{ runid }

marksouzacosta_1-1744742420830.png

marksouzacosta_3-1744742596217.png

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

rx98u5pq
Contributor III
Contributor III
Author

thank you Mark.  I had looked at that too but wanted to add some information as to why the reload stopped (e.g. app id reloads 1,2,3 have failed) and thought the stop automation may have been a little bit better.

rx98u5pq
Contributor III
Contributor III
Author

My current problem is that i want to stop the automation if a reload status = failed...and then list all the reload IDs that have failed.  I found a previous post (i think it was yours!) and set it up so that my automation runs a bunch of reloads at the same time, waits for the reload to complete. then runs a loop on the reload ID and tries to record the issue in an output block.. as shown below:

I keep getting the rror: 

 
code:
RELOADS-001
title:
Invalid request.
detail:
Parameter 'reloadId' must be a valid objectId format
I also feel that this is an incorrect solution as the output box would not build up a list of all the reload IDs but be overwritten with each run?



rx98u5pq_0-1745305873787.png

 

rx98u5pq
Contributor III
Contributor III
Author

Commenting on my own post here......... but I think the solution is to add a variable which appends a list for all the reload ids and app ids from get reload record 2 inside the loop.  then move the output box outside the loop.  

rx98u5pq
Contributor III
Contributor III
Author

Update: my changes have worked.  I have an variable which currently as follows:

rx98u5pq_0-1745415841459.png

which gives an output as like this:

rx98u5pq_1-1745415918044.png

This is in a loop and it adds a row for each failed app.

how can i get this list into a html message as when i try to, it does not let me format it correctly as when there are 2 apps it just says "array"

Any pointers would be appreciated.

marksouzacosta

Hi @rx98u5pq,

Conceptually, you have to create another variable that will be your HTML Email Body Message.
You initiate the variable with some content and add a Loop Block to loop through the Failed Reloads to fill the middle section of your HTML Email Body Message variable.

marksouzacosta_1-1745424060847.png

 

The Key is to use the Append operation:

marksouzacosta_2-1745424119148.png


At the end, you can use the variable in your Send Email block:

marksouzacosta_0-1745423932671.png

Keep in mind that you have to play around smart with your variables and HTML content to facilitate the whole HTML manipulation.

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

rx98u5pq
Contributor III
Contributor III
Author

Hi Mark, 

 

I have finally got an automation that does what I want (thanks to your great help)...however, there is one issue and I am not sure what it is.

- the app runs about 50 scripts concurrently

- some can be extracting large volumes of data

- there is a variable which compilates all the reload IDs

- the way for reload block checks these ids and makes sure they are finished 

- it should send an error if there is a failure

I thought this was working but now i noticed that the automation was marked as complete as the wait for reloads block did not actually wait until all scripts had run.  Have you came across this before?  I have attached some snippets of the automation.

So the automation may mark as complete but in reality it has not checked and waited for all reloads to complete.

 

03.png02.png01.png

 

Shai_E
Support
Support

Hi @rx98u5pq 

A run log and a workspace files will help in understanding what is going on.


rx98u5pq
Contributor III
Contributor III
Author

Thanks @Shai_E  - what are you referring to when you mention a workspace file?