39 Replies Latest reply: Nov 15, 2016 4:00 PM by Maximiliano Rodriguez Branched to a new discussion. RSS

    Trigger EDX Qlikview 10

    Marco Spirandelli

      I used to run the trigger edx function posted by bbt (http://community.qlik.com/forums/t/18961.aspx) on Qlikview 9 perfectly.

      However, I can't make it work on Qlikview 10. It stops at the command

      objHttp.Send strKeyRequest

      I read that the services have been merged. I am connected to http://myserver:4720/qtxs.asmx.

      Any help on this topic?

      Regards,

       

      Marco

        • Trigger EDX Qlikview 10
          Björn Wedbratt

          Hi Marco,
          Attached is a vbs file for version 10. I cannot take credit for this, it was written by a QT collegue (thanks Michael).

          You could also look into the QlikView SDK on how to use the full QMS API.

          Regards,
          Bjorn

           

          • Trigger EDX Qlikview 10

            Thank you for sharing this file Bjorn Wedbratt and for the detailed process thanks to Ben Thomas.

             

            I know this sounds stupid but can you(jpengiu) tell me how can I use the QVW that you posted above? I am trying to kick off all the tasks right after our Tidal services are done with. I have managed to create the batch file to run the VBS file in turn running all the dashboards but how can this batch file be automated , I mean how can we run this batch file right after our Tidal jobs are done automatically ? Please help.

             

            Regards,

            Abha


              • Trigger EDX Qlikview 10
                Jeremy Fourman

                Within your job scheduler (Tidal) after its task is complete it would execute your batch file.

                  • Trigger EDX Qlikview 10
                    Giuseppe Pensalfini

                    I'm Italian and now I'm on holiday and not in office.

                    I think it's possible.

                     

                    If you create a window batch file like this:

                     

                    File name startedx.bat

                    this file must contain for example:

                    C:\"Program Files"\QlikView\Qv.exe /NoSecurity C:\RUN_TASK_BY_EDX.qvw

                     

                    in RUN_TASK_BY_EDX.qvw in Document/properties/Triggers(Eventi) OnOpen (su apertura)  you set to run the macro "RunTask".

                     

                     

                    best regards

                    jpengiu

                      • Trigger EDX Qlikview 10
                        Luca Marasi

                        Hi Jpengiu your macro is very intersting, but I have a problem, when i try to run this i received the error "invalid sintax" on send method.

                        I don't have publisher but only server

                        I have changed the parameters of http:\\ and the name of task (no password) and user and password to login on server.

                         

                        Can you explain better the step to run the macro? It needs configuartion in the server?

                         

                        Thank You

                          • Trigger EDX Qlikview 10
                            Giuseppe Pensalfini

                            This is my server security setting but I don't know if they are important for EDX.

                             

                            -NTFS Authorization

                            -Allow macro execution on server

                            -Allow unsafe Macro execution

                            -Enable server push over http.....

                             

                             

                            url = "http://servername.serverdomain.com:4720/qtxs.asmx"   

                             

                             

                            The server url is the same of QlikView Enterprise Management Console/System/Setup/Distribution Services/General/Url

                             

                            User  must be on server in group "QlikView Administrators" and "Qlikview EDX" (on Server Windows)

                              • Trigger EDX Qlikview 10
                                Luca Marasi

                                We have the same configuration, but in my environment the macro not run properly.

                                 

                                I don't understand if the error depends of parameters or method.

                                 

                                I try to run the macro from my client with Qlikview desktop

                                • Re: Trigger EDX Qlikview 10
                                  Logesh Jayaraman

                                  Hi Jpengiu,

                                   

                                  Thanks for your  EDX code it was really useful

                                  i have used your EDX, it was running the task. But the problem is i have some set variables in the script those variable values are not getting set when i am running your script.

                                   

                                  Also another thing is i want to user should wait till the task execution completes. As of now user can just click ok and play around the screen with the recent data. And i am not sure for me i am getting warning mesage.

                                   

                                  It would be really helpful if you were able to help me why the Set variables are not storing the values.

                        • Trigger EDX Qlikview 10
                          Telmo Duarte

                          Hi all,

                           

                          In Publisher 8.5 we could trigger the jobs with EDX and just calling a URL:

                          http://myserver/ControlPanel/Job/RequestEDX.aspx?JobIdOrJobName=myjob&QueueIfRunning=True&RedirectUrl=&EdxPassword=

                           

                          Is this method also possible in QV10?

                           

                          Thanks.

                            • Trigger EDX Qlikview 10
                              Jerry Somsen

                              No.  That call is no longer possible in QV10.

                                • Re: Trigger EDX Qlikview 10

                                  Hello,

                                   

                                  I also have a requirement where I have to reload the document via EDX.I embedded the script in the button click.

                                  But on cllicking the button, nothing happens...

                                   

                                  These are the variables.

                                   

                                   

                                  url = "localhost:4780/qtxs.asmx"  

                                  doc = "RN60-ConsolidatedCostofProgrammingReport.qvw"                      

                                  userID = "subexworld.org\optima.test"                  

                                  pass = "rocpsgvtdice123"  

                                   

                                  It doesn't even give me the 'Are you sure' prompt.

                                   

                                  My access point is IE....qllikview version is 9.00 SR7

                                   

                                  Thanks,

                                  Anju

                                    • Re: Trigger EDX Qlikview 10
                                      Logesh Jayaraman

                                      Hi Anju,

                                       

                                      Are you getting any error messages?.

                                        • Re: Trigger EDX Qlikview 10

                                          Hi brindlogcool,

                                           

                                          Thanks for replying. No, I am not getting any error.

                                          But, is it possible to achieve it without edx?....I had a read a post on using control file that was scheduled to reload..Any workaround?

                                           

                                           

                                          -Anju

                                            • Re: Trigger EDX Qlikview 10
                                              Logesh Jayaraman

                                              I have been using EDX in version 10. And there is so much change in the way the EDX works between version 9,10,11. It would be easier if possible you can upload your files . There are experts in the community they can help you out.

                                                • Re: Trigger EDX Qlikview 10

                                                  Hi,

                                                   

                                                  This is the edx macro..

                                                   

                                                  '*****************************************************************************************

                                                  '*

                                                  '*  R E L O A D     E D X

                                                  '*

                                                  '*****************************************************************************************

                                                  Sub RunTask

                                                  tp = MsgBox("Are you sure?", 1)

                                                  if tp=2 then

                                                  exit sub

                                                  end if

                                                   

                                                  CONST SUCCESS                   = 0   

                                                  CONST TASKNOTFOUND              = 1

                                                  CONST TASKISALREADYRUNNING      = 2

                                                  CONST NOEDXTRIGGERFOUND         = 3

                                                  CONST OTHERERROR                = 9

                                                  CONST WAITING                   = 0   

                                                  CONST RUNNING                   = 90   

                                                  CONST FINISHEDWITHWARNINGS      = 91

                                                  CONST FINISHEDWITHERRORS        = 92

                                                   

                                                  dim xmlHttp

                                                   

                                                  set xmlHttp = CreateObject("Microsoft.XMLHTTP")

                                                  set xml = createobject("Microsoft.XMLDOM")

                                                  set xmlObj = createobject("Microsoft.XMLDOM")

                                                                      

                                                  '***********************************************************************

                                                  ' This ROWS must be modified

                                                  '***********************************************************************

                                                  url = "http://localhost:4780/qtxs.asmx"   

                                                  doc = "reloadvictim.qvw"                      

                                                  userID = "optima.test"                  

                                                  pass = "rocpsgvtdice123"                                     

                                                  '***********************************************************************

                                                  ITERATIONS=10000

                                                  DELAY=30

                                                   

                                                  METHOD = "<Global method=""RequestEDX"" key=""" & GetTimeLimitedRequestKey(url, doc, userID, pass) &  """>"

                                                  METHOD = METHOD & "<i_TaskIDOrTaskName>" & doc & "</i_TaskIDOrTaskName>"

                                                  METHOD = METHOD & "<i_Password>" & pass & "</i_Password>"

                                                  METHOD = METHOD & "<i_VariableName>vCond</i_VariableName><i_VariableValueList><string>1</string></i_VariableValueList>"

                                                  METHOD = METHOD & "</Global>"

                                                   

                                                   

                                                   

                                                  DIM AsAt

                                                  AsAt = Now()

                                                  ' Submit request to the QDS via HTTP

                                                  xmlHttp.open "POST",url,false, userID, pass

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

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

                                                  xmlHttp.Send METHOD

                                                   

                                                   

                                                   

                                                  select case xmlHttp.Status

                                                      case 200:

                                                        

                                                          ' Load the Response into an XML object

                                                          xml.async = false

                                                          xml.loadXML(xmlHttp.responseText)

                                                   

                                                          ' Parse the XML Response extracting Status, Log, etc

                                                          TaskStartResult = ""

                                                          set xmlObj = xml.SelectNodes("//RequestEDX/RequestEDXResult/*")

                                                          for node = 0 to (xmlObj.length -1)

                                                              select case xmlObj.item(node).nodeName

                                                                  case "TaskStartResult":

                                                                      TaskStartResult = xmlObj.item(node).text

                                                   

                                                   

                                                                    

                                                                      select case TaskStartResult

                                                                          case "Success":

                                                                              TaskStartResultCode = SUCCESS

                                                   

                                                                          case "TaskNotFound":

                                                                             TaskStartResultCode = TASKNOTFOUND

                                                   

                                                                          case "TaskIsAlreadyRunning":

                                                                              TaskStartResultCode = TASKISALREADYRUNNING

                                                   

                                                                          case "NoEDXTriggerFound":

                                                                              TaskStartResultCode = NOEDXTRIGGERFOUND

                                                   

                                                                          case "OtherError":

                                                                              TaskStartResultCode = OTHERERROR

                                                   

                                                                          case else

                                                                              TaskStartResultCode = OTHERERROR

                                                   

                                                                      end select 'TaskStartResult

                                                                      RC = TaskStartResultCode

                                                   

                                                                  case "TaskStartResultCode":

                                                                      select case xmlObj.item(node).text

                                                                          case "0":

                                                                              TaskStartResultCode = SUCCESS

                                                   

                                                                          case "1":

                                                                              TaskStartResultCode = TASKNOTFOUND

                                                   

                                                                          case "2":

                                                                              TaskStartResultCode = TASKISALREADYRUNNING

                                                   

                                                                          case "3":

                                                                              TaskStartResultCode = NOEDXTRIGGERFOUND

                                                   

                                                                          case "9":

                                                                              TaskStartResultCode = OTHERERROR

                                                   

                                                                          case else

                                                                              TaskStartResultCode = OTHERERROR

                                                   

                                                                      end select 'TaskStartResultCode

                                                                      RC = TaskStartResultCode

                                                   

                                                                  case "Log":

                                                                     

                                                                      Message = Split( xmlObj.item(node).text, chr(9))

                                                   

                                                              end select 'nodeName

                                                          next 'iteration

                                                   

                                                      case 401:

                                                          msgbox "ERROR: The credentials for QDS (" & url & ") are incorrect."

                                                          exit sub

                                                      case 403:

                                                          msgbox "ERROR: User is not authorised to request EDX tasks."

                                                          exit sub

                                                      case 404:

                                                          msgbox "ERROR: The URL for QDS (" & url & ") is incorrect."

                                                          exit sub

                                                      case 503:

                                                          msgbox "ERROR: The QDS (" & url& ") is unavailable."

                                                          exit sub

                                                      case 12029:

                                                          msgbox "ERROR: The QDS (" & url & ") is not accessible."

                                                          exit sub

                                                   

                                                      case else

                                                          msgbox "ERROR: An error (" & xmlHttp.Status & ") occurred trying to access the QDS."

                                                        

                                                   

                                                  end select 'xmlHttp

                                                   

                                                   

                                                   

                                                  '-----------------------------------------------------------------------------

                                                  '- GetTaskStatus

                                                  '-----------------------------------------------------------------------------

                                                  i = 0

                                                  Finished = False

                                                  WAIT = true

                                                   

                                                   

                                                  do while (TaskStartResultCode = SUCCESS) AND (WAIT = True) AND (i < ITERATIONS) AND Finished=False

                                                  '    sleep( DELAY * 1000)

                                                     

                                                   

                                                   

                                                     

                                                      METHOD = "<Global method=""GetTaskStatus"" key=""" & GetTimeLimitedRequestKey(url, doc, userID, pass) &  """>"

                                                      METHOD = METHOD & "<TaskNameOrId>" & doc & "</TaskNameOrId>"

                                                      METHOD = METHOD & "</Global>"

                                                      AsAt = Now()

                                                   

                                                      ' Submit request to the QDS via HTTP

                                                      xmlHttp.open "POST",url,false, userID, pass

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

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

                                                      xmlHttp.Send METHOD

                                                   

                                                   

                                                    '

                                                   

                                                   

                                                      select case xmlHttp.Status

                                                          case 200:

                                                             

                                                              xml.async = false

                                                              xml.loadXML(xmlHttp.responseText)

                                                   

                                                            

                                                              set xmlObj = xml.SelectNodes("//GetTaskStatus/GetTaskStatusResult/TaskStatus/*")

                                                              for node = 0 to (xmlObj.length -1)

                                                                 

                                                                  select case xmlObj.item(node).nodeName

                                                                      case "Status":

                                                                          GetTaskStatus = xmlObj.item(node).text

                                                   

                                                   

                                                   

                                                                          select case GetTaskStatus

                                                                              case "Waiting":

                                                                                  Finished = True

                                                                                  RC = WAITING

                                                                                  Msgbox AsAt & chr(9) & "[Waiting.........]"

                                                   

                                                                              case "Running":

                                                                                  Finished = False

                                                                                  RC = RUNNING

                                                                                  Msgbox AsAt & chr(9) & "[Waiting.........]"

                                                   

                                                                              case "FinishedWithWarnings":

                                                                                  Finished = True

                                                                                  RC = FINISHEDWITHWARNINGS

                                                                                  Msgbox AsAt & chr(9) & "[" & GetTaskStatus & "]"

                                                   

                                                                              case "FinishedWithErrors":

                                                                                  Finished = True

                                                                                  RC = FINISHEDWITHERRORS

                                                                                  Msgbox AsAt & chr(9) & "[" & GetTaskStatus & "]"

                                                   

                                                                              case else

                                                                                  Finished = True

                                                                                  RC = OTHERERROR

                                                                                  Msgbox AsAt & chr(9) & "[Errore!]"

                                                   

                                                                          end select

                                                   

                                                                      case "LastLogMsg":

                                                                          LastLogMsg = xmlObj.item(node).text

                                                                          if ShowMessages = True then

                                                                             Msgbox " "

                                                                              Msgbox LastLogMsg

                                                                              Msgbox " "

                                                                          end if

                                                   

                                                                  end select 'nodeName

                                                              next 'node

                                                   

                                                          case 401:

                                                              Msgbox "ERROR: The credentials for QDS (" & url & ") are incorrect."

                                                              exit sub

                                                          case 403:

                                                              Msgbox "ERROR: User is not authorised to Get Task Status....."

                                                              exit sub

                                                   

                                                          case 404:

                                                              Msgbox "ERROR: The URL for QDS (" & url & ") is incorrect."

                                                              exit sub

                                                   

                                                          case 503:

                                                              Msgbox "ERROR: The QDS (" & url & ") is unavailable."

                                                              exit sub

                                                          case 12029:

                                                              Msgbox "ERROR: The QDS (" & url & ") is not accessible."

                                                              exit sub

                                                   

                                                          case else

                                                              Msgbox "ERROR: An error (" & xmlHttp.Status & ") occurred trying to access the QDS."

                                                              exit sub

                                                   

                                                      end select

                                                   

                                                      i = i + 1

                                                  Loop

                                                   

                                                   

                                                   

                                                   

                                                  xmlObj  = null

                                                  xml     = null

                                                  xmlHttp = null

                                                   

                                                   

                                                  end sub

                                                   

                                                   

                                                   

                                                  '-----------------------------------------------------------------------------

                                                  '- GetTimeLimitedRequestKey

                                                  '-----------------------------------------------------------------------------

                                                  Function GetTimeLimitedRequestKey(dsURL, document, userID, password)    

                                                  set xmlHttp = CreateObject("Microsoft.XMLHTTP")

                                                  set xml = createobject("Microsoft.XMLDOM")

                                                  set xmlObj = createobject("Microsoft.XMLDOM")

                                                          

                                                      DIM METHOD '

                                                      METHOD ="<Global method=""GetTimeLimitedRequestKey"" />"

                                                   

                                                      xmlHttp.open "POST",dsURL,false, userID, password

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

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

                                                      xmlHttp.Send METHOD

                                                   

                                                      select case xmlHttp.Status

                                                          case 200:

                                                             

                                                              xml.async = false

                                                              xml.loadXML(xmlHttp.responseText)

                                                   

                                                              set xmlObj = xml.SelectNodes("//GetTimeLimitedRequestKey")

                                                              for node = 0 to (xmlObj.length -1)

                                                                  if xmlObj.item(node).nodeName = "GetTimeLimitedRequestKey" then

                                                                      GetTimeLimitedRequestKey = xmlObj.item(node).text

                                                                 end if

                                                              next 'node

                                                   

                                                          case 401:

                                                              msgbox "ERROR: The credentials for QDS (" & dsURL & ") are incorrect."

                                                              exit function

                                                   

                                                          case 403:

                                                              msgbox  "ERROR: User is not authorised to interact with QDS."

                                                              exit function

                                                   

                                                          case 404:

                                                              msgbox "ERROR: The URL for QDS (" & dsURL & ") is incorrect."

                                                              exit function

                                                          case 503:

                                                              msgbox  "ERROR: The QDS (" & dsURL & ") is unavailable."

                                                              exit function

                                                          case 12029:

                                                              msgbox  "ERROR: The QDS (" & dsURL & ") is not accessible."

                                                              exit function

                                                          case else

                                                              msgbox  "ERROR: An error (" & xmlHttp.Status & ") occurred trying to access the QDS."

                                                   

                                                      end select

                                                   

                                                  End Function

                                                   

                                                  Sub Rld

                                                  Call RunTask

                                                  End Sub

                                                    • Re: Trigger EDX Qlikview 10

                                                      The username optima.test is present in 'QlikView Administrators'. I also manually create a group 'QlikView EDX' and added the user to it.

                                                       

                                                      The link http://localhost:4820/qtxs.asmx

                                                      displays'Internet explorer cannot display the webpage'

                                                       

                                                      -Anju

                                                      • Re: Trigger EDX Qlikview 10
                                                        Alex Xie

                                                        Hi,

                                                         

                                                        '***********************************************************************

                                                        ' This ROWS must be modified

                                                        '***********************************************************************

                                                        url = "http://localhost:4780/qtxs.asmx"  

                                                        doc = "reloadvictim.qvw"                     

                                                        userID = "optima.test"                 

                                                        pass = "rocpsgvtdice123"                                    

                                                        '***********************************************************************

                                                         

                                                        Question 1: url: How can I get the correct url information?

                                                         

                                                        Question 2: userID: is the domain user?

                                                         

                                                        Question 3:

                                                             will pop up the error message when I click the reload button.

                                                         

                                                             ERROR: The QDS(http://xxxx:4780/qtxs.asmx) is unavailable.

                                                        • Re: Trigger EDX Qlikview 10
                                                          Irene Bagnoli

                                                          Hi Anju,

                                                          I was looking at the code you published above.

                                                          I'm actually looking for a way to read the status of a task in QEMC and then (eventually) start a reload.

                                                          I think the code above could be useful for my purpose, but I need to ask you a question...

                                                          what GetTimeLimitedRequestKey stands for? what's the role of this key?

                                                          Thank you so much

                                                          IB

                                            • Re: Trigger EDX Qlikview 10

                                              Hello Gurus,

                                              Urgent help required.

                                              I am working on triggerring the QMC tasks in batch(based on ETL Load completion) instead of scheduling/time trigger in QMC. The idea is to reduce the load on QMC and overcome the limitation  of n number of simultaneous tasks in QMC. I tried the /r or /l option but it is doing a plain reload on the Client(In a new window) than on the Server. I want to remove the scheduling from QMC, but want to monitor those tasks in QMC. In other words, the existing waterfall QMC tasks are to be triggered from windows bat program based on ETL Load completion so that the QMC schedules can be removed, but still the tasks should be able to be monitored in QMC.

                                               

                                              Thanks

                                              BJ

                                              • Re: Trigger EDX Qlikview 10
                                                Maximiliano Rodriguez

                                                Good afternoon,

                                                Someone could guide me as I can the name of my URL for the QDS.

                                                Because I want to complete the next line and it gives me error

                                                Url = "server: 4720 / qtxs.asmx"

                                                Greetings.