Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We have a requirement of running tasks sequentially one after other in Nprinting 19.Here at one client we have more then 600 tasks and it is not possible to schedule trigger on daily basis or at fixed time as the reload completion time of applications is not fixed.
There is no job module available through which we can run task sequentially as like in Nprinting Version 16.
Is there any batch file or any workaround for performing this activity ?
If yes please share the process.
Thanks in advance.
As you said - there is no Job in NPrinting 17+, so for task chaining i suggest to use API (and to be frank at the moment it is the only way of automating it)
I have written qvs library and post about it here:
https://nprintingadventures.com
https://nprintingadventures.com/2019/04/08/nprinting-api-qlik-rest-subroutines/
note:
you may want to add limit parameter as mentioned in the second link at the bottom (in comment)
Hi Lech,
Thanks for Information. I have already tried this API method,not this script but was almost the same. By using this method,only the last created task or executed task is running rest are not affected. How can I run all the created tasks from a single created application?
Regards,
Krishna
I have already given you an answer.. In my NPrinting.qvs library I placed subroutine that loops through all tasks from nprinting app so you could you use it in "for each --> next" loop to fully automate it etc...
It is not easy to give you step-by-step instructions without knowing your setup, but if you go through my NPrinting.qvs script you will see how it works..
The normal steps would be to $(Must_Include=NPrinting.qvs) my library in your script and then call procedures like the one bellow
// Publish All Tasks from Application parameters: [AppName]
SUB NP_JOB_PublishAllTasks(vNPrintingAppName)
// Authenticate
Call NP_Authenticate;
Drop Table cookie_items;
// Get App
Call NP_GetAppID('$(vNPrintingAppName)')
Drop Table apps_items;
// Get Task
Call NP_GetTasks('$(vNPrintingTaskName)')
// Trigger Tasks
Call NP_TriggerTasks
Drop tables
task_items,
_post_items
;
ENDSUB
The call would look like the one below ->which would loop through all apps and trigger all tasks from them
For each vNPrintingAppName in 'YourNPrintingAppNamesArray'
Call NP_JOB_PublishAllTasks('$(vNPrintingAppName)')
Next
Did you actually use my library and checked it as i suggested in previous post?
I have just updated my NPrinting.qvs library to cater for the scenario you need.
Now you can just simply include it and call procedure where vNPrintingAppsArray is comma separated list of NPrinting application names wrapped in single quotes: 'App_Name_1,App_Name_2'.