Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
afbraga1
Contributor

Trigger NPrinting task on successful event of Publisher tasks

Hello everyone,

Recently changed from Qlikview Publisher to NPrinting in order to distribute reports. Because of this change, at the moment I am not able to trigger the NPrinting report tasks when a Publisher tasks is successful, due to them being two different entities. The issue I have is that the NPrinting task always run on a fixed timer, and if for some reason the Publisher task that refreshes the application runs later than the NPrinting task, the report won't be sent. Is there any way I can trigger NPrinting tasks based of Publisher tasks? Hopefully I managed to convey what I wanted to say. Thank you for your time.

Best regards,

André Braga

9 Replies
garyrizzobetsso
New Contributor

Re: Trigger NPrinting task on successful event of Publisher tasks

We are also looking for the functionality. The closest option we found so far was the API. The problem with the API is you need to provide credentials on every call, so not really automated.

aushikmakdoom
Contributor

Re: Trigger NPrinting task on successful event of Publisher tasks

I too am looking for a similar functionality where I want to trigger the Nprinting distribution after the successful load of my Qlik Sense App. I am using Nprinting Nov 2017 version and Qlik Sense June 2017 versions in my organization.

Thanks!

Employee
Employee

Re: Trigger NPrinting task on successful event of Publisher tasks

This is possible using the Qlik REST Connector v1.3 released with Feb 2018.   It will allow task chaining between Publisher and NP17 as well as Qlik Sense and NP17.  v1.3 ships with Qlik Sense Feb 2018. 

With Qlikview you should also

- enable dynamic update and use QVP connections to ensure the latest data reaches NPrinting

OR  reload the metadata of the NP connection prior to triggering the NP publish task  ( you can chain a metadata reload as well with the REST connector)

Its a technical solution requiring strong knowledge of the QlikView script , but the functions and usage is supported as is the Rest Connector . Also, you get to add the NPrinting task to publisher and qlik sense qmc allowing for centralized scheduling management.   So while technical , it gives you the required administration and flexibility to chain tasks.

ladislav
New Contributor III

Re: Trigger NPrinting task on successful event of Publisher tasks

Jonathan, I tried to implement Qlikview REST connector as you suggested and I am able to establish GET connection and pull all the tables. But when I want to make GET connection I get an error.


Specified value has invalid HTTP Header characters

Parameter name:name

Would you please suggest any solution? Or do you have any direct experience or example of such connection that might inspire me? How does your working setup looks like?

Thanks

Employee
Employee

Re: Trigger NPrinting task on successful event of Publisher tasks

take a look at this document

Task chaining from QlikView to NPrinting17 and Qlik Sense to NPrinting17

Its Qlik Sense specific but it applies to qlikview as well.  Couple points:

1. You need to login with  /login/ntlm endpoint first

2. You need to retrieve the cookie response , format it, and submit with the publish task execution call

3. the publish task execution call requires you set the ORIGIN header as well

It should be pretty clear from this document.  Also , i want to reiterate that this is technical , so more advanced knowledge of qlik script is required.  What i like is that this document exposes some little known tricks of the REST connector i was not aware of previously.

have fun.

ladislav
New Contributor III

Re: Trigger NPrinting task on successful event of Publisher tasks

Thank you for your response Jonathan.

I was following instructions from the document you linked all along and I am able to establish ntlm connection and cookie response for GET connection just fine. I am able to download tables with tasks, reports, connections etc. I understand the scripting well as I am experienced&certified developer.

However when I change GET connection to POST and I provide Origin (which I named 'Q Prod') then I get the mentioned error when I click on Test connection. Please see the picture. I tried my best to follow instructions from the document already.

Could you please have a look on pictures and help me with some suggestions? Thanks1.PNG2.PNG

3.PNG

ladislav
New Contributor III

Re: Trigger NPrinting task on successful event of Publisher tasks

I actually found solution.  My origin was incorrect. Now I have it working.

Thanks

Employee
Employee

Re: Trigger NPrinting task on successful event of Publisher tasks

That is good to hear.  The ORIGIN setting stymied us all for months. That and the cookie and the need for 2 separate connections.   Other actions with the API require use of other REST connector parameters.

I'm so glad you got this working.  It was a big pet project to get this exposed in a supportable way to experienced qlik people such as yourself and avoid 3rd party programs and gaps in support. 

I hope we can harden this code later into more of a feature capability. 

also , i'm working on a way to check the status of the publish task that is queued to ensure it is successful so the right status appears in the QMC on the task. 

agni_gold
Valued Contributor III

Re: Trigger NPrinting task on successful event of Publisher tasks

How can i refresh metadata using rest API ?