QPR ProcessAnalyzer ScriptLauncher

From QPR ProcessAnalyzer Wiki
Revision as of 11:04, 18 May 2015 by RiiPekk (talk | contribs) (306382)
Jump to navigation Jump to search

QPR ProcessAnalyzer ScriptLauncher is a tool which enables you to run QPR ProcessAnalyzer scripts on a QPR ProcessAnalyzer Server. QPR ProcessAnalyzer ScriptLauncher is part of the installation package of QPR ProcessAnalyzer and includes the following files (in addition to DLL files and an XML file):

  • Qpr.ProcessAnalyzer.ScriptLauncher.exe (an executable file)
  • Qpr.ProcessAnalyzer.ScriptLauncher.exe.config (a configuration file)

These files are located in the QPR Connector folder that is under the QPR ProcessAnalyzer Installation folder (e.g. C:\Program Files (x86)\QPR ProcessAnalyzer 2015\QPR Connector). Note that QPR Connector needs to be selected to be installed when installing QPR ProcessAnalyzer (by default it is).

Configuring QPR ProcessAnalyzer ScriptLauncher

Before you can start running scripts with QPR ProcessAnalyzer ScriptLauncher, you need to configure the connection and other parameters for the tool.

Note: You need to have write access to the folder where the files for QPR ProcessAnalyzer ScriptLauncher are located.

1. Open the Qpr.ProcessAnalyzer.ScriptLauncher.exe.config file in a text editor.
2. Within that file, go to the following section:

<userSettings>
        <Qpr.ProcessAnalyzer.ScriptLauncher.Properties.Settings>

3. Configure the values for the following parameters:

  • ConnectionType: Service (if you are connecting to a service) or Database (if you are connecting to a connection string)
  • LogOnName: your QPR ProcessAnalyzer username
  • Password: your QPR ProcessAnalyzer password
  • ConnectionString: the connection string to the QPR ProcessAnalyzer database (e.g. Server=localhost;DataBase=<database_name>;Trusted_Connection=True)
  • ServiceUrl: the URL of your service
  • ProjectId: the ID of the project (0 = default)
  • ModelId: the ID of the model (0 = default)
  • FilterId: the ID of the filter (0 = default)
  • ScriptId: the ID of the script you want to run. You can copy the ID from the Script Manager in QPR ProcessAnalyzer Excel Client. If ScriptId is 0 (or less than 0), there will be an error written into the log.

The default running context depends on the configuration of the parameters for the different ID's listed above in the following order so that the first found context definition in the configuration file will be used when running the script:

  1. FilterId (in case the value for this parameter is greater than 0)
  2. ModelId (in case the value for this parameter is greater than 0)
  3. ProjectId (in case the value for this parameter is greater than 0)
  4. The currently running context

4. In case you want to change location of the log file that will be created, you can do that by changing the value of the parameter LogFilePath in the following section of the configuration file:

<applicationSettings>
        <Qpr.ProcessAnalyzer.ScriptLauncher.Properties.Settings>

Note that the log folder needs to exist before running QPR ProcessAnalyzer ScriptLauncher and you must have rights to write to that folder.
By default, the log file will be stored in the same folder as the configuration file.

Running QPR ProcessAnalyzer ScriptLauncher

After you have configured the parameters as explained in the section above, run Qpr.ProcessAnalyzer.ScriptLauncher.exe. You can also run it from Command Prompt.
Note: You need to have RunScripts rights assigned to you in QPR ProcessAnalyzer.

When the script has been run, script progress will be written to the specified log file, Qpr.ProcessAnalyzer.ScriptLauncher.log. The information shown in the log is the same as in Progress Log.