Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sparur
Specialist II
Specialist II

Need help with triggering of EDX task in QlikView 11

Hello guys.

I need your help.

I'll try to explain my situation...

Earlier we had one Qlikview server 9 and we triggered our EDX task with special macro (VB script). This macro used GET / POST method like this:

REQUEST =          "<Global method=""RequestEDX"" key=""" & GetTimeLimitedRequestKey() &  """>"

REQUEST = REQUEST & "<i_TaskIDOrTaskName>" & EDXTASK & "</i_TaskIDOrTaskName>"

REQUEST = REQUEST & "<i_Password>" & EDXPSWD & "</i_Password>"

REQUEST = REQUEST & "<i_VariableName /><i_VariableValueList />"

REQUEST = REQUEST & "</Global>"

' Submit request to the QDS via HTTP

Dim xmlHttp

Set xmlHttp = CreateObject("Microsoft.XMLHTTP")

'xmlHttp.open "POST",QDS,false

xmlHttp.open "POST", QDS, false, Username, Password

xmlHttp.setRequestHeader "Content-Type","text/xml"

xmlHttp.setRequestHeader "Content-Length", Len(REQUEST)

xmlHttp.Send REQUEST

' show the response

'WScript.Echo xmlHttp.responseText

' Load the Response into an XML object

dim xml

set xml = createobject("Microsoft.XMLDOM")

xml.async = false

xml.loadXML(xmlHttp.responseText)

' Build an XSLT string to extract the TaskStartResult from the XML response

XSLT =        "<xsl:stylesheet version=""1.0"""

XSLT = XSLT & " xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"">"

XSLT = XSLT & "<xsl:output method=""html"" omit-xml-declaration=""yes""/>"

XSLT = XSLT & "<xsl:template match=""/"">"

XSLT = XSLT & "<xsl:for-each select=""RequestEDX/RequestEDXResult"">"

XSLT = XSLT & "<xsl:value-of select=""TaskStartResult""/>"

XSLT = XSLT & "</xsl:for-each>"

XSLT = XSLT & "</xsl:template>"

XSLT = XSLT & "</xsl:stylesheet>"

'WScript.Echo XSLT

' Load the XSLT into an XML object

dim xsl

set xsl = createobject("Microsoft.XMLDOM")

xsl.async = false

xsl.loadXML(XSLT)

' Transform the XML result to extract the TaskStartResult

' then skip the first 40 bytes of XML Header

RESULT = xml.transformNode(xsl)

Select case RESULT

Case "Success":

RC = 0

Case "TaskNotFound":

RC = 1

Case "OtherError":

RC = 2

Case Other

RC = 90

End Select

xsl = null

xml = null

xmlHttp = null

It's worked!

but now we upgraded to QlikView 11 and this approach doesn't support.

I know about this documentation: http://community.qlik.com/docs/DOC-2650

but there we have Visual Studio .NET project with c# programming code

and we have special EXE tool which can perform triggering.

But I can't use this EXE tool because I need perform trigger of my special EDX task from other QVW file (we use IE plugin on client side)

I can't understand how I can execute EXE tool (which exists on server side) with IE plugin.

Any applications try to execute on client side with IE plugin. So I think that I can't use this tool.

And I think that need a new macro which perform this functionality for QV11.

but I don't have very good skills in .NET scripting and I can't transform C# into VB script (for internal qlikview macro).

Moreover, I don't sure that it will be possible, but I hope

Somebody can help me?

11 Replies
nathanfurby
Specialist
Specialist

Late response only for the benefit of others....

If you don't want to put the API code in QV module then you can create a macro that just does a command line call of the EXE tool, which would then call the EDX task.

alex_stone
Creator
Creator

We have the same problem, we need to reload the dada in QVW app. How to trigger EDX that use macro?

Bill_Britt
Former Employee
Former Employee

Hi,

The last time I used the attached it worked. It is a VB script that you can use. I trigger it by using

cscript.exe c:\RequestEDX.vbs  "test" "test"

Where the first test is the task name and the second is the Password.

You will need to remove txt from the end.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
alex_stone
Creator
Creator

Hi Bill,

     Could you please share you RequestEDX.vbs script for us? Thanks.

Bill_Britt
Former Employee
Former Employee

Hi Alex,

It should be attached to my post.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
alex_stone
Creator
Creator

Hi Bill,

     Your script is for QlikView 10, but I use QlikView 11.

alex_stone
Creator
Creator

Hi Bill,

     Will prompt that access is denied when run RequestEDX.vbs script.

vbs.png

Whether we should log in with administrator? Or, we can update any setting only?

NareshGuntur
Partner - Specialist
Partner - Specialist

In Version 11, you need not go for vb script to run an EDX task.

you can try downloading qmsedx.exe file and it is just one line of script which you need to write to trigger a task through EDX.

Best Regards,

Naresh

alex_stone
Creator
Creator

Thank you for your response, do you have any solutions except use the above exe file?