Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm using Automations to create a simple Flow.
start automation --> set Load Script --> end automations
The issue i'm running into is that the Set Load script is very inconsistant.
I've created an app (called Test1) 30 minutes before I created this automation. The set Load script in the automations uses the example Load script. See below.
start automation --> set Load Script (to app Test1) --> end automations
After loading the automations this script is no were to be seen.
So in the automations I changed the app where the automations need to places this load script. the app I selected (called Testapp) was an app created day's ago. Now I run the automation and first try the script is loaded into the app (Testapp) no problem.
after I deleted the script sections the automations created in the Testapp I run the automations again.
Now in the Testapp aswell no script to be seen.
My question is why is the automation's so inconsistant, it looks like that the automations sometimes works and sometimes it doesn't. I've looked at the Error in the automations for the run's I described above, there were no errors in those runs.
///$tab Section 1
Characters:
Load Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;
ASCII:
Load
if(RecNo()>=65 and RecNo()<=90,RecNo()-64) as Num,
Chr(RecNo()) as AsciiAlpha,
RecNo() as AsciiNum
autogenerate 255
Where (RecNo()>=32 and RecNo()<=126) or RecNo()>=160 ;
Transactions:
Load
TransLineID,
TransID,
mod(TransID,26)+1 as Num,
Pick(Ceil(3*Rand1),'A','B','C') as Dim1,
Pick(Ceil(6*Rand1),'a','b','c','d','e','f') as Dim2,
Pick(Ceil(3*Rand()),'X','Y','Z') as Dim3,
Round(1000*Rand()*Rand()*Rand1) as Expression1,
Round( 10*Rand()*Rand()*Rand1) as Expression2,
Round(Rand()*Rand1,0.00001) as Expression3;
Load
Rand() as Rand1,
IterNo() as TransLineID,
RecNo() as TransID
Autogenerate 1000
While Rand()<=0.5 or IterNo()=1;
Comment Field Dim1 With "This is a field comment";
///$tab Section 2
Table1:
LOAD * INLINE
[A, B
1, aa
2,cc
3,ee];
Table2:
LOAD * INLINE
[C, D
5, xx
4,yy
6,zz];
Hi MartW,
We've written an article on session delays in automations: https://community.qlik.com/t5/Knowledge/Automation-session-delays/ta-p/1886161
We will be adding this to the relevant blocks' descriptions.
Emile
Hi MartW,
In automations, setting the load script happens through a session.
And the automations' session is different than the session in the UI. That's why certain changes made in automations are not immediately available in the UI. It can take up to 40 minutes for these sessions to sync.
But the updated load script should be available in that automation, if you execute a Get Load Script block, it should return the updated script.
If you want to reload the app with the new load script, I suggest you do that through the automation. The reload will be handled by the Reloads API which exists outside the automation's session. To make the updated load script available for the Reloads API, you should execute a Save App block immediately after the Set Load Script block.
So then your automation would look like this:
We are looking into solutions to the session synchronization delay.
Kind regards,
Emile
Thanks for the answer. but would it be an idea to put somewere in automation a warning as it could be a delay of 40 minutes. Because i've spend 3+ hours trying to figure out why it was so inconsistant
Thank you, that's a good suggestion.
I'll see if we can add this info to all blocks using sessions.
Hi MartW,
We've written an article on session delays in automations: https://community.qlik.com/t5/Knowledge/Automation-session-delays/ta-p/1886161
We will be adding this to the relevant blocks' descriptions.
Emile