<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.onqpr.com/pa/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=VesKivi</id>
	<title>QPR ProcessAnalyzer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.onqpr.com/pa/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=VesKivi"/>
	<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php/Special:Contributions/VesKivi"/>
	<updated>2026-04-12T07:05:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19382</id>
		<title>QPR ProcessAnalyzer ScriptLauncher</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19382"/>
		<updated>2021-11-15T11:45:37Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Installing SAP Connector for ScriptLauncher */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;QPR ProcessAnalyzer ScriptLauncher&#039;&#039;&#039; is a tool to run QPR ProcessAnalyzer scripts stored in the QPR ProcessAnalyzer Server, while enabling connections to datasouces from the site where the ScriptLauncher is running, e.g. on-premise.&lt;br /&gt;
&lt;br /&gt;
== Installing ScriptLauncher ==&lt;br /&gt;
Follow these instructions to install QPR ProcessAnalyzer ScriptLauncher:&lt;br /&gt;
# Install .Net Framework 4.7.1 or later (https://dotnet.microsoft.com/download/dotnet-framework).&lt;br /&gt;
# Download QPR ProcessAnalyzer ScriptLauncher from the [[QPR_Product_Downloads|downloads page]], and extract the package into a suitable location where to place the ScriptLaucher application files.&lt;br /&gt;
# If you need to extract data from SAP using the RFC interface, you need to install the [[#Installing SAP Connector for ScriptLauncher|SAP Connector for .Net]].&lt;br /&gt;
# Configure ScriptLauncher according to the instructions in the [[#Configuring_ScriptLauncher|next chapter]].&lt;br /&gt;
# Installation is now completed. Run scripts using ScriptLauncher by following instructions in the [[#Running_ScriptLauncher|chapter below]].&lt;br /&gt;
&lt;br /&gt;
== Installing SAP Connector for ScriptLauncher ==&lt;br /&gt;
Extracting data from SAP using the SAP RFC interface requires to install SAP Connector for Microsoft .NET 3.0 using the following steps:&lt;br /&gt;
# SAP connector requires &#039;&#039;&#039;Microsoft Visual C++ Redistributable Package 2013&#039;&#039;&#039; (download: https://support.microsoft.com/en-us/topic/update-for-visual-c-2013-redistributable-package-d8ccd6a5-4e26-c290-517b-8da6cfdf4f10). Restart the computer after the Microsoft Visual C++ Redistributable Package installation.&lt;br /&gt;
# Download &#039;&#039;&#039;SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64)&#039;&#039;&#039; from SAP Support Portal (https://support.sap.com/en/product/connectors/msnet.html) (login credentials and sufficient permissions needed).&lt;br /&gt;
# Run the SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64) installer.&lt;br /&gt;
# Copy the &#039;&#039;&#039;sapnco.dll&#039;&#039;&#039; and &#039;&#039;&#039;sapnco_utils.dll&#039;&#039;&#039; files from &#039;&#039;&#039;C:\Program Files (x86)\SAP\SAP_DotNetConnector3_x64&#039;&#039;&#039; (this folder has been created by the SAP Connector for Microsoft .NET 3.0 installation) to the folder containing the ScriptLauncher application files.&lt;br /&gt;
&lt;br /&gt;
Note: If you get error &#039;&#039;Could not load file or assembly &#039;sapnco_utils.dll&#039; or one of its dependencies or &#039;&#039;File Not Found Error&#039;&#039;. The specified module could not be found&#039;&#039;, the reason might be that the MSVCR100.dll file is missing and solution is install &#039;&#039;&#039;Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update&#039;&#039;&#039;&#039; (download https://www.microsoft.com/en-us/download/details.aspx?id=26999). If the problem still persists, verify that the MSVCR100.dll is included in windows PATH.&lt;br /&gt;
&lt;br /&gt;
==Configuring ScriptLauncher==&lt;br /&gt;
Before you can start running scripts with QPR ProcessAnalyzer ScriptLauncher, you need to configure connection and other parameters for the tool. You need to have write access to the ScriptLauncher folder, which contains the ScriptLauncher&#039;s configuration file Qpr.ProcessAnalyzer.ScriptLauncher.exe.config.&lt;br /&gt;
&lt;br /&gt;
# Open the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file in a text editor.&lt;br /&gt;
# In the file, go to the section starting with &#039;&#039;&#039;&amp;lt;Qpr.ProcessAnalyzer.ScriptLauncher.Properties.Settings&amp;gt;&#039;&#039;&#039; and configure the values for the following parameters:&lt;br /&gt;
#* &#039;&#039;&#039;LogOnName&#039;&#039;&#039;: QPR ProcessAnalyzer username&lt;br /&gt;
#* &#039;&#039;&#039;Password&#039;&#039;&#039;: QPR ProcessAnalyzer password&lt;br /&gt;
#* &#039;&#039;&#039;ServiceUrl&#039;&#039;&#039;: QPR ProcessAnalyzer server url&lt;br /&gt;
#* &#039;&#039;&#039;ScriptId&#039;&#039;&#039;: Id of the script to run. You can copy the ID from the Scripts tab in the Workspace.&lt;br /&gt;
#* &#039;&#039;&#039;OutputDirectory&#039;&#039;&#039;: folder where to store the created [[QPR_ProcessAnalyzer_ScriptLauncher#CSV_Export|CSV export files]]. If the folder doesn&#039;t exist, it will be created.&lt;br /&gt;
#* &#039;&#039;&#039;ProjectId&#039;&#039;&#039;: Project id&lt;br /&gt;
#* &#039;&#039;&#039;ModelId&#039;&#039;&#039;: Model id&lt;br /&gt;
#* &#039;&#039;&#039;ConnectionType&#039;&#039;&#039;: Use value &#039;&#039;Service&#039;&#039; for QPR ProcessAnalyzer versions up to 2021.8. Starting from QPR ProcessAnalyzer 2021.8, use value &#039;&#039;WebApi&#039;&#039;.&lt;br /&gt;
#* &#039;&#039;&#039;Parameters&#039;&#039;&#039;: passes defined custom parameters to the script. The script should have corresponding &#039;&#039;&#039;@_Parameter_&amp;lt;ParameterName&amp;gt;&#039;&#039;&#039; variables to use the script. Add the following new setting sections to the configuration file to pass custom parameters (parameter1 and parameter2): &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;setting name=&amp;quot;Parameters&amp;quot; serializeAs=&amp;quot;Xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;&lt;br /&gt;
    &amp;lt;ArrayOfString xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter1=value1&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter2=value2&amp;lt;/string&amp;gt;&lt;br /&gt;
    &amp;lt;/ArrayOfString&amp;gt;&lt;br /&gt;
  &amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/setting&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add more than one string. The type of the parameter value is always NVARCHAR.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;&#039;LogFilePath&#039;&#039;&#039; in the following section of the configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationSettings&amp;gt;&lt;br /&gt;
  &amp;lt;Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting name=&amp;quot;LogFilePath&amp;quot; serializeAs=&amp;quot;String&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;.\Qpr.ProcessAnalyzer.ScriptLauncher.log&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/setting&amp;gt;&lt;br /&gt;
  &amp;lt;/Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
&amp;lt;/applicationSettings&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Running ScriptLauncher ==&lt;br /&gt;
After ScriptLauncher has been configured, &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe&#039;&#039;&#039; executable file can be run which is located in the ScriptLauncher folder. In addition to the configuration file, all parameters can also be specified in the command line when running the ScriptLauncher. The command line parameters will override the settings in the configuration file. The parameter names are case sensitive. To specify a parameter in the command line, use the following format (note that all custom parameters must start with &amp;quot;Parameter_&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-Parameter_&amp;lt;ParameterName&amp;gt;=&amp;lt;SettingValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Qpr.ProcessAnalyzer.ScriptLauncher.exe -ScriptId=123 -ModelId=12345 -Parameter_MyParameter1=myValue1 -Parameter_MyParameter2=&amp;quot;my value 2&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters that contain special characters, such as whitespaces, must be escaped by using double quotes. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-LogFilePath=&amp;quot;C:\Temp\Path to My Log Files\ScriptLauncherDir\&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting through proxy ==&lt;br /&gt;
QPR ProcessAnalyzer ScriptLauncher can also be used through a manually configured proxy server. Proxy settings are configured to the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file stored into the QPR ProcessAnalyzer ScriptLauncher installation folder.&lt;br /&gt;
&lt;br /&gt;
For example, in order to setup a proxy that uses current Windows credentials for the proxy connection, add the following section inside the &#039;&#039;&#039;&amp;lt;configuration&amp;gt;&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;&lt;br /&gt;
  &amp;lt;defaultProxy useDefaultCredentials=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/system.net&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure an explicitly specified proxy server, use the following configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;  &lt;br /&gt;
  &amp;lt;defaultProxy&amp;gt;  &lt;br /&gt;
    &amp;lt;proxy proxyaddress=&amp;quot;serverip:portnumber&amp;quot; /&amp;gt;   &lt;br /&gt;
  &amp;lt;/defaultProxy&amp;gt;  &lt;br /&gt;
&amp;lt;/system.net&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/proxy-configuration&lt;br /&gt;
&lt;br /&gt;
== Exporting Script Results to CSV ==&lt;br /&gt;
When a QPR ProcessAnalyzer script contains the GetAnalysis command with the &#039;&#039;&#039;Show=TRUE&#039;&#039;&#039; parameter or the &#039;&#039;&#039;ShowReport&#039;&#039;&#039; command, the results are exported into a CSV file. Only tabular analysis types are supported by the CSV export. The exported CSV files have the following formatting:&lt;br /&gt;
* &#039;&#039;&#039;Column separator&#039;&#039;&#039;: semicolon&lt;br /&gt;
&amp;lt;pre&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Decimal separator in numeric fields&#039;&#039;&#039;: period&lt;br /&gt;
&amp;lt;pre&amp;gt;.&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Quotation character for text fields&#039;&#039;&#039;: double quotes (used when the textual value contains semicolon, double quotes, linebreak or tabulator)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Escape character&#039;&#039;&#039;: Double quotes in textual fields are escaped with two double quotes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Date format for date fields&#039;&#039;&#039;: yyyy-MM-dd HH:mm:ss,fff&lt;br /&gt;
* &#039;&#039;&#039;First line&#039;&#039;&#039;: contains column headers&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19381</id>
		<title>QPR ProcessAnalyzer ScriptLauncher</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19381"/>
		<updated>2021-11-15T11:42:17Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Installing SAP Connector for ScriptLauncher */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;QPR ProcessAnalyzer ScriptLauncher&#039;&#039;&#039; is a tool to run QPR ProcessAnalyzer scripts stored in the QPR ProcessAnalyzer Server, while enabling connections to datasouces from the site where the ScriptLauncher is running, e.g. on-premise.&lt;br /&gt;
&lt;br /&gt;
== Installing ScriptLauncher ==&lt;br /&gt;
Follow these instructions to install QPR ProcessAnalyzer ScriptLauncher:&lt;br /&gt;
# Install .Net Framework 4.7.1 or later (https://dotnet.microsoft.com/download/dotnet-framework).&lt;br /&gt;
# Download QPR ProcessAnalyzer ScriptLauncher from the [[QPR_Product_Downloads|downloads page]], and extract the package into a suitable location where to place the ScriptLaucher application files.&lt;br /&gt;
# If you need to extract data from SAP using the RFC interface, you need to install the [[#Installing SAP Connector for ScriptLauncher|SAP Connector for .Net]].&lt;br /&gt;
# Configure ScriptLauncher according to the instructions in the [[#Configuring_ScriptLauncher|next chapter]].&lt;br /&gt;
# Installation is now completed. Run scripts using ScriptLauncher by following instructions in the [[#Running_ScriptLauncher|chapter below]].&lt;br /&gt;
&lt;br /&gt;
== Installing SAP Connector for ScriptLauncher ==&lt;br /&gt;
Extracting data from SAP using the SAP RFC interface requires to install SAP Connector for Microsoft .NET 3.0 using the following steps:&lt;br /&gt;
# SAP connector requires &#039;&#039;&#039;Microsoft Visual C++ Redistributable Package 2013&#039;&#039;&#039; (download: https://support.microsoft.com/en-us/topic/update-for-visual-c-2013-redistributable-package-d8ccd6a5-4e26-c290-517b-8da6cfdf4f10). Restart the computer after the Microsoft Visual C++ Redistributable Package installation.&lt;br /&gt;
# Download &#039;&#039;&#039;SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64)&#039;&#039;&#039; from SAP Support Portal (https://support.sap.com/en/product/connectors/msnet.html) (login credentials and sufficient permissions needed).&lt;br /&gt;
# Run the SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64) installer.&lt;br /&gt;
# Copy the &#039;&#039;&#039;sapnco.dll&#039;&#039;&#039; and &#039;&#039;&#039;sapnco_utils.dll&#039;&#039;&#039; files from &#039;&#039;&#039;C:\Program Files (x86)\SAP\SAP_DotNetConnector3_x64&#039;&#039;&#039; (this folder has been created by the SAP Connector for Microsoft .NET 3.0 installation) to the folder containing the ScriptLauncher application files.&lt;br /&gt;
&lt;br /&gt;
Note: If you get error &#039;&#039;Could not load file or assembly &#039;sapnco_utils.dll&#039; or one of its dependencies. The specified module could not be found&#039;&#039;, the reason might be that the MSVCR100.dll file is missing and solution is install &#039;&#039;&#039;Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update&#039;&#039;&#039;&#039; (download https://www.microsoft.com/en-us/download/details.aspx?id=26999). If the problem still persists, verify that the MSVCR100.dll is included in windows PATH.&lt;br /&gt;
&lt;br /&gt;
==Configuring ScriptLauncher==&lt;br /&gt;
Before you can start running scripts with QPR ProcessAnalyzer ScriptLauncher, you need to configure connection and other parameters for the tool. You need to have write access to the ScriptLauncher folder, which contains the ScriptLauncher&#039;s configuration file Qpr.ProcessAnalyzer.ScriptLauncher.exe.config.&lt;br /&gt;
&lt;br /&gt;
# Open the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file in a text editor.&lt;br /&gt;
# In the file, go to the section starting with &#039;&#039;&#039;&amp;lt;Qpr.ProcessAnalyzer.ScriptLauncher.Properties.Settings&amp;gt;&#039;&#039;&#039; and configure the values for the following parameters:&lt;br /&gt;
#* &#039;&#039;&#039;LogOnName&#039;&#039;&#039;: QPR ProcessAnalyzer username&lt;br /&gt;
#* &#039;&#039;&#039;Password&#039;&#039;&#039;: QPR ProcessAnalyzer password&lt;br /&gt;
#* &#039;&#039;&#039;ServiceUrl&#039;&#039;&#039;: QPR ProcessAnalyzer server url&lt;br /&gt;
#* &#039;&#039;&#039;ScriptId&#039;&#039;&#039;: Id of the script to run. You can copy the ID from the Scripts tab in the Workspace.&lt;br /&gt;
#* &#039;&#039;&#039;OutputDirectory&#039;&#039;&#039;: folder where to store the created [[QPR_ProcessAnalyzer_ScriptLauncher#CSV_Export|CSV export files]]. If the folder doesn&#039;t exist, it will be created.&lt;br /&gt;
#* &#039;&#039;&#039;ProjectId&#039;&#039;&#039;: Project id&lt;br /&gt;
#* &#039;&#039;&#039;ModelId&#039;&#039;&#039;: Model id&lt;br /&gt;
#* &#039;&#039;&#039;ConnectionType&#039;&#039;&#039;: Use value &#039;&#039;Service&#039;&#039; for QPR ProcessAnalyzer versions up to 2021.8. Starting from QPR ProcessAnalyzer 2021.8, use value &#039;&#039;WebApi&#039;&#039;.&lt;br /&gt;
#* &#039;&#039;&#039;Parameters&#039;&#039;&#039;: passes defined custom parameters to the script. The script should have corresponding &#039;&#039;&#039;@_Parameter_&amp;lt;ParameterName&amp;gt;&#039;&#039;&#039; variables to use the script. Add the following new setting sections to the configuration file to pass custom parameters (parameter1 and parameter2): &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;setting name=&amp;quot;Parameters&amp;quot; serializeAs=&amp;quot;Xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;&lt;br /&gt;
    &amp;lt;ArrayOfString xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter1=value1&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter2=value2&amp;lt;/string&amp;gt;&lt;br /&gt;
    &amp;lt;/ArrayOfString&amp;gt;&lt;br /&gt;
  &amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/setting&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add more than one string. The type of the parameter value is always NVARCHAR.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;&#039;LogFilePath&#039;&#039;&#039; in the following section of the configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationSettings&amp;gt;&lt;br /&gt;
  &amp;lt;Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting name=&amp;quot;LogFilePath&amp;quot; serializeAs=&amp;quot;String&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;.\Qpr.ProcessAnalyzer.ScriptLauncher.log&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/setting&amp;gt;&lt;br /&gt;
  &amp;lt;/Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
&amp;lt;/applicationSettings&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Running ScriptLauncher ==&lt;br /&gt;
After ScriptLauncher has been configured, &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe&#039;&#039;&#039; executable file can be run which is located in the ScriptLauncher folder. In addition to the configuration file, all parameters can also be specified in the command line when running the ScriptLauncher. The command line parameters will override the settings in the configuration file. The parameter names are case sensitive. To specify a parameter in the command line, use the following format (note that all custom parameters must start with &amp;quot;Parameter_&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-Parameter_&amp;lt;ParameterName&amp;gt;=&amp;lt;SettingValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Qpr.ProcessAnalyzer.ScriptLauncher.exe -ScriptId=123 -ModelId=12345 -Parameter_MyParameter1=myValue1 -Parameter_MyParameter2=&amp;quot;my value 2&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters that contain special characters, such as whitespaces, must be escaped by using double quotes. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-LogFilePath=&amp;quot;C:\Temp\Path to My Log Files\ScriptLauncherDir\&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting through proxy ==&lt;br /&gt;
QPR ProcessAnalyzer ScriptLauncher can also be used through a manually configured proxy server. Proxy settings are configured to the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file stored into the QPR ProcessAnalyzer ScriptLauncher installation folder.&lt;br /&gt;
&lt;br /&gt;
For example, in order to setup a proxy that uses current Windows credentials for the proxy connection, add the following section inside the &#039;&#039;&#039;&amp;lt;configuration&amp;gt;&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;&lt;br /&gt;
  &amp;lt;defaultProxy useDefaultCredentials=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/system.net&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure an explicitly specified proxy server, use the following configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;  &lt;br /&gt;
  &amp;lt;defaultProxy&amp;gt;  &lt;br /&gt;
    &amp;lt;proxy proxyaddress=&amp;quot;serverip:portnumber&amp;quot; /&amp;gt;   &lt;br /&gt;
  &amp;lt;/defaultProxy&amp;gt;  &lt;br /&gt;
&amp;lt;/system.net&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/proxy-configuration&lt;br /&gt;
&lt;br /&gt;
== Exporting Script Results to CSV ==&lt;br /&gt;
When a QPR ProcessAnalyzer script contains the GetAnalysis command with the &#039;&#039;&#039;Show=TRUE&#039;&#039;&#039; parameter or the &#039;&#039;&#039;ShowReport&#039;&#039;&#039; command, the results are exported into a CSV file. Only tabular analysis types are supported by the CSV export. The exported CSV files have the following formatting:&lt;br /&gt;
* &#039;&#039;&#039;Column separator&#039;&#039;&#039;: semicolon&lt;br /&gt;
&amp;lt;pre&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Decimal separator in numeric fields&#039;&#039;&#039;: period&lt;br /&gt;
&amp;lt;pre&amp;gt;.&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Quotation character for text fields&#039;&#039;&#039;: double quotes (used when the textual value contains semicolon, double quotes, linebreak or tabulator)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Escape character&#039;&#039;&#039;: Double quotes in textual fields are escaped with two double quotes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Date format for date fields&#039;&#039;&#039;: yyyy-MM-dd HH:mm:ss,fff&lt;br /&gt;
* &#039;&#039;&#039;First line&#039;&#039;&#039;: contains column headers&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19380</id>
		<title>QPR ProcessAnalyzer ScriptLauncher</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19380"/>
		<updated>2021-11-15T11:41:00Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Installing SAP Connector for ScriptLauncher */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;QPR ProcessAnalyzer ScriptLauncher&#039;&#039;&#039; is a tool to run QPR ProcessAnalyzer scripts stored in the QPR ProcessAnalyzer Server, while enabling connections to datasouces from the site where the ScriptLauncher is running, e.g. on-premise.&lt;br /&gt;
&lt;br /&gt;
== Installing ScriptLauncher ==&lt;br /&gt;
Follow these instructions to install QPR ProcessAnalyzer ScriptLauncher:&lt;br /&gt;
# Install .Net Framework 4.7.1 or later (https://dotnet.microsoft.com/download/dotnet-framework).&lt;br /&gt;
# Download QPR ProcessAnalyzer ScriptLauncher from the [[QPR_Product_Downloads|downloads page]], and extract the package into a suitable location where to place the ScriptLaucher application files.&lt;br /&gt;
# If you need to extract data from SAP using the RFC interface, you need to install the [[#Installing SAP Connector for ScriptLauncher|SAP Connector for .Net]].&lt;br /&gt;
# Configure ScriptLauncher according to the instructions in the [[#Configuring_ScriptLauncher|next chapter]].&lt;br /&gt;
# Installation is now completed. Run scripts using ScriptLauncher by following instructions in the [[#Running_ScriptLauncher|chapter below]].&lt;br /&gt;
&lt;br /&gt;
== Installing SAP Connector for ScriptLauncher ==&lt;br /&gt;
Extracting data from SAP using the SAP RFC interface requires to install SAP Connector for Microsoft .NET 3.0 using the following steps:&lt;br /&gt;
# SAP connector requires &#039;&#039;&#039;Microsoft Visual C++ Redistributable Package 2013&#039;&#039;&#039; (download: https://support.microsoft.com/en-us/topic/update-for-visual-c-2013-redistributable-package-d8ccd6a5-4e26-c290-517b-8da6cfdf4f10). Restart the computer after the Microsoft Visual C++ Redistributable Package installation.&lt;br /&gt;
# Download &#039;&#039;&#039;SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64)&#039;&#039;&#039; from SAP Support Portal (https://support.sap.com/en/product/connectors/msnet.html) (login credentials and sufficient permissions needed).&lt;br /&gt;
# Run the SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64) installer.&lt;br /&gt;
# Copy the &#039;&#039;&#039;sapnco.dll&#039;&#039;&#039; and &#039;&#039;&#039;sapnco_utils.dll&#039;&#039;&#039; files from &#039;&#039;&#039;C:\Program Files (x86)\SAP\SAP_DotNetConnector3_x64&#039;&#039;&#039; (this folder has been created by the SAP Connector for Microsoft .NET 3.0 installation) to the folder containing the ScriptLauncher application files.&lt;br /&gt;
&lt;br /&gt;
Note: If you get error &#039;&#039;Could not load file or assembly &#039;sapnco_utils.dll&#039; or one of its dependencies. The specified module could not be found&#039;&#039;, the reason might be that the MSVCR100.dll file is missing and solution is install Microsoft Visual &#039;&#039;&#039;C++ 2010 Redistributable Package&#039;&#039;&#039;. If the problem still persists, verify that the MSVCR100.dll is included in windows PATH. Or install &#039;&#039;&#039;Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update&#039;&#039;&#039; (download https://www.microsoft.com/en-us/download/details.aspx?id=26999)&lt;br /&gt;
&lt;br /&gt;
==Configuring ScriptLauncher==&lt;br /&gt;
Before you can start running scripts with QPR ProcessAnalyzer ScriptLauncher, you need to configure connection and other parameters for the tool. You need to have write access to the ScriptLauncher folder, which contains the ScriptLauncher&#039;s configuration file Qpr.ProcessAnalyzer.ScriptLauncher.exe.config.&lt;br /&gt;
&lt;br /&gt;
# Open the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file in a text editor.&lt;br /&gt;
# In the file, go to the section starting with &#039;&#039;&#039;&amp;lt;Qpr.ProcessAnalyzer.ScriptLauncher.Properties.Settings&amp;gt;&#039;&#039;&#039; and configure the values for the following parameters:&lt;br /&gt;
#* &#039;&#039;&#039;LogOnName&#039;&#039;&#039;: QPR ProcessAnalyzer username&lt;br /&gt;
#* &#039;&#039;&#039;Password&#039;&#039;&#039;: QPR ProcessAnalyzer password&lt;br /&gt;
#* &#039;&#039;&#039;ServiceUrl&#039;&#039;&#039;: QPR ProcessAnalyzer server url&lt;br /&gt;
#* &#039;&#039;&#039;ScriptId&#039;&#039;&#039;: Id of the script to run. You can copy the ID from the Scripts tab in the Workspace.&lt;br /&gt;
#* &#039;&#039;&#039;OutputDirectory&#039;&#039;&#039;: folder where to store the created [[QPR_ProcessAnalyzer_ScriptLauncher#CSV_Export|CSV export files]]. If the folder doesn&#039;t exist, it will be created.&lt;br /&gt;
#* &#039;&#039;&#039;ProjectId&#039;&#039;&#039;: Project id&lt;br /&gt;
#* &#039;&#039;&#039;ModelId&#039;&#039;&#039;: Model id&lt;br /&gt;
#* &#039;&#039;&#039;ConnectionType&#039;&#039;&#039;: Use value &#039;&#039;Service&#039;&#039; for QPR ProcessAnalyzer versions up to 2021.8. Starting from QPR ProcessAnalyzer 2021.8, use value &#039;&#039;WebApi&#039;&#039;.&lt;br /&gt;
#* &#039;&#039;&#039;Parameters&#039;&#039;&#039;: passes defined custom parameters to the script. The script should have corresponding &#039;&#039;&#039;@_Parameter_&amp;lt;ParameterName&amp;gt;&#039;&#039;&#039; variables to use the script. Add the following new setting sections to the configuration file to pass custom parameters (parameter1 and parameter2): &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;setting name=&amp;quot;Parameters&amp;quot; serializeAs=&amp;quot;Xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;&lt;br /&gt;
    &amp;lt;ArrayOfString xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter1=value1&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter2=value2&amp;lt;/string&amp;gt;&lt;br /&gt;
    &amp;lt;/ArrayOfString&amp;gt;&lt;br /&gt;
  &amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/setting&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add more than one string. The type of the parameter value is always NVARCHAR.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;&#039;LogFilePath&#039;&#039;&#039; in the following section of the configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationSettings&amp;gt;&lt;br /&gt;
  &amp;lt;Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting name=&amp;quot;LogFilePath&amp;quot; serializeAs=&amp;quot;String&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;.\Qpr.ProcessAnalyzer.ScriptLauncher.log&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/setting&amp;gt;&lt;br /&gt;
  &amp;lt;/Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
&amp;lt;/applicationSettings&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Running ScriptLauncher ==&lt;br /&gt;
After ScriptLauncher has been configured, &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe&#039;&#039;&#039; executable file can be run which is located in the ScriptLauncher folder. In addition to the configuration file, all parameters can also be specified in the command line when running the ScriptLauncher. The command line parameters will override the settings in the configuration file. The parameter names are case sensitive. To specify a parameter in the command line, use the following format (note that all custom parameters must start with &amp;quot;Parameter_&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-Parameter_&amp;lt;ParameterName&amp;gt;=&amp;lt;SettingValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Qpr.ProcessAnalyzer.ScriptLauncher.exe -ScriptId=123 -ModelId=12345 -Parameter_MyParameter1=myValue1 -Parameter_MyParameter2=&amp;quot;my value 2&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters that contain special characters, such as whitespaces, must be escaped by using double quotes. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-LogFilePath=&amp;quot;C:\Temp\Path to My Log Files\ScriptLauncherDir\&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting through proxy ==&lt;br /&gt;
QPR ProcessAnalyzer ScriptLauncher can also be used through a manually configured proxy server. Proxy settings are configured to the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file stored into the QPR ProcessAnalyzer ScriptLauncher installation folder.&lt;br /&gt;
&lt;br /&gt;
For example, in order to setup a proxy that uses current Windows credentials for the proxy connection, add the following section inside the &#039;&#039;&#039;&amp;lt;configuration&amp;gt;&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;&lt;br /&gt;
  &amp;lt;defaultProxy useDefaultCredentials=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/system.net&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure an explicitly specified proxy server, use the following configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;  &lt;br /&gt;
  &amp;lt;defaultProxy&amp;gt;  &lt;br /&gt;
    &amp;lt;proxy proxyaddress=&amp;quot;serverip:portnumber&amp;quot; /&amp;gt;   &lt;br /&gt;
  &amp;lt;/defaultProxy&amp;gt;  &lt;br /&gt;
&amp;lt;/system.net&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/proxy-configuration&lt;br /&gt;
&lt;br /&gt;
== Exporting Script Results to CSV ==&lt;br /&gt;
When a QPR ProcessAnalyzer script contains the GetAnalysis command with the &#039;&#039;&#039;Show=TRUE&#039;&#039;&#039; parameter or the &#039;&#039;&#039;ShowReport&#039;&#039;&#039; command, the results are exported into a CSV file. Only tabular analysis types are supported by the CSV export. The exported CSV files have the following formatting:&lt;br /&gt;
* &#039;&#039;&#039;Column separator&#039;&#039;&#039;: semicolon&lt;br /&gt;
&amp;lt;pre&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Decimal separator in numeric fields&#039;&#039;&#039;: period&lt;br /&gt;
&amp;lt;pre&amp;gt;.&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Quotation character for text fields&#039;&#039;&#039;: double quotes (used when the textual value contains semicolon, double quotes, linebreak or tabulator)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Escape character&#039;&#039;&#039;: Double quotes in textual fields are escaped with two double quotes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Date format for date fields&#039;&#039;&#039;: yyyy-MM-dd HH:mm:ss,fff&lt;br /&gt;
* &#039;&#039;&#039;First line&#039;&#039;&#039;: contains column headers&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19377</id>
		<title>QPR ProcessAnalyzer ScriptLauncher</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_ScriptLauncher&amp;diff=19377"/>
		<updated>2021-11-15T09:19:13Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Installing SAP Connector for ScriptLauncher */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;QPR ProcessAnalyzer ScriptLauncher&#039;&#039;&#039; is a tool to run QPR ProcessAnalyzer scripts stored in the QPR ProcessAnalyzer Server, while enabling connections to datasouces from the site where the ScriptLauncher is running, e.g. on-premise.&lt;br /&gt;
&lt;br /&gt;
== Installing ScriptLauncher ==&lt;br /&gt;
Follow these instructions to install QPR ProcessAnalyzer ScriptLauncher:&lt;br /&gt;
# Install .Net Framework 4.7.1 or later (https://dotnet.microsoft.com/download/dotnet-framework).&lt;br /&gt;
# Download QPR ProcessAnalyzer ScriptLauncher from the [[QPR_Product_Downloads|downloads page]], and extract the package into a suitable location where to place the ScriptLaucher application files.&lt;br /&gt;
# If you need to extract data from SAP using the RFC interface, you need to install the [[#Installing SAP Connector for ScriptLauncher|SAP Connector for .Net]].&lt;br /&gt;
# Configure ScriptLauncher according to the instructions in the [[#Configuring_ScriptLauncher|next chapter]].&lt;br /&gt;
# Installation is now completed. Run scripts using ScriptLauncher by following instructions in the [[#Running_ScriptLauncher|chapter below]].&lt;br /&gt;
&lt;br /&gt;
== Installing SAP Connector for ScriptLauncher ==&lt;br /&gt;
Extracting data from SAP using the SAP RFC interface requires to install SAP Connector for Microsoft .NET 3.0 using the following steps:&lt;br /&gt;
# SAP connector requires &#039;&#039;&#039;Microsoft Visual C++ Redistributable Package 2013&#039;&#039;&#039; (download: https://support.microsoft.com/en-us/topic/update-for-visual-c-2013-redistributable-package-d8ccd6a5-4e26-c290-517b-8da6cfdf4f10). Restart the computer after the Microsoft Visual C++ Redistributable Package installation.&lt;br /&gt;
# Download &#039;&#039;&#039;SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64)&#039;&#039;&#039; from SAP Support Portal (https://support.sap.com/en/product/connectors/msnet.html) (login credentials and sufficient permissions needed).&lt;br /&gt;
# Run the SAP Connector for Microsoft .NET 3.0 for Windows 64bit (x64) installer.&lt;br /&gt;
# Copy the &#039;&#039;&#039;sapnco.dll&#039;&#039;&#039; and &#039;&#039;&#039;sapnco_utils.dll&#039;&#039;&#039; files from &#039;&#039;&#039;C:\Program Files (x86)\SAP\SAP_DotNetConnector3_x64&#039;&#039;&#039; (this folder has been created by the SAP Connector for Microsoft .NET 3.0 installation) to the folder containing the ScriptLauncher application files.&lt;br /&gt;
&lt;br /&gt;
Note: If you get error &#039;&#039;Could not load file or assembly &#039;sapnco_utils.dll&#039; or one of its dependencies. The specified module could not be found&#039;&#039;, the reason might be that the MSVCR100.dll file is missing and solution is install Microsoft Visual &#039;&#039;&#039;C++ 2010 Redistributable Package&#039;&#039;&#039;. If the problem still persists, verify that the MSVCR100.dll is included in windows PATH. Or install &#039;&#039;&#039;Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update&#039;&#039;&#039; (download ttps://www.microsoft.com/en-us/download/details.aspx?id=26999)&lt;br /&gt;
&lt;br /&gt;
==Configuring ScriptLauncher==&lt;br /&gt;
Before you can start running scripts with QPR ProcessAnalyzer ScriptLauncher, you need to configure connection and other parameters for the tool. You need to have write access to the ScriptLauncher folder, which contains the ScriptLauncher&#039;s configuration file Qpr.ProcessAnalyzer.ScriptLauncher.exe.config.&lt;br /&gt;
&lt;br /&gt;
# Open the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file in a text editor.&lt;br /&gt;
# In the file, go to the section starting with &#039;&#039;&#039;&amp;lt;Qpr.ProcessAnalyzer.ScriptLauncher.Properties.Settings&amp;gt;&#039;&#039;&#039; and configure the values for the following parameters:&lt;br /&gt;
#* &#039;&#039;&#039;LogOnName&#039;&#039;&#039;: QPR ProcessAnalyzer username&lt;br /&gt;
#* &#039;&#039;&#039;Password&#039;&#039;&#039;: QPR ProcessAnalyzer password&lt;br /&gt;
#* &#039;&#039;&#039;ServiceUrl&#039;&#039;&#039;: QPR ProcessAnalyzer server url&lt;br /&gt;
#* &#039;&#039;&#039;ScriptId&#039;&#039;&#039;: Id of the script to run. You can copy the ID from the Scripts tab in the Workspace.&lt;br /&gt;
#* &#039;&#039;&#039;OutputDirectory&#039;&#039;&#039;: folder where to store the created [[QPR_ProcessAnalyzer_ScriptLauncher#CSV_Export|CSV export files]]. If the folder doesn&#039;t exist, it will be created.&lt;br /&gt;
#* &#039;&#039;&#039;ProjectId&#039;&#039;&#039;: Project id&lt;br /&gt;
#* &#039;&#039;&#039;ModelId&#039;&#039;&#039;: Model id&lt;br /&gt;
#* &#039;&#039;&#039;ConnectionType&#039;&#039;&#039;: Use value &#039;&#039;Service&#039;&#039; for QPR ProcessAnalyzer versions up to 2021.8. Starting from QPR ProcessAnalyzer 2021.8, use value &#039;&#039;WebApi&#039;&#039;.&lt;br /&gt;
#* &#039;&#039;&#039;Parameters&#039;&#039;&#039;: passes defined custom parameters to the script. The script should have corresponding &#039;&#039;&#039;@_Parameter_&amp;lt;ParameterName&amp;gt;&#039;&#039;&#039; variables to use the script. Add the following new setting sections to the configuration file to pass custom parameters (parameter1 and parameter2): &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;setting name=&amp;quot;Parameters&amp;quot; serializeAs=&amp;quot;Xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;value&amp;gt;&lt;br /&gt;
    &amp;lt;ArrayOfString xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter1=value1&amp;lt;/string&amp;gt;&lt;br /&gt;
      &amp;lt;string&amp;gt;parameter2=value2&amp;lt;/string&amp;gt;&lt;br /&gt;
    &amp;lt;/ArrayOfString&amp;gt;&lt;br /&gt;
  &amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/setting&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add more than one string. The type of the parameter value is always NVARCHAR.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;&#039;LogFilePath&#039;&#039;&#039; in the following section of the configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationSettings&amp;gt;&lt;br /&gt;
  &amp;lt;Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting name=&amp;quot;LogFilePath&amp;quot; serializeAs=&amp;quot;String&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;value&amp;gt;.\Qpr.ProcessAnalyzer.ScriptLauncher.log&amp;lt;/value&amp;gt;&lt;br /&gt;
    &amp;lt;/setting&amp;gt;&lt;br /&gt;
  &amp;lt;/Qpr.ProcessAnalyzer.Common.Properties.Settings&amp;gt;&lt;br /&gt;
&amp;lt;/applicationSettings&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Running ScriptLauncher ==&lt;br /&gt;
After ScriptLauncher has been configured, &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe&#039;&#039;&#039; executable file can be run which is located in the ScriptLauncher folder. In addition to the configuration file, all parameters can also be specified in the command line when running the ScriptLauncher. The command line parameters will override the settings in the configuration file. The parameter names are case sensitive. To specify a parameter in the command line, use the following format (note that all custom parameters must start with &amp;quot;Parameter_&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-Parameter_&amp;lt;ParameterName&amp;gt;=&amp;lt;SettingValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Qpr.ProcessAnalyzer.ScriptLauncher.exe -ScriptId=123 -ModelId=12345 -Parameter_MyParameter1=myValue1 -Parameter_MyParameter2=&amp;quot;my value 2&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters that contain special characters, such as whitespaces, must be escaped by using double quotes. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-LogFilePath=&amp;quot;C:\Temp\Path to My Log Files\ScriptLauncherDir\&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting through proxy ==&lt;br /&gt;
QPR ProcessAnalyzer ScriptLauncher can also be used through a manually configured proxy server. Proxy settings are configured to the &#039;&#039;&#039;Qpr.ProcessAnalyzer.ScriptLauncher.exe.config&#039;&#039;&#039; file stored into the QPR ProcessAnalyzer ScriptLauncher installation folder.&lt;br /&gt;
&lt;br /&gt;
For example, in order to setup a proxy that uses current Windows credentials for the proxy connection, add the following section inside the &#039;&#039;&#039;&amp;lt;configuration&amp;gt;&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;&lt;br /&gt;
  &amp;lt;defaultProxy useDefaultCredentials=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/system.net&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure an explicitly specified proxy server, use the following configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;system.net&amp;gt;  &lt;br /&gt;
  &amp;lt;defaultProxy&amp;gt;  &lt;br /&gt;
    &amp;lt;proxy proxyaddress=&amp;quot;serverip:portnumber&amp;quot; /&amp;gt;   &lt;br /&gt;
  &amp;lt;/defaultProxy&amp;gt;  &lt;br /&gt;
&amp;lt;/system.net&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/proxy-configuration&lt;br /&gt;
&lt;br /&gt;
== Exporting Script Results to CSV ==&lt;br /&gt;
When a QPR ProcessAnalyzer script contains the GetAnalysis command with the &#039;&#039;&#039;Show=TRUE&#039;&#039;&#039; parameter or the &#039;&#039;&#039;ShowReport&#039;&#039;&#039; command, the results are exported into a CSV file. Only tabular analysis types are supported by the CSV export. The exported CSV files have the following formatting:&lt;br /&gt;
* &#039;&#039;&#039;Column separator&#039;&#039;&#039;: semicolon&lt;br /&gt;
&amp;lt;pre&amp;gt;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Decimal separator in numeric fields&#039;&#039;&#039;: period&lt;br /&gt;
&amp;lt;pre&amp;gt;.&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Quotation character for text fields&#039;&#039;&#039;: double quotes (used when the textual value contains semicolon, double quotes, linebreak or tabulator)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Escape character&#039;&#039;&#039;: Double quotes in textual fields are escaped with two double quotes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Date format for date fields&#039;&#039;&#039;: yyyy-MM-dd HH:mm:ss,fff&lt;br /&gt;
* &#039;&#039;&#039;First line&#039;&#039;&#039;: contains column headers&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=14532</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=14532"/>
		<updated>2019-11-15T09:50:21Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Get Flowchart Image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer WCF Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed). QPR ProcessAnalyzer WCF Web Service API can be used with wsHttp (SOAP) and webHttp endpoints.&lt;br /&gt;
&lt;br /&gt;
== WCF Web Service API Methods ==&lt;br /&gt;
The following methods are available in the WCF Web Service API:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteProject|DeleteProject]]: Deletes a project.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart_Analysis_(PAPO)|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModel|GetModel]]: Can be used to query QPR ProcessAnalyzer model data.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModelAsStream|GetModelAsStream]]: Exports a model or a filtered data as a .pacm file.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: can be used to get user related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ModifyUserRelations|ModifyUserRelations]] can be used to modify permissions given user.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
&lt;br /&gt;
== WCF Web Service API Usage Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PowerShell Examples ===&lt;br /&gt;
==== [[Move Data from QPR ProcessAnalyzer to Database using PowerShell]] ====&lt;br /&gt;
==== List Users ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Update Model Configuration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Get Flowchart Image ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot; -Namespace &amp;quot;WebServiceProxy&amp;quot; -Class &amp;quot;PaService&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$ids = new-object WebServiceProxy.ModelViewId&lt;br /&gt;
$ids.ViewId = 13&lt;br /&gt;
$ids.ViewIdSpecified = 1&lt;br /&gt;
&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token, $ids,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Model_Datasources&amp;diff=14266</id>
		<title>QPR ProcessAnalyzer Model Datasources</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Model_Datasources&amp;diff=14266"/>
		<updated>2019-10-15T07:17:09Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Read data from CSV file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data to QPR Processanalyzer models can be loaded from many different sources using different techniques. The following type of datasources can be used:&lt;br /&gt;
* [[#Loading Data from Datatables|Datatables]]: Data can be loaded from QPR ProcessAnalyzer&#039;s own datatables.&lt;br /&gt;
* [[#Loading Data from ODBC Datasource|ODBC datasources]]: Data can be loaded from any ODBC compliant source system, such as many database systems, SAP HANA, ServiceNow, Excel files and CSV files.&lt;br /&gt;
* [[#Loading Data from Expression Datasource|Expression]]: Data can be loaded from a dataset that is produced by an expression written in QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Expressions|expression language]]. With the expression language, it&#039;s possible to e.g. fetch data from other QPR ProcessAnalyzer models, transform the data and then load them to a model using the expression datasource.&lt;br /&gt;
* Models stored to QPR ProcessAnalyze database (legacy method)&lt;br /&gt;
&lt;br /&gt;
For the datatables, ODBC and expression datasources two datasource queries needs to be defined: one for &#039;&#039;&#039;cases&#039;&#039;&#039; and one for &#039;&#039;&#039;events&#039;&#039;&#039;. It&#039;s also possible that cases and event are loaded from different types of datasources, e.g. cases from an ODBC datasource and events from a datatable.&lt;br /&gt;
&lt;br /&gt;
Mappings for the columns in the datasets can be defined freely, so the order of columns is not relevant for QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
== Loading Data from Datatables ==&lt;br /&gt;
In the &#039;&#039;DataSource&#039;&#039; section, when the &#039;&#039;DataSourceType&#039;&#039; is defined as &#039;&#039;datatable&#039;&#039;, data is loaded from a QPR ProcessAnalyzer [[Data_Tables_in_QPR_ProcessAnalyzer|datatable]]. Datatables can be created by importing data to them from a CSV file, or as a result of an [[Data_Extraction,_Transformation,_and_Loading|ETL script]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Supported values are &#039;&#039;&#039;database&#039;&#039;&#039; (default), &#039;&#039;&#039;datatable&#039;&#039;&#039;, &#039;&#039;&#039;expression&#039;&#039;&#039; and &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataTableName&lt;br /&gt;
||Name of the datatable where to fetch the cases data.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Supported values are &#039;&#039;&#039;database&#039;&#039;&#039; (default), &#039;&#039;&#039;datatable&#039;&#039;&#039;, &#039;&#039;&#039;expression&#039;&#039;&#039; and &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataTableName&lt;br /&gt;
||Name of the datatable where to fetch the events data.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Loading Data from ODBC Datasource ==&lt;br /&gt;
In the &#039;&#039;DataSource&#039;&#039; section, when the &#039;&#039;DataSourceType&#039;&#039; is defined as &#039;&#039;odbc&#039;&#039; (for cases or events), data is loaded from an ODBC datasource. There needs to be a suitable ODBC driver installed in QPR ProcesAnalyzer server, and ODBC connection string and query needs to be defined (more below). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;odbc&#039;&#039;&#039; when loading data from an ODBC datasource. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;odbc&#039;&#039;&#039; when loading data from an ODBC datasource. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Configurations examples ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
If 32-bit office is installed in machine then 64-bit ODBC driver need install using /passive parameter.&lt;br /&gt;
More information &lt;br /&gt;
* https://stackoverflow.com/questions/7116019/hand-install-of-64-bit-ms-access-odbc-drivers-when-32-bit-office-is-present &lt;br /&gt;
* https://techblog.aimms.com/2014/10/27/installing-32-bit-and-64-bit-microsoft-access-drivers-next-to-each-other/&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017). &lt;br /&gt;
* Example: ODBC text driver may guess column data type and return null values in case when guessed column type not match. Guessing based top rows of data.&lt;br /&gt;
* Note: ODBC text driver support only one data type per column mixed data types is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
Recommended driver: https://www.microsoft.com/en-us/download/details.aspx?id=56567&lt;br /&gt;
&lt;br /&gt;
In this example, data is loaded from an SQL Server table. SQL Server hostname is &#039;&#039;myServerName&#039;&#039;, instance name is &#039;&#039;myInstanceName&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;. The &#039;&#039;Trusted_Connection&#039;&#039; is for Windows authentication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={ODBC Driver 17 for SQL Server};Server=myServerName\\myInstanceName;DataBase=MyDatabase;Trusted_Connection=Yes;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={ODBC Driver 17 for SQL Server};Server=myServerName\\myInstanceName;DataBase=MyDatabase;Trusted_Connection=Yes;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENTS_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If SQL Server authentication is used, the connection string is &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver={ODBC Driver 17 for SQL Server};Server=myServerName\myInstanceName;DataBase=MyDatabase;Trusted_Connection=No;Uid=myUsername;PWD=myPassword;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More about SQL Server connection strings: https://www.connectionstrings.com/sql-server/&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
The following error message may be encountered: &#039;&#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039;&#039;. Probable reason is that the ODBC driver is missing or driver name is not correct. To solve the issue:&lt;br /&gt;
* Check ODBC drivers is installed by running &#039;&#039;&#039;C:\Windows\System32\odbcad32.exe&#039;&#039;&#039;.&lt;br /&gt;
* Check the connection string.&lt;br /&gt;
&lt;br /&gt;
The following error message may be encountered: &#039;&#039;&#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&#039;&#039;.&lt;br /&gt;
Example error when specified directory is missing:&lt;br /&gt;
&lt;br /&gt;
Error when CSV file is missing: &#039;&#039;&#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting: [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Loading Data from Expression Datasource ==&lt;br /&gt;
Data (cases and events) loaded to a QPR ProcessAnalyzer model can be defined using an expression. The principle with column mappings is similar than in the odbc datasource.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;expression&#039;&#039;&#039; when loading data from an expression. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Expression&lt;br /&gt;
||Expression to get cases. The data structure is an array of arrays, where the outer array contains rows and inner array contains data cells in a row. The first row must contain headers.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;expression&#039;&#039;&#039; when loading data from an expression. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Expression&lt;br /&gt;
||Expression to get events. The data structure is an array of arrays, where the outer array contains rows and inner array contains data cells in a row. The first row must contain headers.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Create model from another model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;ConcatTop([[[&amp;quot;CaseId&amp;quot;, &amp;quot;EventType&amp;quot;, &amp;quot;Timestamp&amp;quot;]], EventLogById(1).Events.[Case.Name, TypeName, Timestamp]])&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Timestamp&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;Let(\&amp;quot;maxEventsPerModel\&amp;quot;, 1000);Let(\&amp;quot;ms\&amp;quot;, [\&amp;quot;SAP_OrderToCash\&amp;quot;, \&amp;quot;BPIC13_incidents\&amp;quot;].(Let(\&amp;quot;modelName\&amp;quot;, _), Models.Where(Name == modelName))[0]);Let(\&amp;quot;eventAttributes\&amp;quot;, ToDictionary());ms.EventAttributes.(Let(\&amp;quot;ea\&amp;quot;, _), eventAttributes.Set(ea.Name, ea));Let(\&amp;quot;orderedEventAttributes\&amp;quot;, OrderByValue(eventAttributes.Keys));ConcatTop([[Flatten([\&amp;quot;Case\&amp;quot;, \&amp;quot;EventType\&amp;quot;, \&amp;quot;TimeStamp\&amp;quot;, orderedEventAttributes])],ConcatTop(ms.EventLog.Events[NumberRange(0, Min(CountTop(_), maxEventsPerModel) - 1)].Flatten([Case.Name, Type.Name, TimeStamp, (Let(\&amp;quot;evt\&amp;quot;, _), orderedEventAttributes.(Let(\&amp;quot;att\&amp;quot;, _), evt.Attribute(att)))]))])&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;TimeStamp&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;Let(\&amp;quot;maxEventsPerModel\&amp;quot;, 1000);Let(\&amp;quot;ms\&amp;quot;, [\&amp;quot;SAP_OrderToCash\&amp;quot;, \&amp;quot;BPIC13_incidents\&amp;quot;].(Let(\&amp;quot;modelName\&amp;quot;, _), Models.Where(Name == modelName))[0]);Let(\&amp;quot;caseAttributes\&amp;quot;, ToDictionary());ms.CaseAttributes.(Let(\&amp;quot;ca\&amp;quot;, _), caseAttributes.Set(ca.Name, ca));Let(\&amp;quot;orderedCaseAttributes\&amp;quot;, OrderByValue(caseAttributes.Keys));Let(\&amp;quot;cases\&amp;quot;, ToDictionary());ms.EventLog.Events[NumberRange(0, Min(CountTop(_), maxEventsPerModel) - 1)].Case.(Let(\&amp;quot;c\&amp;quot;, _), cases.Set(c, true));ConcatTop([[Flatten([\&amp;quot;Case\&amp;quot;, \&amp;quot;Model\&amp;quot;, orderedCaseAttributes])],cases.Keys.Flatten([Name, EventLog.Name, (Let(\&amp;quot;c\&amp;quot;, _), orderedCaseAttributes.(Let(\&amp;quot;att\&amp;quot;, _), c.Attribute(att)))])])&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;[[\&amp;quot;Case\&amp;quot;, \&amp;quot;EventType\&amp;quot;, \&amp;quot;TimeStamp\&amp;quot;],[\&amp;quot;a\&amp;quot;, \&amp;quot;et1\&amp;quot;, DateTime(2019,1)],[\&amp;quot;a\&amp;quot;, \&amp;quot;et2\&amp;quot;, DateTime(2019,2)],[\&amp;quot;a\&amp;quot;, \&amp;quot;et3\&amp;quot;, DateTime(2019,3)],[\&amp;quot;b\&amp;quot;, \&amp;quot;et1\&amp;quot;, DateTime(2019,2)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et3\&amp;quot;, DateTime(2019,2)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et2\&amp;quot;, DateTime(2019,3)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et2\&amp;quot;, DateTime(2019,4)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et3\&amp;quot;, DateTime(2019,5)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et4\&amp;quot;, DateTime(2019,6)]]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;TimeStamp&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Model_Datasources&amp;diff=14265</id>
		<title>QPR ProcessAnalyzer Model Datasources</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Model_Datasources&amp;diff=14265"/>
		<updated>2019-10-15T07:14:00Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Read data from CSV file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data to QPR Processanalyzer models can be loaded from many different sources using different techniques. The following type of datasources can be used:&lt;br /&gt;
* [[#Loading Data from Datatables|Datatables]]: Data can be loaded from QPR ProcessAnalyzer&#039;s own datatables.&lt;br /&gt;
* [[#Loading Data from ODBC Datasource|ODBC datasources]]: Data can be loaded from any ODBC compliant source system, such as many database systems, SAP HANA, ServiceNow, Excel files and CSV files.&lt;br /&gt;
* [[#Loading Data from Expression Datasource|Expression]]: Data can be loaded from a dataset that is produced by an expression written in QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Expressions|expression language]]. With the expression language, it&#039;s possible to e.g. fetch data from other QPR ProcessAnalyzer models, transform the data and then load them to a model using the expression datasource.&lt;br /&gt;
* Models stored to QPR ProcessAnalyze database (legacy method)&lt;br /&gt;
&lt;br /&gt;
For the datatables, ODBC and expression datasources two datasource queries needs to be defined: one for &#039;&#039;&#039;cases&#039;&#039;&#039; and one for &#039;&#039;&#039;events&#039;&#039;&#039;. It&#039;s also possible that cases and event are loaded from different types of datasources, e.g. cases from an ODBC datasource and events from a datatable.&lt;br /&gt;
&lt;br /&gt;
Mappings for the columns in the datasets can be defined freely, so the order of columns is not relevant for QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
== Loading Data from Datatables ==&lt;br /&gt;
In the &#039;&#039;DataSource&#039;&#039; section, when the &#039;&#039;DataSourceType&#039;&#039; is defined as &#039;&#039;datatable&#039;&#039;, data is loaded from a QPR ProcessAnalyzer [[Data_Tables_in_QPR_ProcessAnalyzer|datatable]]. Datatables can be created by importing data to them from a CSV file, or as a result of an [[Data_Extraction,_Transformation,_and_Loading|ETL script]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Supported values are &#039;&#039;&#039;database&#039;&#039;&#039; (default), &#039;&#039;&#039;datatable&#039;&#039;&#039;, &#039;&#039;&#039;expression&#039;&#039;&#039; and &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataTableName&lt;br /&gt;
||Name of the datatable where to fetch the cases data.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Supported values are &#039;&#039;&#039;database&#039;&#039;&#039; (default), &#039;&#039;&#039;datatable&#039;&#039;&#039;, &#039;&#039;&#039;expression&#039;&#039;&#039; and &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataTableName&lt;br /&gt;
||Name of the datatable where to fetch the events data.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Loading Data from ODBC Datasource ==&lt;br /&gt;
In the &#039;&#039;DataSource&#039;&#039; section, when the &#039;&#039;DataSourceType&#039;&#039; is defined as &#039;&#039;odbc&#039;&#039; (for cases or events), data is loaded from an ODBC datasource. There needs to be a suitable ODBC driver installed in QPR ProcesAnalyzer server, and ODBC connection string and query needs to be defined (more below). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;odbc&#039;&#039;&#039; when loading data from an ODBC datasource. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;odbc&#039;&#039;&#039; when loading data from an ODBC datasource. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Configurations examples ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
If 32-bit office is installed in machine then 64-bit ODBC driver need install using /passive parameter.&lt;br /&gt;
More information &lt;br /&gt;
* https://stackoverflow.com/questions/7116019/hand-install-of-64-bit-ms-access-odbc-drivers-when-32-bit-office-is-present &lt;br /&gt;
* https://techblog.aimms.com/2014/10/27/installing-32-bit-and-64-bit-microsoft-access-drivers-next-to-each-other/&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017). Example: ODBC text driver may guess column data type and return null values in case when guessed column type not match. Guessing based top rows of data.&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
Recommended driver: https://www.microsoft.com/en-us/download/details.aspx?id=56567&lt;br /&gt;
&lt;br /&gt;
In this example, data is loaded from an SQL Server table. SQL Server hostname is &#039;&#039;myServerName&#039;&#039;, instance name is &#039;&#039;myInstanceName&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;. The &#039;&#039;Trusted_Connection&#039;&#039; is for Windows authentication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={ODBC Driver 17 for SQL Server};Server=myServerName\\myInstanceName;DataBase=MyDatabase;Trusted_Connection=Yes;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={ODBC Driver 17 for SQL Server};Server=myServerName\\myInstanceName;DataBase=MyDatabase;Trusted_Connection=Yes;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENTS_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If SQL Server authentication is used, the connection string is &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver={ODBC Driver 17 for SQL Server};Server=myServerName\myInstanceName;DataBase=MyDatabase;Trusted_Connection=No;Uid=myUsername;PWD=myPassword;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More about SQL Server connection strings: https://www.connectionstrings.com/sql-server/&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
The following error message may be encountered: &#039;&#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039;&#039;. Probable reason is that the ODBC driver is missing or driver name is not correct. To solve the issue:&lt;br /&gt;
* Check ODBC drivers is installed by running &#039;&#039;&#039;C:\Windows\System32\odbcad32.exe&#039;&#039;&#039;.&lt;br /&gt;
* Check the connection string.&lt;br /&gt;
&lt;br /&gt;
The following error message may be encountered: &#039;&#039;&#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&#039;&#039;.&lt;br /&gt;
Example error when specified directory is missing:&lt;br /&gt;
&lt;br /&gt;
Error when CSV file is missing: &#039;&#039;&#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting: [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Loading Data from Expression Datasource ==&lt;br /&gt;
Data (cases and events) loaded to a QPR ProcessAnalyzer model can be defined using an expression. The principle with column mappings is similar than in the odbc datasource.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;expression&#039;&#039;&#039; when loading data from an expression. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Expression&lt;br /&gt;
||Expression to get cases. The data structure is an array of arrays, where the outer array contains rows and inner array contains data cells in a row. The first row must contain headers.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Use value &#039;&#039;&#039;expression&#039;&#039;&#039; when loading data from an expression. More information about DataSourceType, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Expression&lt;br /&gt;
||Expression to get events. The data structure is an array of arrays, where the outer array contains rows and inner array contains data cells in a row. The first row must contain headers.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||For more information, see [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_Datatables|Loading Data from Datatables]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Create model from another model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;ConcatTop([[[&amp;quot;CaseId&amp;quot;, &amp;quot;EventType&amp;quot;, &amp;quot;Timestamp&amp;quot;]], EventLogById(1).Events.[Case.Name, TypeName, Timestamp]])&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Timestamp&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;Let(\&amp;quot;maxEventsPerModel\&amp;quot;, 1000);Let(\&amp;quot;ms\&amp;quot;, [\&amp;quot;SAP_OrderToCash\&amp;quot;, \&amp;quot;BPIC13_incidents\&amp;quot;].(Let(\&amp;quot;modelName\&amp;quot;, _), Models.Where(Name == modelName))[0]);Let(\&amp;quot;eventAttributes\&amp;quot;, ToDictionary());ms.EventAttributes.(Let(\&amp;quot;ea\&amp;quot;, _), eventAttributes.Set(ea.Name, ea));Let(\&amp;quot;orderedEventAttributes\&amp;quot;, OrderByValue(eventAttributes.Keys));ConcatTop([[Flatten([\&amp;quot;Case\&amp;quot;, \&amp;quot;EventType\&amp;quot;, \&amp;quot;TimeStamp\&amp;quot;, orderedEventAttributes])],ConcatTop(ms.EventLog.Events[NumberRange(0, Min(CountTop(_), maxEventsPerModel) - 1)].Flatten([Case.Name, Type.Name, TimeStamp, (Let(\&amp;quot;evt\&amp;quot;, _), orderedEventAttributes.(Let(\&amp;quot;att\&amp;quot;, _), evt.Attribute(att)))]))])&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;TimeStamp&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;Let(\&amp;quot;maxEventsPerModel\&amp;quot;, 1000);Let(\&amp;quot;ms\&amp;quot;, [\&amp;quot;SAP_OrderToCash\&amp;quot;, \&amp;quot;BPIC13_incidents\&amp;quot;].(Let(\&amp;quot;modelName\&amp;quot;, _), Models.Where(Name == modelName))[0]);Let(\&amp;quot;caseAttributes\&amp;quot;, ToDictionary());ms.CaseAttributes.(Let(\&amp;quot;ca\&amp;quot;, _), caseAttributes.Set(ca.Name, ca));Let(\&amp;quot;orderedCaseAttributes\&amp;quot;, OrderByValue(caseAttributes.Keys));Let(\&amp;quot;cases\&amp;quot;, ToDictionary());ms.EventLog.Events[NumberRange(0, Min(CountTop(_), maxEventsPerModel) - 1)].Case.(Let(\&amp;quot;c\&amp;quot;, _), cases.Set(c, true));ConcatTop([[Flatten([\&amp;quot;Case\&amp;quot;, \&amp;quot;Model\&amp;quot;, orderedCaseAttributes])],cases.Keys.Flatten([Name, EventLog.Name, (Let(\&amp;quot;c\&amp;quot;, _), orderedCaseAttributes.(Let(\&amp;quot;att\&amp;quot;, _), c.Attribute(att)))])])&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;expression&amp;quot;,&lt;br /&gt;
      &amp;quot;Expression&amp;quot;: &amp;quot;[[\&amp;quot;Case\&amp;quot;, \&amp;quot;EventType\&amp;quot;, \&amp;quot;TimeStamp\&amp;quot;],[\&amp;quot;a\&amp;quot;, \&amp;quot;et1\&amp;quot;, DateTime(2019,1)],[\&amp;quot;a\&amp;quot;, \&amp;quot;et2\&amp;quot;, DateTime(2019,2)],[\&amp;quot;a\&amp;quot;, \&amp;quot;et3\&amp;quot;, DateTime(2019,3)],[\&amp;quot;b\&amp;quot;, \&amp;quot;et1\&amp;quot;, DateTime(2019,2)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et3\&amp;quot;, DateTime(2019,2)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et2\&amp;quot;, DateTime(2019,3)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et2\&amp;quot;, DateTime(2019,4)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et3\&amp;quot;, DateTime(2019,5)],[\&amp;quot;c\&amp;quot;, \&amp;quot;et4\&amp;quot;, DateTime(2019,6)]]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;TimeStamp&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13855</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13855"/>
		<updated>2019-07-23T06:46:52Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#RemoveEvents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.  Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.  Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13854</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13854"/>
		<updated>2019-07-23T06:46:34Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#RemoveCases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.  Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13853</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13853"/>
		<updated>2019-07-23T06:45:48Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#ImportEventsIncremental */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13852</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13852"/>
		<updated>2019-07-23T06:45:29Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#ImportEventsIncremental */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
 Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13851</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13851"/>
		<updated>2019-07-23T06:44:52Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#ImportEvents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13850</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13850"/>
		<updated>2019-07-23T06:44:35Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#ImportCaseAttributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source ([[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]]) not support this command.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13849</id>
		<title>SQL Scripting Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=SQL_Scripting_Commands&amp;diff=13849"/>
		<updated>2019-07-23T06:43:47Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* --#ImportCaseAttributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the QPR ProcessAnalyzer commands that are supported in scripts. Each command consists of queries, which are explained in the following subsections.&lt;br /&gt;
&lt;br /&gt;
= --#CallWebService =&lt;br /&gt;
Extracts data via Web Service. This command takes one SELECT query as parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;Address&#039;&lt;br /&gt;
: Defines the URI of the service to call. Mandatory.&lt;br /&gt;
; &#039;Method&#039;&lt;br /&gt;
: Defines the HTTP method to use for the call. Must be any of the following: GET (default), POST, PUT, DELETE. Optional.&lt;br /&gt;
; &#039;Body&#039;&lt;br /&gt;
: Defines the message body text to send to the service. Default value is empty. Optional.&lt;br /&gt;
; &#039;Encoding&#039;&lt;br /&gt;
: Defines the encoding method to use. The supported options are listed in [https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx]. Default value is UTF8. Optional.&lt;br /&gt;
; &#039;Timeout&#039;&lt;br /&gt;
: Number of milliseconds to wait before the request times out. Default value is 60000. Optional.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the web service call is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute in the client side. Supports only data table as the import destination. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;DefaultNetworkCredentials&#039;&lt;br /&gt;
: Optional. Defines the possibility to use default network credentials in web service calls:&lt;br /&gt;
: 1 = use the default network credentials.&lt;br /&gt;
: 0 = don&#039;t use the default network credentials.&lt;br /&gt;
: In Pro version, if --#CallWebService command is run in the server side (ExecuteInClientSide is False), then default network credentials can be used only if service configuration parameter AllowForwardingNetworkCredentials is set to true (it is false by default). Otherwise, if --#CallWebService command is run in the client side (ExecuteInClientSide is True), then default network credentials can always be used. &lt;br /&gt;
: In QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database, it is always possible to use network credentials.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;&amp;lt;other parameters&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: All the rest of the passed parameters not listed above are added as extra headers to the request. Optional.&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
The result of the request is passed to the script following the CallWebService operation in the following variables:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseText&amp;lt;/code&amp;gt; The response text received from the remote server. If there was an error in processing the request, this will contain the received error message. NVARCHAR(MAX). &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseStatusCode&amp;lt;/code&amp;gt; The numeric status code received from the remote server. INT. &lt;br /&gt;
: &amp;lt;code&amp;gt;@_ResponseSuccess&amp;lt;/code&amp;gt; True only if the request returned status code that represents a success. BIT.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CallWebService Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#CreateFilter =&lt;br /&gt;
Creates a new filter with the specified parameters. Returns the id of the newly created filter in SQL dynamic variable @_CreatedFilterId.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&lt;br /&gt;
; &#039;ParentFilterId&#039;&lt;br /&gt;
: Id of the filter/view for which the new filter is applied. Mandatory.&lt;br /&gt;
; &#039;FilterType&#039;&lt;br /&gt;
: Type of the additional filter to apply. Supported values are:&lt;br /&gt;
:: 0 = Exclude Selected&lt;br /&gt;
:: 1 = Include Only Selected&lt;br /&gt;
:: 2 = Exclude Selected Event Types&lt;br /&gt;
:: 3 = Include Only Selected Event Types&lt;br /&gt;
:: 4 = Exclude Selected Cases&lt;br /&gt;
:: 5 = Include Only Selected Cases&lt;br /&gt;
:: 6 = Recalculate&lt;br /&gt;
:: 7 = Include Only Selected Case Attributes&lt;br /&gt;
:: 8 = Exclude Selected Case Attributes&lt;br /&gt;
:: 9 = Include Only Selected Event Attributes&lt;br /&gt;
:: 10 = Exclude Selected Event Attributes&lt;br /&gt;
:: 11 = Remove Filter Rules&lt;br /&gt;
; &#039;&amp;lt;Object selection related parameters&amp;gt;&#039;&lt;br /&gt;
: The object selection related parameters are supported by all the other filter types except Recalculate. Possible parameters and their values and value types:&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;FilterRuleIds&#039;&lt;br /&gt;
: A comma-separated list of filter rule ids. Mandatory for RemoveFilterRules FilterType.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
:  Boolean value. If this is TRUE, then the current selection from the parameters of the script run is copied to the parameters of the command (only if similar setting doesn&#039;t already exist in the command parameters). Default value is FALSE.&lt;br /&gt;
; &#039;FilterName&#039;&lt;br /&gt;
: Name of the new filter. By default, the name is generated automatically by QPR ProcessAnalyzer.&lt;br /&gt;
; &#039;PublishMode&#039;&lt;br /&gt;
: Publish mode for the created filter. Possible values are &amp;quot;Public&amp;quot; and &amp;quot;Private&amp;quot;. Default value is &amp;quot;Private&amp;quot;.&lt;br /&gt;
; &#039;CaseSampleSize&#039;&lt;br /&gt;
: The case sample size for the created filter. Optional. If missing, the sample size is inherited from the parent filter, if CaseSampleSize=0, then all cases are included into the filter, if CaseSampleSize&amp;gt;0, then this value is used as case sample size in the created filter.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[CreateFilter Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Exit =&lt;br /&gt;
Stops the execution of the script and gives a message to the user. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;Exit&#039;&lt;br /&gt;
: Defines whether to stop the script execution:&lt;br /&gt;
: 1 = stop execution of the current script and call the script defined by the RunScriptId parameter if it is given.&lt;br /&gt;
: 0 = if a value for the RunScriptId parameter is given, pause the execution of the current script and call the given script, then resume running the current script after the given script ends. If a value for RunScriptId is not given, do not pause or stop execution of the current script.&lt;br /&gt;
; &#039;MessageText&#039;&lt;br /&gt;
: Text to be shown to the user after the script execution is finished if the script finished because of the Exit command, i.e. when Exit=1. The default value is &amp;quot;Script execution finished.&amp;quot;, which is shown also when the script finished normally, i.e. when Exit=0. The text is also written to the script log.&lt;br /&gt;
; &#039;RunScriptId&#039;&lt;br /&gt;
: Optional. The Id of the script to be run. Can be empty. Note that the script can call itself, so be careful not to create a looping script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Exit Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#GetAnalysis =&lt;br /&gt;
Creates an analysis from the data which the preceding SQL statements given as parameters provide. This command can take several queries, one for every analysis to be performed. These queries and analysis results are independent from one another. Contains information about the scripts that are running and have been run.​&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: See [[QPR ProcessAnalyzer Analysis Parameters]] for a list of supported analysis parameters in QPR ProcessAnalyzer.&lt;br /&gt;
: The --#GetAnalysis command supports the following analysis types:&lt;br /&gt;
0.&#039;&#039;&#039;Flowchart Analysis&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Draws the flowchart of model defined in parameter​&lt;br /&gt;
&lt;br /&gt;
1.&#039;&#039;&#039;Variation Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
3.&#039;&#039;&#039;Path Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Path analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
4.&#039;&#039;&#039;Event Type Analysis in the Chart Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
5.&#039;&#039;&#039;Case Analysis&#039;&#039;&#039;&lt;br /&gt;
Prints the detailed list of cases and attributes of defined model​&lt;br /&gt;
&lt;br /&gt;
6.&#039;&#039;&#039;Event Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Prints the detailed list of Events from defined model​&lt;br /&gt;
&lt;br /&gt;
7.&#039;&#039;&#039;Event Type Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
8.&#039;&#039;&#039;Variation Analysis in the Table Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Variation analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
9.&#039;&#039;&#039;Duration Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Duration analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
10.&#039;&#039;&#039;Profiling Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.&#039;&#039;&#039;User Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of users in server​&lt;br /&gt;
&lt;br /&gt;
12.&#039;&#039;&#039;Operation Log Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens the operation log of ProcessAnalyzer​&lt;br /&gt;
&lt;br /&gt;
13.&#039;&#039;&#039;Flow Analysis&#039;&#039;&#039;​&lt;br /&gt;
&lt;br /&gt;
Opens Flow analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
14.&#039;&#039;&#039;Influence Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open Influence analysis of model defined, with defined parameters​&lt;br /&gt;
&lt;br /&gt;
18.&#039;&#039;&#039;Data Table Analysis​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reads a data table from SQL server and stores it in temporary table​&lt;br /&gt;
&lt;br /&gt;
21.&#039;&#039;&#039;Model Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of models in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
22.&#039;&#039;&#039;Project Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of projects in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
23.&#039;&#039;&#039;Data Table Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of data tables in server​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
24.&#039;&#039;&#039;Script Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of scripts in server​&lt;br /&gt;
&lt;br /&gt;
25.&#039;&#039;&#039;RunScript​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Starts a script (used in UI)​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
26.&#039;&#039;&#039;Event Type Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Event Type analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
28.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens Profiling analysis of the model defined​&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
29.&#039;&#039;&#039;Profiling Analysis in the Trends Mode​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens duration influence analysis of model defined​&lt;br /&gt;
&lt;br /&gt;
30.&#039;&#039;&#039;Filter Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Opens a detailed list of filters in a model defined​&lt;br /&gt;
&lt;br /&gt;
31.&#039;&#039;&#039;Filter Rule Report​&#039;&#039;&#039;&lt;br /&gt;
Contains information about the filter rule in filter defined​&lt;br /&gt;
&lt;br /&gt;
32.&#039;&#039;&#039;Script Log Report​&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
33.&#039;&#039;&#039;[[QPR_ProcessAnalyzer_Expression_Analysis|Expression Analysis​]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Note that for the analysis types Model Report, Project Report, Data Table Report and Script Report, the information related to deleted models/projects/data tables/scripts is not shown by default but can be configured with parameters to be shown. For more information, see the parameters &#039;GetAll&#039;, &#039;IncludeDeletedProjects&#039; and &#039;DeletedModelsOnly&#039; in [[QPR ProcessAnalyzer Analysis Parameters|the list of analysis parameters]]. &lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the analysis is to be stored. When the TargetTable parameter is used, the &amp;quot;Table&amp;quot; result type of the ForceAnalysisResultType parameter is also automatically used. If the specified temporary table already exists in the database then its contents are deleted before storing analysis.&lt;br /&gt;
; &#039;Show&#039;&lt;br /&gt;
: Optional. If TRUE or 1, the analysis is opened after the script is run. If the Show parameter is set to TRUE or 1 and the TargetTable parameter is used in the same GetAnalysis command, the analysis result is stored in the target table in tabular format and QPR ProcessAnalyzer Excel Client shows the analysis result in the normal format.&lt;br /&gt;
; &#039;Title&#039;&lt;br /&gt;
: Optional. The title for the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
; &#039;SheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet created when Show is TRUE or 1. Default value is the name of the analysis type.&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory with the RunScript analysis type. Defines the script that should be run.&lt;br /&gt;
; &#039;SelectedAnalysisResult&#039;&lt;br /&gt;
: Used with the RunScript analysis type. Optional. Identifies the sheet name of the child analysis that should be returned to the caller of the RunScript function. If set, and a child analysis with the given sheet name exists, only that child analysis is returned to the caller. If not set or a child analysis with given sheet name does not exist, then the actual analysis object returned by RunScript is returned as the analysis result. In this case, the child analyses of the returned analysis object contain all the analyses that were generated due to the script having the ShowReport or GetAnalysis command with Show parameter having true as value.&lt;br /&gt;
; &#039;TrendPeriodLevel&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the period level for which trends are shown. Possible values are &amp;quot;Day&amp;quot;, &amp;quot;Week&amp;quot;, &amp;quot;Month&amp;quot; (Default), &amp;quot;Quarter&amp;quot;, and &amp;quot;Year&amp;quot;.&lt;br /&gt;
; &#039;TrendMaximumCount&#039;&lt;br /&gt;
: Used with the Event Type Analysis in the Trends mode. Optional. Defines the maximum number of trend columns to show.&lt;br /&gt;
; &#039;ShowAllCases&#039;&lt;br /&gt;
: Used with Case Analysis. Optional. When this parameter is set to TRUE or 1, the current filter is applied (including sampling, filter rules etc.) but the result will contain all cases for the model. Then, if a case in the result has no events (originally or due to the applied filter, including sampling), the case start date is NULL and the case end data is NULL, and case duration is zero. The same case attributes are shown also for the cases that do not have events as those cases that have events. Default value is FALSE.&lt;br /&gt;
; &#039;ForceAnalysisResultType&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. Defines if the analysis result is to be generated in tabular format. Possible values are:&lt;br /&gt;
: &amp;quot;Normal&amp;quot; = Uses the default result type that is best suited for holding all the information related to the analysis in the most efficient way possible. Default with analysis generation in QPR ProcessAnalyzer Excel client and Web Client.&lt;br /&gt;
: &amp;quot;Table&amp;quot; = Forces the result type to be a tabular AnalysisRowData object. Default for analysis generation in all other uses than with QPR ProcessAnalyzer Excel client and Web Client. Forcing tabular result for Flowchart and Path analyses causes the whole result object to be converted into XML, after which it is returned in a tabular format by returning a table containing only one row and one column having the converted XML in it. The maximum supported size of the converted XML is 10 MB.&lt;br /&gt;
; &#039;IncludeSelection&#039;&lt;br /&gt;
: Can be used with all analysis types. Optional. If TRUE or 1, the current object selection related parameters are copied to the parameters of the command, if similar setting doesn&#039;t already exist in the command parameters. The object selection related parameters are:&amp;lt;div id=&amp;quot;ObjectSelectionParameters&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{ObjectSelectionRelatedParameters}}&lt;br /&gt;
; &#039;ScriptIds&#039;&lt;br /&gt;
: Used with Script Log Report analysis type. A comma-separated list of script ids for which the log entries are returned. Optional. If not given, logs for all scripts available to the user are included into the report.&lt;br /&gt;
; &#039;MinStartTime&#039;&lt;br /&gt;
: Used with the Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the earliest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7.&lt;br /&gt;
:* For Script Log Report analysis type: Mandatory if ScriptIds parameter is not defined.&lt;br /&gt;
:* For Operation Log Analysis analysis type: Optional. Default value is no earliest start time limit.&lt;br /&gt;
; &#039;MaxStartTime&#039;&lt;br /&gt;
: Used with Script Log Report and Operation Log Analysis analysis types. A date time parameter which specifies the latest start time in the log entries. Format is ISO8601: yyyy-mm-ddThh:mm:ss.fff. The maximum year is 2030 and the minimum year is 1970. &#039;fff&#039; stands for fractions of seconds and it is given in 3ms accuracy and the last digit must be 0, 3 or 7. Optional. Default value is no latest start time limit.&lt;br /&gt;
; &#039;IncludeCaseVariationRelations&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseIdToVariationIdMap&amp;quot; property which is an array. Every item in the array describes the mapping between a case and a variation by ids formatted as simple array of length 2 (first item being case id, the second being variation id of that case).&lt;br /&gt;
; &#039;IncludeEventTypeNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the result of the event analysis will include an &amp;quot;EventTypeNames&amp;quot; property which is an array of objects. Every item in the array maps event type id (&amp;quot;Key&amp;quot; property) into the name of that event type (&amp;quot;Value&amp;quot; property).&lt;br /&gt;
; &#039;UseMillisecondsSince1970DateTimeFormatting&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default value = FALSE). If set to TRUE, the start time of every event is actually an integer number of milliseconds after 1.1.1970.&lt;br /&gt;
; &#039;UseIdsInsteadOfNames&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, instead of returning case and event type names, the event analysis returns case and event type identifiers.&lt;br /&gt;
; &#039;IncludeCaseAttributeValues&#039;&lt;br /&gt;
: Used with Event Analysis analysis type. Boolean value (default = FALSE). If set to TRUE, the result of the event analysis will include a &amp;quot;CaseAttributeValues&amp;quot; array which is an array of arrays. The first item in each inner array is the id of the case. All the items following that are the attribute values of case attributes sorted by case attribute name.&lt;br /&gt;
; &#039;MaxTextLength&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum number of characters to return from the &#039;Name&#039;, &#039;Session Id&#039;, &#039;User Name&#039;, &#039;Model Name&#039;, &#039;Message&#039;, and &#039;Additional Data&#039; fields. If 0 (default), all characters are returned.&lt;br /&gt;
; &#039;MaximumCount&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Integer. The maximum amount of rows returned. Optional. Default value is 1000.&lt;br /&gt;
; &#039;ShowOpenOnly&#039;&lt;br /&gt;
: Used with Operation Log Analysis analysis type. Boolean. When TRUE, the Operation Log Analysis returns only operations that don&#039;t have end time. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[GetAnalysis Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportCaseAttributes =&lt;br /&gt;
Loads Case Attributes from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters. Models with external data source not support this command [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Data_from_ODBC_Datasources|ODBC_Datasource]].&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target model case attributes. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing case attributes in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing case attributes of the target model are deleted before the import. If the target model is set to use another model as the Case Attribute Model, those case attributes are not deleted. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; if there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportCaseAttributes command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportCaseAttributes Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportDataTable =&lt;br /&gt;
Imports data to a Data Table. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that if the query doesn&#039;t return any data, the data table is not created.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportDataTable Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEvents =&lt;br /&gt;
Loads Events from the data which the preceding SQL statements given as parameters provide into the specified model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project. If the given ProjectName doesn&#039;t exist, a new project is created.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the existing/new target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used. If the given ModelName doesn&#039;t exist, a new model is created.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with the existing target model events. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing events in the target model are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing events of the target model are deleted before the import. Not used when creating a new model. Default value is TRUE.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: The database query whose results are to be imported. Note that the geometry, geography, hierarchyid, and image SQL data types are not supported by the ImportEvents command.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportEventsIncremental =&lt;br /&gt;
Synchronizes a model with event data in the specified event data table. May delete and/or add new events into the model. Events are matched between the model and the event data table as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Model&lt;br /&gt;
!Event data table&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s case name&lt;br /&gt;
|First column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s event type name&lt;br /&gt;
|Second column&#039;s data converted into NVARCHAR(440)&lt;br /&gt;
|-&lt;br /&gt;
|Event&#039;s start time&lt;br /&gt;
|Third column&#039;s data converted into DATETIME&lt;br /&gt;
|}&lt;br /&gt;
In addition to this, if the AppliedEventAttributes parameter value is not empty, the events are considered the same only if events pass the following additional equality tests:&lt;br /&gt;
* The value of every listed event attribute must be equal according to SQL equality operator both in the model and in the event data table.&lt;br /&gt;
** Data type conversions are not performed for either side of the SQL equality operation.&lt;br /&gt;
** There must be one column in the event data table for every specified event attribute whose field name equals to the name of the event attribute.&lt;br /&gt;
** Also the model itself must have matching event attribute.&lt;br /&gt;
** If there are no matching event attributes in either the model or the event data table, the import operation is cancelled and an entry is written into the logfile.&lt;br /&gt;
Things to note:&lt;br /&gt;
*All event attribute columns (columns starting from index 4) in the event data table not listed in the value of AppliedEventAttributes parameter are imported normally as event attributes and they have no effect in matching events.&lt;br /&gt;
* Incremental import will always delete all event cache tables in the model after the import.&lt;br /&gt;
* Deleting events in incremental import never causes variations, event types nor cases to be removed from the model. However, they may create new ones.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ModelId&#039;&lt;br /&gt;
:  Id of the model into which the new events are to be added. Mandatory.&lt;br /&gt;
; &#039;Event_DataTableId&#039;&lt;br /&gt;
: Id of the data table from which event data to be imported is read. Mandatory.&lt;br /&gt;
; &#039;DeletedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events deleted from the model during the synchronization operation. Optional. If this parameter is not set, the data from the deleted events is lost.&lt;br /&gt;
; &#039;AddedEvents_DataTableId&#039;&lt;br /&gt;
: Id of the data table to receive data for all the events added to the model during the synchronization operation. Optional. If this parameter is not set, the information about what event data was added is not written anywhere.&lt;br /&gt;
; &#039;SkipImport&#039;&lt;br /&gt;
: Boolean value defining if the events are really to be synchronized with the model or should the operation just write details on what has changed in the model into data tables defined by the DeletedEvents_DataTableId and AddedEvents_DataTableId parameters. Optional. If this parameter is not set or is set to FALSE, the events are imported to the model.&lt;br /&gt;
; &#039;AppliedEventAttributes&#039;&lt;br /&gt;
: A comma separated list of event attribute names that are used in matching the events between the model and the event data table. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportEventsIncremental Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOdbcQuery =&lt;br /&gt;
Extracts data directly from the ODBC data source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table.  Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters. Columns are extracted as text data.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below. &lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ODBC specific parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OdbcConnectionString&#039;&lt;br /&gt;
: The ODBC driver connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.connectionstring%28v=vs.110%29.aspx?cs-save-lang=1&amp;amp;cs-lang=csharp#code-snippet-1 OdbcConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings. You can also configure a data source name for connecting to QPR ProcessAnalyzer, for instructions see [[How_to_Configure_an_ODBC_Data_Source_Name_for_Connecting_to_QPR_ProcessAnalyzer|How to Configure an ODBC Data Source Name for Connecting to QPR ProcessAnalyzer]].&lt;br /&gt;
; &#039;OdbcQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples in the [[ImportOdbcQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportOleDbQuery =&lt;br /&gt;
Extracts data from an OLE DB source and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table(i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;OLE DB Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;OleDbConnectionString&#039;&lt;br /&gt;
: The OLE DB connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring%28v=vs.110%29.aspx OleDbConnection.ConnectionString Property in Microsoft Development Network] for more information on the possible connection strings.&lt;br /&gt;
; &#039;OleDbQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportOleDbQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSalesforceQuery =&lt;br /&gt;
Extracts data from Salesforce cloud and imports it into a data table as NVARCHAR(MAX) or SQL_VARIANT type data. Note that this command requires the Salesforce username and password to be visible in the script. This command takes one SELECT query as its parameter.&lt;br /&gt;
&lt;br /&gt;
== Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the existing contents in the target data table are not deleted before import, FALSE or &amp;quot;0&amp;quot; = the existing contents of the target data table are deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;Salesforce Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SalesforceUser&#039;&lt;br /&gt;
: Username for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforcePW&#039;&lt;br /&gt;
: Password for the Salesforce cloud.&lt;br /&gt;
; &#039;SalesforceUrl&#039;&lt;br /&gt;
: Optional. Salesforce service Url for the Salesforce cloud. Default value for QPR ProcessAnalyzer 2016.1 version is &amp;lt;nowiki&amp;gt;&#039;https://login.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;. In order to connect to Salesforce&#039;s test environment the URL should be like: &amp;lt;nowiki&amp;gt;&#039;https://test.salesforce.com/services/Soap/u/27.0&#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
; &#039;SalesforceQueryMode&#039;&lt;br /&gt;
: Optional. The Salesforce query function to be used. 1 (default) = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm queryall()], 2 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm query()], 3 = [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobject.htm describeSObject()].&lt;br /&gt;
; &#039;SalesforceQuery&#039;&lt;br /&gt;
: The query to be run in the Salesforce cloud. Note that &amp;quot;*&amp;quot; cannot be used in the query. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] and [http://www.salesforce.com/us/developer/docs/soql_sosl/index.htm SOQL Reference] for more information. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SalesforceQueryRetries&#039;&lt;br /&gt;
: Optional. Number of retries to attempt if the Salesforce query doesn&#039;t succeed. Default value is 3.&lt;br /&gt;
; &#039;SalesforceQueryRetryWait&#039;&lt;br /&gt;
: Optional. Number of milliseconds to wait between query retries. Default is 3000 ms.&lt;br /&gt;
; &#039;SalesforceBatchSize&#039;&lt;br /&gt;
: Optional. The number of rows of data the query returns in one batch. Minimum = 200, Maximum = 2000, Default = 500. See [http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_query.htm Salesforce API] for more information.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If you get error in --#ImportSalesforceQuery PA Operation saying &amp;quot;INVALID_TYPE sObject type &#039;Objectname&#039; is not supported&amp;quot;:&lt;br /&gt;
* Check that the object in question exists or that the object name is correct.&lt;br /&gt;
* Verify that the Salesforce user has rights to the object. &lt;br /&gt;
** You have to give access to the new custom objects and VisualForce pages from the user&#039;s profile, and you have to check the &amp;quot;Customize Application&amp;quot; checkbox under the same profile (https://developer.salesforce.com/forums/?id=906F00000008qG6IAI). Contact your Salesforce administrator.&lt;br /&gt;
* The Salesforce user may need extra lisence to access the object. Special 3rd party custom objects may need separate license. Contact your Salesforce application administrator.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSalesforceQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSapQuery =&lt;br /&gt;
Extracts data from SAP and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. If a column name contains illegal characters for table names, the illegal characters are converted to be underscore characters, e.g. &amp;quot;sap:Owner&amp;quot; -&amp;gt; &amp;quot;sap_Owner&amp;quot;. Columns are extracted as text data. Note that using this command requires [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|some dlls]] not provided by QPR Software.&lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: If this parameter is given, store the results into a temporary SQL table in ETL sandbox.&lt;br /&gt;
If the TargetTable parameter is not given, use the following destination parameters:&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAP Connection Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapUser&#039;&lt;br /&gt;
: SAP username used to connect to SAP. Mandatory. Corresponds to the &amp;quot;USER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPW&#039;&lt;br /&gt;
: Password of the SAP user used to connect to SAP. Mandatory. Corresponds to the &amp;quot;PASSWD&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapClient&#039;&lt;br /&gt;
: The SAP backend client. Mandatory. Corresponds to the &amp;quot;CLIENT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapAppServerHost&#039;&lt;br /&gt;
: The hostname or IP of the specific SAP application server, to which all connections shall be opened. Mandatory if SapMessageServerHost is not defined. Corresponds to the &amp;quot;ASHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapMessageServerHost&#039;&lt;br /&gt;
: The hostname or IP of the SAP system’s message server (central instance). Mandatory if SapAppServerHost is not defined. Corresponds to the &amp;quot;MSHOST&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemNumber&#039;&lt;br /&gt;
: The SAP system’s system number. Mandatory if SapSystemID is not defined. Corresponds to the &amp;quot;SYSNR&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapSystemID&#039;&lt;br /&gt;
: The SAP system’s three-letter system ID. Mandatory if SapSystemNumber is not defined. Corresponds to the &amp;quot;SYSID&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other SAP Parameters:&#039;&#039;&#039;&lt;br /&gt;
; &#039;SapLanguage&#039;&lt;br /&gt;
: SAP language used. Default value is &amp;quot;EN&amp;quot;. Optional. Corresponds to the &amp;quot;LANG&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPoolSize&#039;&lt;br /&gt;
: The maximum number of RFC connections that this destination will keep in its pool. Default value is &amp;quot;5&amp;quot;. Optional. Corresponds to the &amp;quot;POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapPeakConnectionsLimit&#039;&lt;br /&gt;
: In order to prevent an unlimited number of connections to be opened, you can use this parameter. Default value is &amp;quot;10&amp;quot;. Optional. Corresponds to the &amp;quot;MAX_POOL_SIZE&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapConnectionIdleTimeout&#039;&lt;br /&gt;
: If a connection has been idle for more than SapIdleTimeout seconds, it will be closed and removed from the connection pool upon checking for idle connections or pools. Default value is &amp;quot;600&amp;quot;. Optional. Corresponds to the &amp;quot;IDLE_TIMEOUT&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRouter&#039;&lt;br /&gt;
: A list of host names and service names / port numbers for the SAPRouter in the following format: /H/hostname/S/portnumber. Optional. Corresponds to the &amp;quot;SAPROUTER&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapLogonGroup&#039;&lt;br /&gt;
: The logon group from which the message server shall select an application server. Optional. Corresponds to the &amp;quot;GROUP&amp;quot; constant on SAP side. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryMode&#039;&lt;br /&gt;
: If this number is set to &amp;quot;1&amp;quot;, then the query result will have the SAP Table field names as data table column names and actual data rows as rows. If this is set to &amp;quot;3&amp;quot;, the query result will get the field descriptions from the SAP query using NO_DATA parameter, i.e. the returned columns are the following (in this order): Field, Type, Description, Length, Offset. Default value is &amp;quot;1&amp;quot;. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapQueryTable&#039;&lt;br /&gt;
: Name of the SAP table to be extracted. Specifies the value for the parameter QUERY_TABLE in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Mandatory. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;SapRowcount&#039;&lt;br /&gt;
: The maximum amount of rows to fetch. Specifies the value for parameter ROWCOUNT in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapRowskips&#039;&lt;br /&gt;
: The number of rows to skip. Specifies the value for parameter ROWSKIPS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039;. in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClause&#039;&lt;br /&gt;
: A comma separated list of WHERE clause elements passed for the SapQueryTable. Can be used with or without the SapWhereClauseSelect parameter. If used together with the SapWhereClauseSelect parameter, use the SapWhereClause parameter first. NOTE: The default maximum length for the Where Clause string is 72 characters in SAP, so the recommended maximum length of the SapWhereClause value is also 72 characters. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapWhereClauseSelect&#039;&lt;br /&gt;
:  The SELECT query to be executed in QPR ProcessAnalyzer sandbox. Used with or without the SapWhereClause parameter to pass WHERE clauses to SapQueryTable. If used together with the SapWhereClause parameter, use the SapWhereClause parameter first. The query is expected to return a table with at least one column, as the contents from the rows in the first column of the table are concatenated together to form the WHERE clause in SAP RFC_ReadTable. Therefore, it&#039;s recommended to first create the table with the WHERE clauses into a temporary table. In addition, it&#039;s recommended to have an order number column in the table and use that in the SELECT query to make sure the WHERE clause elements are concatenated in the correct order. The default maximum length for Where Clause string is 72 characters in SAP, so the recommended maximum length for the WHERE clause string in each row of the table is also 72. In effect, specifies the value for parameter OPTIONS in tab: &#039;Import&#039; or function module &#039;rfc_read_table&#039; in SAP. Optional. The contents up to the first 10 rows in the first column of the SELECT query are shown in the QPR ProcessAnalyzer [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]]. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&amp;lt;br/&amp;gt;&lt;br /&gt;
: See also [[Data_Extraction,_Transformation,_and_Loading#Client_Exception_When_Using_.23ImportSapQuery_Command|Troubleshooting]] for other SAP related limitations.&lt;br /&gt;
; &#039;SapFieldNames&#039;&lt;br /&gt;
: A comma separated list of field names for columns to be imported. Default value is empty, resulting in all columns being imported. Specifies the value for parameter FIELDNAME in tab: &#039;Tables&#039; for table &#039;FIELDS&#039; for function module &#039;rfc_read_table&#039; in SAP. Optional. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
; &#039;SapFunction&#039;&lt;br /&gt;
: If you define a value for this parameter, then the new value specifies the SAP function that is called inside the #ImportSapQuery command. Optional. The default value is RFC_READ_TABLE. Another possible value is BBP_RFC_READ_TABLE. See the [http://help.sap.com/saphelp_nw04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm SAP .NET Connector documentation] for more info.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSapQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#ImportSqlQuery =&lt;br /&gt;
Extracts data from an ADO.NET source (which in this case is the SQL Server database) and imports it to QPR ProcessAnalyzer Data Table or QPR ProcessAnalyzer temporary table. Column names are parsed from the query result. It is possible to both create new Data Tables as well as modify existing Data Tables with this command.&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;TargetTable&#039;&lt;br /&gt;
: The temporary table to which the data is to be imported. If not used, define the target using the ProjectId/ProjectName, DataTableId/DataTableName, and Append parameters described below.&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target data table exists.&lt;br /&gt;
; &#039;DataTableId&#039; or &#039;DataTableName&#039;&lt;br /&gt;
: The id or the name of the existing/new target data table.&lt;br /&gt;
; &#039;Append&#039;&lt;br /&gt;
: Defines what to do with an existing target data table and its contents. TRUE or any other Integer than &amp;quot;0&amp;quot; = the target data table and its existing contents are not deleted before import. If a user imports into a data table with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, the contents of the data table are deleted before the import. If a user imports into a temporary table (i.e. TargetTable) with &#039;Append&#039; = FALSE or &amp;quot;0&amp;quot;, then the whole temporary table is deleted before the import. Not used when creating a new data table.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;SQL Query Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SqlConnectionString&#039;&lt;br /&gt;
: The SQL connection string that includes the settings needed to establish the initial connection. Mandatory. See [http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28v=vs.110%29.aspx SqlConnection.ConnectionString Property in Microsoft Development Network] for more information on the connection parameters.&lt;br /&gt;
; &#039;SqlQueryString&#039;&lt;br /&gt;
: The SQL query string. Mandatory. Note that if the query doesn&#039;t return any data, the target data table or temporary table is not created.&lt;br /&gt;
; &#039;ExecuteInClientSide&#039;&lt;br /&gt;
: Defines whether the command is executed in the client side or in the server side when using QPR ProcessAnalyzer Pro. This parameter is used when there is no server connection available, for example. TRUE or any other Integer than &amp;quot;0&amp;quot; = the import query is executed in the client side. FALSE or &amp;quot;0&amp;quot; = the import query is executed in the server side. Not used with QPR ProcessAnalyzer Xpress or QPR ProcessAnalyzer Database as they always execute the command in the client side. Supports only data table as the import destination. If &#039;TargetTable&#039; has been defined as the import destination and the value of this parameter is given as TRUE or any other Integer than &amp;quot;0&amp;quot;, you will receive an error message. Optional. Default value is FALSE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ImportSqlQuery Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveCases =&lt;br /&gt;
Removes all or specified cases in the target model. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the cases to be removed. Note that if there are several columns in the query, the cases have to be in the first column of the query. If the second query is not given, all cases are removed from the model. If the result of the second query is empty, no cases are removed. Removing a case also removes all events and case attributes associated with the case.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveCases Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#RemoveEvents =&lt;br /&gt;
Removes all or specified events in the target model, but retains Cases, Event Types, and Variations. This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ProjectId&#039; or &#039;ProjectName&#039;&lt;br /&gt;
: The id or the name of the project in which the target model exists. Defaults to the current project.&lt;br /&gt;
; &#039;ModelId&#039; or &#039;ModelName&#039;&lt;br /&gt;
: The id or the name of the target model. Defaults to the current model. If ModelId is given, neither ProjectId nor ProjectName are used.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
The optional database query that returns the event Id&#039;s to be removed. Note that if there are several columns in the query, the event Id&#039;s have to be in the first column of the query.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[RemoveEvents Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#Run =&lt;br /&gt;
Runs another script with specified parameters. This command can take multiple SELECT queries as parameters.&lt;br /&gt;
&lt;br /&gt;
== First Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;ScriptId&#039;&lt;br /&gt;
: Mandatory. The Id of the called script.&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
: &amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
== Following Queries ==&lt;br /&gt;
The following queries are optional and used for initializing the arguments which are passed to the script to be run. The maximum number of arguments is 10.  Each argument is created as a temporary table with names #_Arg1, ... #_Arg10. In the created temporary tables, all columns are of the type SQL Variant. If the column names have not been specified, then &amp;quot;Value_0&amp;quot;, &amp;quot;Value_1&amp;quot;, etc. are used as column names.&lt;br /&gt;
The possible arguments are as follows:&lt;br /&gt;
:* @_Argv - type INT: the number of provided parameters (from 0 to 10)&lt;br /&gt;
:* #_Arg1, ... #_Arg10: arguments passed to that script&lt;br /&gt;
&lt;br /&gt;
Each argument exists in the called script until the next --#Run command is executed in that script. After the called script has finished, the main script continues its execution.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[Run Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#SendEmail =&lt;br /&gt;
Sends an e-mail and writes a message to script log whether sending the email was successful or not. Script execution continues even when the sending isn&#039;t successful. &lt;br /&gt;
&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;&lt;br /&gt;
: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&#039;&#039;&#039;E-mail Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;EmailFrom&#039;&lt;br /&gt;
: Defines the from address for this e-mail message. Mandatory.&lt;br /&gt;
; &#039;EmailTo&#039;&lt;br /&gt;
: Defines the recipient(s) for this e-mail message given in a list separated by comma. Mandatory.&lt;br /&gt;
; &#039;EmailSubject&#039;&lt;br /&gt;
: Defines the subject of the email. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailBody&#039;&lt;br /&gt;
: Defines the message body. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailCc&#039;&lt;br /&gt;
: Defines the carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailBcc&#039;&lt;br /&gt;
: Defines the blind carbon copy recipient(s) for this e-mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailIsBodyHtml&#039;&lt;br /&gt;
: Defines whether the e-mail message body is in HTML. TRUE or any other Integer than &amp;quot;0&amp;quot; = body is in HTML, FALSE or &amp;quot;0&amp;quot; = body is not in HTML. Default value is FALSE. Optional.&lt;br /&gt;
; &#039;EmailSender&#039;&lt;br /&gt;
: Defines the sender&#039;s address for this e-mail message. Default value is empty. Optional.&lt;br /&gt;
; &#039;EmailReplyTo&#039;&lt;br /&gt;
: Defines the ReplyTo address(es) for the mail message given in a list separated by comma. Optional.&lt;br /&gt;
; &#039;EmailPriority&#039;,&lt;br /&gt;
: Defines the priority of this e-mail message. Possible values are &amp;quot;High&amp;quot;, &amp;quot;Normal&amp;quot;, and &amp;quot;Low&amp;quot;. Default value is &amp;quot;Normal&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailDeliveryNotification&#039;&lt;br /&gt;
: Defines the delivery notifications for this e-mail message. Possible values are &amp;quot;Delay&amp;quot;, &amp;quot;Never&amp;quot;, &amp;quot;None&amp;quot;, &amp;quot;OnFailure&amp;quot;, and &amp;quot;OnSuccess&amp;quot;. Default value is &amp;quot;None&amp;quot;. Optional.&lt;br /&gt;
; &#039;EmailBodyEncoding&#039;&lt;br /&gt;
: Defines the encoding used to encode the message body. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailSubjectEncoding&#039;&lt;br /&gt;
: Defines the encoding used for the subject content for this e-mail message. Supported encodings are listed in the &amp;quot;Remarks&amp;quot; section at http://msdn.microsoft.com/en-us/library/System.Text.Encoding.aspx. Optional.&lt;br /&gt;
; &#039;EmailAttachmentQuery&#039;&lt;br /&gt;
: Defines a query to fetch the parameters for adding attachments to the email. Each row (except the header row)  in the query result corresponds to one attachment. The result must contain the following columns in this order: Name of the attachment, Content for the attachment (Sent as-is without any modifications. Supports binary values.), Media type (supported types are text/plain, text/html, text/xml, and image/jpeg), and Creation time (SQL datetime). Names of the columns do not matter. If the result doesn&#039;t contain some of the columns, an error is written into the Progress log, and the email is not sent. Optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMTP Server Parameters&#039;&#039;&#039;&lt;br /&gt;
; &#039;SmtpServer&#039;&lt;br /&gt;
: Defines the hostname or the IP address of the server. Mandatory for the first occurrence of the SendEmail command during script execution.&lt;br /&gt;
; &#039;SmtpPort&#039;&lt;br /&gt;
: Defines the port of the SMTP server. Default value is &amp;quot;25&amp;quot;. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationUsername&#039;&lt;br /&gt;
: Defines the user name for the SMTP server. Note that the user name is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpAuthenticationPassword&#039;&lt;br /&gt;
: Defines the password for the SMTP server. Note that the password is in plain text and visible to all users who have access to the script. Optional.&lt;br /&gt;
; &#039;SmtpEnableSSL&#039;&lt;br /&gt;
: Defines whether SSL should be enabled for the SMTP connection. TRUE or any other Integer than &amp;quot;0&amp;quot; = SSL is enabled, FALSE or &amp;quot;0&amp;quot; = SSL is not enabled. Default value is &amp;quot;FALSE&amp;quot;. Optional.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[SendEmail Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
See also [[How to Define the SMTP Server Connection in an On-Site Deployment]].&lt;br /&gt;
&lt;br /&gt;
= --#ShowReport =&lt;br /&gt;
Creates a new Excel sheet containing a table that contains the results of the user specified SQL query. The result column names are the field names of the SQL query and the rows are the actual data rows of the SQL query. The report can be used to see, for example, the events that would be loaded into QPR ProcessAnalyzer before actually loading them. If the events have problems that cause errors when loaded it is useful to be able to see the row data in a report.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Excel cannot handle more than 1 million rows to be shown so if the result set contains more rows than that, the data will be truncated to 1 million rows.&lt;br /&gt;
&lt;br /&gt;
This command takes two SELECT queries as parameters.&lt;br /&gt;
== First Query ==&lt;br /&gt;
A user specified SQL query to be shown in the configured Excel sheet. &lt;br /&gt;
; &amp;lt;nowiki&amp;gt;&#039;&amp;lt;data&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Mandatory. The database query whose results are to be returned.&lt;br /&gt;
&lt;br /&gt;
== Second Query ==&lt;br /&gt;
Configures the command using a SELECT statement returning two columns: the first column is for a key and the second one is for a value of that key. The values in both the key column and in the value column are of type NVARCHAR. The supported keys for this command are:&amp;lt;br/&amp;gt;&lt;br /&gt;
; &#039;&amp;lt;Analysis Parameter&amp;gt;&#039;&lt;br /&gt;
: Optional. The [[QPR ProcessAnalyzer Analysis Parameters]] given for the operation. Some suggested parameters to be used:&lt;br /&gt;
:; &#039;Title&#039;&lt;br /&gt;
:: The title of the created report. If not given, &amp;quot;Report&amp;quot; will be used as a default.&lt;br /&gt;
:; &#039;SheetName&#039;&lt;br /&gt;
:: The name of the Excel sheet to be created.&lt;br /&gt;
:; &#039;MaximumCount&#039;&lt;br /&gt;
:: The maximum number of rows to show (0 = all, default = 1000).&lt;br /&gt;
&lt;br /&gt;
; &#039;PivotSheetName&#039;&lt;br /&gt;
: Optional. The name of the Excel sheet to be created. The sheet will contain a pivot table that includes all columns and rows in the report. The pivot sheet doesn&#039;t support drill-down. The pivot sheet has the following additional parameters:&lt;br /&gt;
:; &#039;PivotFilters&#039;&lt;br /&gt;
::A comma separated list of result sheet column names that should be used in pivot table filters dimension.&lt;br /&gt;
:; &#039;PivotRows&#039;&lt;br /&gt;
:: A comma separated list of row names to be used in the pivot table rows dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the row name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotColumns&#039;&lt;br /&gt;
:: A comma separated list of column names to be used in the pivot table columns dimension. To sort the results, add the following parameters separated by commas &amp;quot;(SortDirection=&amp;lt;Ascending or Descending&amp;gt;)&amp;quot; and/or &amp;quot;(SortBy=&amp;lt;Sort Field Name&amp;gt;)&amp;quot; to the column name. For example: &amp;quot;Region(SortDirection=Ascending, SortBy=&amp;quot;Average of DurationDays&amp;quot;), Country(SortBy=&amp;quot;Sum of Cost&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotValues&#039;&lt;br /&gt;
:: A comma separated list of column names to be used as the pivot table values. The summarize value field can be defined by adding a summarize value parameter to the end of each value name as follows: &amp;quot;(SummarizeBy=&amp;lt;Summarize value tag)&amp;quot;. If the parameter is not defined, the Excel default value for summarize is used: &amp;quot;Sum&amp;quot; for numbers and &amp;quot;Count&amp;quot; for other types. The supported summarize value tags are: Sum, Count, Average, Max, Min, Product, CountNumbers, StdDev, StdDevp, Var, Varp. For example: &amp;quot;Duration Days(SummarizeBy=&amp;quot;Average&amp;quot;),Cost(SummarizeBy=&amp;quot;Sum&amp;quot;)&amp;quot;&lt;br /&gt;
:; &#039;PivotTitle&#039;&lt;br /&gt;
:: The title of the pivot sheet to be created. If undefined, the name defined in PivotSheetName will be used.&lt;br /&gt;
&lt;br /&gt;
; &#039;CatchOperationExceptions&#039;: Optional. Defines whether to stop the script execution or to continue to run the script from the next statement if an exception occurs when running the script:&lt;br /&gt;
: 1 = don&#039;t stop execution of the script, continue running the script from the next statement.&lt;br /&gt;
: 0 = stop execution of the current script and show the exception.&lt;br /&gt;
: The following script variables will be set and are shown in the script log:&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionOccurred&amp;lt;/code&amp;gt; If there was an exception, then this value is 1, otherwise 0. INT&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionType&amp;lt;/code&amp;gt; If there was an exception, shows the C# class name for the exception, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionMessage&amp;lt;/code&amp;gt; If there was an exception, contains a message that would have been displayed, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
:&amp;lt;code&amp;gt;@_ExceptionDetails&amp;lt;/code&amp;gt; If there was an exception, contains the details that would have been displayed, including the system stack trace, NVARCHAR(MAX), otherwise NULL.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[ShowReport Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#StartBackground =&lt;br /&gt;
Makes the script run in background starting from this command, so that using QPR ProcessAnalyzer Excel client is possible while the script is running. The script results are returned to the Excel Client user interface (e.g. when ShowReport is reached in the script) before the StartBackground command is reached. Operations (e.g. ShowReport) resulting into adding new analysis results into the script run results after the StartBackground command is reached are executed, but the results are ignored, and in such cases an error is written into the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]].&lt;br /&gt;
&lt;br /&gt;
Any exceptions causing the script run to fail while running the script in the background are written into the Script Log and the [[Operation Log]]. It&#039;s possible to terminate scripts that run in the background via the Operation Log. If an import operation specified in the script requires execution in the client side, the client side execution is ignored and a warning is written into the Script Log.&lt;br /&gt;
&lt;br /&gt;
This command is supported only for QPR ProcessAnalyzer Service based data source connections (i.e. not supported for Xpress or Database activations). Takes one SELECT query as a parameter. Following parameter is supported:&lt;br /&gt;
&lt;br /&gt;
; &#039;Enabled&#039;&lt;br /&gt;
: Boolean value defining whether the script is run in background starting from this command. TRUE = run in background, FALSE = don&#039;t run in background. Default value is TRUE.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[StartBackground Script Examples]] page.&lt;br /&gt;
&lt;br /&gt;
= --#WriteLog =&lt;br /&gt;
Adds the first column values from the preceding SQL statements to the log that is shown after the whole script execution is completed. In addition to the WriteLog command, you can also use the [http://msdn.microsoft.com/en-us/library/ms176047.aspx Print SQL statement] to generate log entries into the script execution log. The difference to the WriteLog command is that the Print statement can use also variables.&lt;br /&gt;
&lt;br /&gt;
See examples at the [[WriteLog Script Examples]] page.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13840</id>
		<title>QPR ProcessAnalyzer System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13840"/>
		<updated>2019-07-16T11:47:30Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* System Requirements for QPR ProcessAnalyzer ScriptLauncher */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Excel Client ==&lt;br /&gt;
System requirements for QPR ProcessAnalyzer Excel Client:&lt;br /&gt;
* Microsoft Windows 10 operating system (64 bit version)&lt;br /&gt;
** Mac users need to use Windows in a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop], [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Microsoft Office 2013, 2016 (32 bit and 64 bit versions) or 2019.&lt;br /&gt;
* Internet connection for connecting to QPR ProcessAnalyzer Service&lt;br /&gt;
&lt;br /&gt;
The following components are also required and they will be installed if not found on your computer:&lt;br /&gt;
* Microsoft .NET Framework 4.7.2&lt;br /&gt;
* Microsoft Visual Studio Tools for Office Runtime&lt;br /&gt;
&lt;br /&gt;
Additional requirement for using [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command: [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|install the SAP Connector for Microsoft .NET Dll files]].&lt;br /&gt;
&lt;br /&gt;
== Additional System Requirements for QPR ProcessAnalyzer Xpress ==&lt;br /&gt;
In addition to the requirements for QPR ProcessAnalyzer Excel Client, there are the following additional requirements for QPR ProcessAnalyzer Xpress:&lt;br /&gt;
* 64-bit Microsoft Windows 10 operating system&lt;br /&gt;
* SQL Server LocalDB 2016 database&lt;br /&gt;
* Internet connection in order to [[Activating QPR ProcessAnalyzer|activate]] the product&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Server ==&lt;br /&gt;
QPR ProcessAnalyzer Server is needed for QPR ProcessAnalyzer Pro. System requirements for QPR ProcessAnalyzer Server:&lt;br /&gt;
* Microsoft Windows Server 2008 R2, 2012 or 2016 operating system&lt;br /&gt;
* Microsoft SQL Server 2012, 2014, 2016 or 2017 database with Database Engine Services installed&lt;br /&gt;
* Sufficiently powerful enough hardware to run the operating system&lt;br /&gt;
* &#039;&#039;&#039;Microsoft .NET Framework 4.7.1&#039;&#039;&#039; is installed &lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Install_Server_Roles_and_Features_for_IIS | Install Server Roles and Features for Microsoft Internet Information Services (IIS)]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer ScriptLauncher ==&lt;br /&gt;
* Microsoft Windows 10 or Windows Server 2012 R2 operating system. Mac users need to use Windows as a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop] or [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Internet connection &lt;br /&gt;
* The sapnco.dll and sapnco_utils.dll files distributed in the [http://service.sap.com/connectors SAP Connector for Microsoft .NET Version 3.0 (requires SAP Service Marketplace credentials)] package are needed in order to use the [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command. See the [[Installing QPR ProcessAnalyzer Excel Client#Installing_QPR_ProcessAnalyzer_ScriptLauncher|instructions]] for installing them.&lt;br /&gt;
* Microsoft .NET Framework 4.7.1 or newer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Server ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Small&#039;&#039;&#039; datasets (up to 5 million events per model) with simultaneous users&lt;br /&gt;
** 32GB memory&lt;br /&gt;
** 4 processor cores&lt;br /&gt;
** 50GB disk &lt;br /&gt;
* &#039;&#039;&#039;Medium&#039;&#039;&#039; datasets (10-20 million events per model) with simultaneous users&lt;br /&gt;
** 64GB memory&lt;br /&gt;
** 8 processor cores&lt;br /&gt;
** 100GB disk &lt;br /&gt;
* &#039;&#039;&#039;Large&#039;&#039;&#039; datasets (20-80 million events per model) with simultaneous users&lt;br /&gt;
** 256GB memory&lt;br /&gt;
** 16 processor cores&lt;br /&gt;
** 150GB disk &lt;br /&gt;
* &#039;&#039;&#039;Very large&#039;&#039;&#039; datasets (more than 80 million events per model) with simultaneous users&lt;br /&gt;
** 512GB memory&lt;br /&gt;
** 32 processor cores&lt;br /&gt;
** 200GB disk&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Database Server ==&lt;br /&gt;
Recommended hardware configuration for the server computer running Microsoft SQL Server database:&lt;br /&gt;
* 16GB memory&lt;br /&gt;
* 4 processor cores&lt;br /&gt;
* 300GB - 1TB available SSD disk for SQL Server temp database&lt;br /&gt;
* 500GB - 10TB available SSD disk for data storage on a disk dedicated to QPR ProcessAnalyzer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Xpress Excel Client==&lt;br /&gt;
* 8GB memory&lt;br /&gt;
* 4 core processor&lt;br /&gt;
* 32GB disk&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13839</id>
		<title>QPR ProcessAnalyzer System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13839"/>
		<updated>2019-07-16T11:47:17Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* System Requirements for QPR ProcessAnalyzer Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Excel Client ==&lt;br /&gt;
System requirements for QPR ProcessAnalyzer Excel Client:&lt;br /&gt;
* Microsoft Windows 10 operating system (64 bit version)&lt;br /&gt;
** Mac users need to use Windows in a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop], [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Microsoft Office 2013, 2016 (32 bit and 64 bit versions) or 2019.&lt;br /&gt;
* Internet connection for connecting to QPR ProcessAnalyzer Service&lt;br /&gt;
&lt;br /&gt;
The following components are also required and they will be installed if not found on your computer:&lt;br /&gt;
* Microsoft .NET Framework 4.7.2&lt;br /&gt;
* Microsoft Visual Studio Tools for Office Runtime&lt;br /&gt;
&lt;br /&gt;
Additional requirement for using [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command: [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|install the SAP Connector for Microsoft .NET Dll files]].&lt;br /&gt;
&lt;br /&gt;
== Additional System Requirements for QPR ProcessAnalyzer Xpress ==&lt;br /&gt;
In addition to the requirements for QPR ProcessAnalyzer Excel Client, there are the following additional requirements for QPR ProcessAnalyzer Xpress:&lt;br /&gt;
* 64-bit Microsoft Windows 10 operating system&lt;br /&gt;
* SQL Server LocalDB 2016 database&lt;br /&gt;
* Internet connection in order to [[Activating QPR ProcessAnalyzer|activate]] the product&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Server ==&lt;br /&gt;
QPR ProcessAnalyzer Server is needed for QPR ProcessAnalyzer Pro. System requirements for QPR ProcessAnalyzer Server:&lt;br /&gt;
* Microsoft Windows Server 2008 R2, 2012 or 2016 operating system&lt;br /&gt;
* Microsoft SQL Server 2012, 2014, 2016 or 2017 database with Database Engine Services installed&lt;br /&gt;
* Sufficiently powerful enough hardware to run the operating system&lt;br /&gt;
* &#039;&#039;&#039;Microsoft .NET Framework 4.7.1&#039;&#039;&#039; is installed &lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Install_Server_Roles_and_Features_for_IIS | Install Server Roles and Features for Microsoft Internet Information Services (IIS)]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer ScriptLauncher ==&lt;br /&gt;
* Microsoft Windows 10 or Windows Server 2012 R2 operating system. Mac users need to use Windows as a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop] or [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Internet connection &lt;br /&gt;
* The sapnco.dll and sapnco_utils.dll files distributed in the [http://service.sap.com/connectors SAP Connector for Microsoft .NET Version 3.0 (requires SAP Service Marketplace credentials)] package are needed in order to use the [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command. See the [[Installing QPR ProcessAnalyzer Excel Client#Installing_QPR_ProcessAnalyzer_ScriptLauncher|instructions]] for installing them.&lt;br /&gt;
* Microsoft .NET Framework 4.6.1 or newer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Server ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Small&#039;&#039;&#039; datasets (up to 5 million events per model) with simultaneous users&lt;br /&gt;
** 32GB memory&lt;br /&gt;
** 4 processor cores&lt;br /&gt;
** 50GB disk &lt;br /&gt;
* &#039;&#039;&#039;Medium&#039;&#039;&#039; datasets (10-20 million events per model) with simultaneous users&lt;br /&gt;
** 64GB memory&lt;br /&gt;
** 8 processor cores&lt;br /&gt;
** 100GB disk &lt;br /&gt;
* &#039;&#039;&#039;Large&#039;&#039;&#039; datasets (20-80 million events per model) with simultaneous users&lt;br /&gt;
** 256GB memory&lt;br /&gt;
** 16 processor cores&lt;br /&gt;
** 150GB disk &lt;br /&gt;
* &#039;&#039;&#039;Very large&#039;&#039;&#039; datasets (more than 80 million events per model) with simultaneous users&lt;br /&gt;
** 512GB memory&lt;br /&gt;
** 32 processor cores&lt;br /&gt;
** 200GB disk&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Database Server ==&lt;br /&gt;
Recommended hardware configuration for the server computer running Microsoft SQL Server database:&lt;br /&gt;
* 16GB memory&lt;br /&gt;
* 4 processor cores&lt;br /&gt;
* 300GB - 1TB available SSD disk for SQL Server temp database&lt;br /&gt;
* 500GB - 10TB available SSD disk for data storage on a disk dedicated to QPR ProcessAnalyzer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Xpress Excel Client==&lt;br /&gt;
* 8GB memory&lt;br /&gt;
* 4 core processor&lt;br /&gt;
* 32GB disk&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13838</id>
		<title>QPR ProcessAnalyzer System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13838"/>
		<updated>2019-07-16T11:47:05Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* System Requirements for QPR ProcessAnalyzer Excel Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Excel Client ==&lt;br /&gt;
System requirements for QPR ProcessAnalyzer Excel Client:&lt;br /&gt;
* Microsoft Windows 10 operating system (64 bit version)&lt;br /&gt;
** Mac users need to use Windows in a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop], [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Microsoft Office 2013, 2016 (32 bit and 64 bit versions) or 2019.&lt;br /&gt;
* Internet connection for connecting to QPR ProcessAnalyzer Service&lt;br /&gt;
&lt;br /&gt;
The following components are also required and they will be installed if not found on your computer:&lt;br /&gt;
* Microsoft .NET Framework 4.7.2&lt;br /&gt;
* Microsoft Visual Studio Tools for Office Runtime&lt;br /&gt;
&lt;br /&gt;
Additional requirement for using [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command: [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|install the SAP Connector for Microsoft .NET Dll files]].&lt;br /&gt;
&lt;br /&gt;
== Additional System Requirements for QPR ProcessAnalyzer Xpress ==&lt;br /&gt;
In addition to the requirements for QPR ProcessAnalyzer Excel Client, there are the following additional requirements for QPR ProcessAnalyzer Xpress:&lt;br /&gt;
* 64-bit Microsoft Windows 10 operating system&lt;br /&gt;
* SQL Server LocalDB 2016 database&lt;br /&gt;
* Internet connection in order to [[Activating QPR ProcessAnalyzer|activate]] the product&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Server ==&lt;br /&gt;
QPR ProcessAnalyzer Server is needed for QPR ProcessAnalyzer Pro. System requirements for QPR ProcessAnalyzer Server:&lt;br /&gt;
* Microsoft Windows Server 2008 R2, 2012 or 2016 operating system&lt;br /&gt;
* Microsoft SQL Server 2012, 2014, 2016 or 2017 database with Database Engine Services installed&lt;br /&gt;
* Sufficiently powerful enough hardware to run the operating system&lt;br /&gt;
* &#039;&#039;&#039;Microsoft .NET Framework 4.6.1&#039;&#039;&#039; is installed &lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Install_Server_Roles_and_Features_for_IIS | Install Server Roles and Features for Microsoft Internet Information Services (IIS)]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer ScriptLauncher ==&lt;br /&gt;
* Microsoft Windows 10 or Windows Server 2012 R2 operating system. Mac users need to use Windows as a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop] or [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Internet connection &lt;br /&gt;
* The sapnco.dll and sapnco_utils.dll files distributed in the [http://service.sap.com/connectors SAP Connector for Microsoft .NET Version 3.0 (requires SAP Service Marketplace credentials)] package are needed in order to use the [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command. See the [[Installing QPR ProcessAnalyzer Excel Client#Installing_QPR_ProcessAnalyzer_ScriptLauncher|instructions]] for installing them.&lt;br /&gt;
* Microsoft .NET Framework 4.6.1 or newer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Server ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Small&#039;&#039;&#039; datasets (up to 5 million events per model) with simultaneous users&lt;br /&gt;
** 32GB memory&lt;br /&gt;
** 4 processor cores&lt;br /&gt;
** 50GB disk &lt;br /&gt;
* &#039;&#039;&#039;Medium&#039;&#039;&#039; datasets (10-20 million events per model) with simultaneous users&lt;br /&gt;
** 64GB memory&lt;br /&gt;
** 8 processor cores&lt;br /&gt;
** 100GB disk &lt;br /&gt;
* &#039;&#039;&#039;Large&#039;&#039;&#039; datasets (20-80 million events per model) with simultaneous users&lt;br /&gt;
** 256GB memory&lt;br /&gt;
** 16 processor cores&lt;br /&gt;
** 150GB disk &lt;br /&gt;
* &#039;&#039;&#039;Very large&#039;&#039;&#039; datasets (more than 80 million events per model) with simultaneous users&lt;br /&gt;
** 512GB memory&lt;br /&gt;
** 32 processor cores&lt;br /&gt;
** 200GB disk&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Database Server ==&lt;br /&gt;
Recommended hardware configuration for the server computer running Microsoft SQL Server database:&lt;br /&gt;
* 16GB memory&lt;br /&gt;
* 4 processor cores&lt;br /&gt;
* 300GB - 1TB available SSD disk for SQL Server temp database&lt;br /&gt;
* 500GB - 10TB available SSD disk for data storage on a disk dedicated to QPR ProcessAnalyzer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Xpress Excel Client==&lt;br /&gt;
* 8GB memory&lt;br /&gt;
* 4 core processor&lt;br /&gt;
* 32GB disk&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Wiki&amp;diff=13827</id>
		<title>QPR ProcessAnalyzer Wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Wiki&amp;diff=13827"/>
		<updated>2019-07-15T11:01:22Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Configuring */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;downloadButton&amp;quot; style=&amp;quot;width:240px;float:right;margin: 3px 12px 0px 15px;&amp;quot;&amp;gt;[[QPR_Product_Downloads|Download&amp;lt;br /&amp;gt;QPR ProcessAnalyzer]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Welcome to QPR ProcessAnalyzer Wiki! QPR ProcessAnalyzer is the tool for turning event and transactional data into visual process intelligence. Read [[Introduction to QPR ProcessAnalyzer]] for an introduction of the software. Topics in this documentation are divided into users roles: process analysts, developers and administrators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;height:5px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== For Process Analysts ==&lt;br /&gt;
QPR ProcessAnalyzer is used via web browser. In QPR ProcessAnalyzer application you can perform various analyses on your process model. If you prefer standalone installation, you can use excel client for analyses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex;flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 270px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Using QPR ProcessAnalyzer ===&lt;br /&gt;
* [[Introduction to QPR ProcessAnalyzer]]&lt;br /&gt;
* [[Process_Mining_Concept|Process Mining Concepts and Terms]]&lt;br /&gt;
* [[QPR ProcessAnalyzer UI|QPR ProcessAnalyzer UI]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Presentation Object (PAPO)|QPR ProcessAnalyzer Dashboards]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Presentation Object Variables|QPR ProcessAnalyzer Variables]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Use Cases|Customer Use Cases]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Certification]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 370px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Process Mining Analyses and Visualizations ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left; width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Case_Analysis (PAPO)|Case Analysis]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_-_ChartView|ChartView]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_-_Clustering_Analysis_View|Clustering Analysis]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_-_Conformance_Analysis_View|Conformance Analysis]]&lt;br /&gt;
* [[Duration_Analysis (PAPO)|Duration Analysis]]&lt;br /&gt;
* [[Event_Analysis (PAPO)|Event Analysis]]&lt;br /&gt;
* [[Event_Type_Analysis (PAPO)|Event Type Analysis]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left; width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Flowchart_Analysis (PAPO)|Flowchart Analysis]]&lt;br /&gt;
* [[Flowchart_Influence_Analysis (PAPO)|Flowchart Influence Analysis]]&lt;br /&gt;
* [[Influence_Analysis_for_Case_Attributes (PAPO)|Influence Analysis for Case Attributes]]&lt;br /&gt;
* [[KPI Analysis (PAPO)|KPI Analysis]]&lt;br /&gt;
* [[Profiling_Case_Analysis (PAPO)|Profiling Case Analysis]]&lt;br /&gt;
* [[Profiling_Event_Analysis (PAPO)|Profiling Event Analysis]]&lt;br /&gt;
* [[Variation_Analysis (PAPO)|Variation Analysis]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 240px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== QPR ProcessAnalyzer Excel Client ===&lt;br /&gt;
* [[Get Started with QPR ProcessAnalyzer Excel Client|Get Started with Excel Client]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Excel Client|Using Excel Client]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Excel_Client|Installing Excel Client]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== For Developers ==&lt;br /&gt;
To create QPR ProcessAnalyzer models, you need to Extract data from source system(s), transform data to a format compatible with QPR ProcessAnalyzer and finally load data as process model(s). To perform these tasks, you can use T-SQL and QPR ProcessAnalyzer scripting commands. When you have created a model, end-users can analyze it easily by using QPR UI’s ProcessAnalyzer application. If needed, there are plenty of tools to customize the end-user experience in QPR UI.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex;flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 370px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Expression Language ===&lt;br /&gt;
* [[QPR ProcessAnalyzer Expression Analysis|QPR ProcessAnalyzer Expressions]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Expressions|Introduction to Expression Language]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Objects_in_Expression_Language|QPR ProcessAnalyzer Objects]] ([[QPR_ProcessAnalyzer_Objects_in_Expression_Language#AttributeType|AttributeType]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Case|Case]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Event|Event]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#EventLog|EventLog]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#EventType|EventType]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Flow|Flow]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#FlowOccurrence|FlowOccurrence]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Model|Model]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Project|Project]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#User.2FGroup|User/Group]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Variation|Variation]])&lt;br /&gt;
* [[Generic_Objects_in_Expression_Language|Generic Objects]] ([[Generic_Objects_in_Expression_Language#Array|Array]], [[Generic_Objects_in_Expression_Language#DateTime|DateTime]], [[Generic_Objects_in_Expression_Language#Dictionary|Dictionary]], [[Generic_Objects_in_Expression_Language#String|String]], [[Generic_Objects_in_Expression_Language#TimeSpan|TimeSpan]])&lt;br /&gt;
* [[Generic Properties and Functions in QPR ProcessAnalyzer Expressions|Function and Properties]]&lt;br /&gt;
* [[Machine_Learning_Functions_in_Expression_Language|Machine Learning Functions]]&lt;br /&gt;
* [[Conformance_Checking_in_QPR_ProcessAnalyzer|Conformance Checking using BPMN]]&lt;br /&gt;
* [[Filtering_in_QPR_ProcessAnalyzer_Queries|Filtering Queries]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Datasource|QPR ProcessAnalyzer Queries]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 250px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manage Models and Content ===&lt;br /&gt;
* [[Project Workspace in QPR ProcessAnalyzer Excel Client|Manage Projects and Models]]&lt;br /&gt;
* [[Calculated Attributes in QPR ProcessAnalyzer|Calculated Attributes]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Model JSON Settings|Model Settings]]&lt;br /&gt;
* [[Filtering_in_QPR_ProcessAnalyzer_Excel_Client|Administrate Filters]]&lt;br /&gt;
* [[Manage Users in QPR ProcessAnalyzer Excel Client|Manage Users and Groups]]&lt;br /&gt;
* [[User Roles and Permissions in QPR ProcessAnalyzer|Permissions and Security Roles]]&lt;br /&gt;
* [[Exporting and Importing Models in QPR ProcessAnalyzer|Exporting and Importing Models]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Logs|Logs in QPR ProcessAnalyzer]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 250px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Data Integrations and API&#039;s ===&lt;br /&gt;
* [[Data Tables in QPR ProcessAnalyzer|Manage Data Tables]]&lt;br /&gt;
* [[Manage Scripts in QPR ProcessAnalyzer Excel Client|Scripting Manager]]&lt;br /&gt;
* [[Data Extraction, Transformation, and Loading|Introduction to ETL Scripting]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Scripting Commands|Scripting Commands Reference]]&lt;br /&gt;
* [[QPR ProcessAnalyzer ScriptLauncher| ScriptLauncher]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Process_Mining_Data_from_ODBC_Datasource|Loading Models from ODBC Datasource]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Web Service API|QPR ProcessAnalyzer Web Service API]]&lt;br /&gt;
* [[QPR ProcessAnalyzer ETL Tutorial | ETL Scripting Tutorial]]&lt;br /&gt;
* [[Sample Files for QPR ProcessAnalyzer]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== For Administrators ==&lt;br /&gt;
QPR ProcessAnalyzer installation requires installing the QPR ProcessAnalyzer Server to IIS and two databases. It is recommended to install also QPR UI server to fully utilize the power of QPR ProcessAnalyzer. With QPR UI installed, QPR ProcessAnalyzer can be used via web browser for analyzing process models and analyzer users do not need any additional software installed on their workstations. Developer users need also to have QPR ProcessAnalyzer Excel client installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex;flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 290px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Planning Installation ===&lt;br /&gt;
* [[QPR ProcessAnalyzer System Requirements|System Requirements for QPR ProcessAnalyzer]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Release Notes]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Version_Compatibility|QPR ProcessAnalyzer Version Compatibility]]&lt;br /&gt;
* [[QPR Software Products Architecture|QPR Software Products Architecture]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 290px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Installing ===&lt;br /&gt;
* [[Installing QPR ProcessAnalyzer Server|New Installation for QPR ProcessAnalyzer Server]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Setting_Up_Scripting_Sandbox|Setting Up Scripting Environment]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Updating_QPR_ProcessAnalyzer_Server_to_Newer_Version|Upgrading Existing QPR ProcessAnalyzer Server]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Excel_Client|Installing QPR ProcessAnalyzer Excel Client]]&lt;br /&gt;
* [[Installing_SAP_Connector|Installing SAP Connector]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_ScriptLauncher|Installing QPR ProcessAnalyzer ScriptLauncher]]&lt;br /&gt;
* To install QPR UI, follow the [[QPR_UI_Wiki#Installation and Administration|QPR UI installation documentation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 290px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring ===&lt;br /&gt;
* [[Web.config_file_in_QPR_ProcessAnalyzer|Web.config File Settings]]&lt;br /&gt;
* [[PA_Configuration_database_table_in_QPR_ProcessAnalyzer|PA_Configuration Database Table Settings]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#IIS_Configuration|IIS Configuration]]&lt;br /&gt;
* [[LDAP/AD_Authentication_in_QPR_ProcessAnalyzer_Server|AD/LDAP Authentication]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Model JSON Settings|Model Settings]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Client_Configuration|Client (Excel/ScriptLauncher) Settings]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Agreements ==&lt;br /&gt;
See the [[QPR End User Software License Agreement]] and [[QPR Software as a Service Agreement]].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Wiki&amp;diff=13819</id>
		<title>QPR ProcessAnalyzer Wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Wiki&amp;diff=13819"/>
		<updated>2019-07-15T10:45:29Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Installing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;downloadButton&amp;quot; style=&amp;quot;width:240px;float:right;margin: 3px 12px 0px 15px;&amp;quot;&amp;gt;[[QPR_Product_Downloads|Download&amp;lt;br /&amp;gt;QPR ProcessAnalyzer]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Welcome to QPR ProcessAnalyzer Wiki! QPR ProcessAnalyzer is the tool for turning event and transactional data into visual process intelligence. Read [[Introduction to QPR ProcessAnalyzer]] for an introduction of the software. Topics in this documentation are divided into users roles: process analysts, developers and administrators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;height:5px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== For Process Analysts ==&lt;br /&gt;
QPR ProcessAnalyzer is used via web browser. In QPR ProcessAnalyzer application you can perform various analyses on your process model. If you prefer standalone installation, you can use excel client for analyses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex;flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 270px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Using QPR ProcessAnalyzer ===&lt;br /&gt;
* [[Introduction to QPR ProcessAnalyzer]]&lt;br /&gt;
* [[Process_Mining_Concept|Process Mining Concepts and Terms]]&lt;br /&gt;
* [[QPR ProcessAnalyzer UI|QPR ProcessAnalyzer UI]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Presentation Object (PAPO)|QPR ProcessAnalyzer Dashboards]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Presentation Object Variables|QPR ProcessAnalyzer Variables]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Use Cases|Customer Use Cases]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Certification]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 370px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Process Mining Analyses and Visualizations ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left; width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Case_Analysis (PAPO)|Case Analysis]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_-_ChartView|ChartView]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_-_Clustering_Analysis_View|Clustering Analysis]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_-_Conformance_Analysis_View|Conformance Analysis]]&lt;br /&gt;
* [[Duration_Analysis (PAPO)|Duration Analysis]]&lt;br /&gt;
* [[Event_Analysis (PAPO)|Event Analysis]]&lt;br /&gt;
* [[Event_Type_Analysis (PAPO)|Event Type Analysis]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left; width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Flowchart_Analysis (PAPO)|Flowchart Analysis]]&lt;br /&gt;
* [[Flowchart_Influence_Analysis (PAPO)|Flowchart Influence Analysis]]&lt;br /&gt;
* [[Influence_Analysis_for_Case_Attributes (PAPO)|Influence Analysis for Case Attributes]]&lt;br /&gt;
* [[KPI Analysis (PAPO)|KPI Analysis]]&lt;br /&gt;
* [[Profiling_Case_Analysis (PAPO)|Profiling Case Analysis]]&lt;br /&gt;
* [[Profiling_Event_Analysis (PAPO)|Profiling Event Analysis]]&lt;br /&gt;
* [[Variation_Analysis (PAPO)|Variation Analysis]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 240px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== QPR ProcessAnalyzer Excel Client ===&lt;br /&gt;
* [[Get Started with QPR ProcessAnalyzer Excel Client|Get Started with Excel Client]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Excel Client|Using Excel Client]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Excel_Client|Installing Excel Client]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== For Developers ==&lt;br /&gt;
To create QPR ProcessAnalyzer models, you need to Extract data from source system(s), transform data to a format compatible with QPR ProcessAnalyzer and finally load data as process model(s). To perform these tasks, you can use T-SQL and QPR ProcessAnalyzer scripting commands. When you have created a model, end-users can analyze it easily by using QPR UI’s ProcessAnalyzer application. If needed, there are plenty of tools to customize the end-user experience in QPR UI.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex;flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 370px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Expression Language ===&lt;br /&gt;
* [[QPR ProcessAnalyzer Expression Analysis|QPR ProcessAnalyzer Expressions]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Expressions|Introduction to Expression Language]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Objects_in_Expression_Language|QPR ProcessAnalyzer Objects]] ([[QPR_ProcessAnalyzer_Objects_in_Expression_Language#AttributeType|AttributeType]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Case|Case]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Event|Event]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#EventLog|EventLog]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#EventType|EventType]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Flow|Flow]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#FlowOccurrence|FlowOccurrence]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Model|Model]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Project|Project]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#User.2FGroup|User/Group]], [[QPR_ProcessAnalyzer_Objects_in_Expression_Language#Variation|Variation]])&lt;br /&gt;
* [[Generic_Objects_in_Expression_Language|Generic Objects]] ([[Generic_Objects_in_Expression_Language#Array|Array]], [[Generic_Objects_in_Expression_Language#DateTime|DateTime]], [[Generic_Objects_in_Expression_Language#Dictionary|Dictionary]], [[Generic_Objects_in_Expression_Language#String|String]], [[Generic_Objects_in_Expression_Language#TimeSpan|TimeSpan]])&lt;br /&gt;
* [[Generic Properties and Functions in QPR ProcessAnalyzer Expressions|Function and Properties]]&lt;br /&gt;
* [[Machine_Learning_Functions_in_Expression_Language|Machine Learning Functions]]&lt;br /&gt;
* [[Conformance_Checking_in_QPR_ProcessAnalyzer|Conformance Checking using BPMN]]&lt;br /&gt;
* [[Filtering_in_QPR_ProcessAnalyzer_Queries|Filtering Queries]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Datasource|QPR ProcessAnalyzer Queries]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 250px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manage Models and Content ===&lt;br /&gt;
* [[Project Workspace in QPR ProcessAnalyzer Excel Client|Manage Projects and Models]]&lt;br /&gt;
* [[Calculated Attributes in QPR ProcessAnalyzer|Calculated Attributes]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Model JSON Settings|Model Settings]]&lt;br /&gt;
* [[Filtering_in_QPR_ProcessAnalyzer_Excel_Client|Administrate Filters]]&lt;br /&gt;
* [[Manage Users in QPR ProcessAnalyzer Excel Client|Manage Users and Groups]]&lt;br /&gt;
* [[User Roles and Permissions in QPR ProcessAnalyzer|Permissions and Security Roles]]&lt;br /&gt;
* [[Exporting and Importing Models in QPR ProcessAnalyzer|Exporting and Importing Models]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Logs|Logs in QPR ProcessAnalyzer]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 250px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Data Integrations and API&#039;s ===&lt;br /&gt;
* [[Data Tables in QPR ProcessAnalyzer|Manage Data Tables]]&lt;br /&gt;
* [[Manage Scripts in QPR ProcessAnalyzer Excel Client|Scripting Manager]]&lt;br /&gt;
* [[Data Extraction, Transformation, and Loading|Introduction to ETL Scripting]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Scripting Commands|Scripting Commands Reference]]&lt;br /&gt;
* [[QPR ProcessAnalyzer ScriptLauncher| ScriptLauncher]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Model_JSON_Settings#Loading_Process_Mining_Data_from_ODBC_Datasource|Loading Models from ODBC Datasource]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Web Service API|QPR ProcessAnalyzer Web Service API]]&lt;br /&gt;
* [[QPR ProcessAnalyzer ETL Tutorial | ETL Scripting Tutorial]]&lt;br /&gt;
* [[Sample Files for QPR ProcessAnalyzer]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== For Administrators ==&lt;br /&gt;
QPR ProcessAnalyzer installation requires installing the QPR ProcessAnalyzer Server to IIS and two databases. It is recommended to install also QPR UI server to fully utilize the power of QPR ProcessAnalyzer. With QPR UI installed, QPR ProcessAnalyzer can be used via web browser for analyzing process models and analyzer users do not need any additional software installed on their workstations. Developer users need also to have QPR ProcessAnalyzer Excel client installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex;flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 290px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Planning Installation ===&lt;br /&gt;
* [[QPR ProcessAnalyzer System Requirements|System Requirements for QPR ProcessAnalyzer]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Release Notes]]&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Version_Compatibility|QPR ProcessAnalyzer Version Compatibility]]&lt;br /&gt;
* [[QPR Software Products Architecture|QPR Software Products Architecture]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 290px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Installing ===&lt;br /&gt;
* [[Installing QPR ProcessAnalyzer Server|New Installation for QPR ProcessAnalyzer Server]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Setting_Up_Scripting_Sandbox|Setting Up Scripting Environment]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Updating_QPR_ProcessAnalyzer_Server_to_Newer_Version|Upgrading Existing QPR ProcessAnalyzer Server]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Excel_Client|Installing QPR ProcessAnalyzer Excel Client]]&lt;br /&gt;
* [[Installing_SAP_Connector|Installing SAP Connector]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_ScriptLauncher|Installing QPR ProcessAnalyzer ScriptLauncher]]&lt;br /&gt;
* To install QPR UI, follow the [[QPR_UI_Wiki#Installation and Administration|QPR UI installation documentation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex: 1 0 290px;border:1px solid #dfdfdf;padding:0 1em 1em 1.5em;background-color:#F7FAFC;margin:10px 0px 0px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring ===&lt;br /&gt;
* [[Web.config_file_in_QPR_ProcessAnalyzer|Web.config File Settings]]&lt;br /&gt;
* [[PA_Configuration_database_table_in_QPR_ProcessAnalyzer|PA_Configuration Database Table Settings]]&lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#IIS_Configuration|IIS Configuration]]&lt;br /&gt;
* [[LDAP/AD_Authentication_in_QPR_ProcessAnalyzer_Server|AD/LDAP Authentication]]&lt;br /&gt;
* [[QPR ProcessAnalyzer Model JSON Settings|Model Settings]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Agreements ==&lt;br /&gt;
See the [[QPR End User Software License Agreement]] and [[QPR Software as a Service Agreement]].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13229</id>
		<title>QPR ProcessAnalyzer System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_System_Requirements&amp;diff=13229"/>
		<updated>2019-04-11T07:15:10Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Recommended Hardware for QPR ProcessAnalyzer Pro Database Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Excel Client ==&lt;br /&gt;
System requirements for QPR ProcessAnalyzer Excel Client:&lt;br /&gt;
* Microsoft Windows 7, Windows 8.1 or Windows 10 operating system (64 bit version)&lt;br /&gt;
** Mac users need to use Windows in a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop], [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Microsoft Office 2010, 2013, 2016 (32 bit and 64 bit versions) or 2019.&lt;br /&gt;
* Internet connection for connecting to QPR ProcessAnalyzer Service&lt;br /&gt;
&lt;br /&gt;
The following components are also required and they will be installed if not found on your computer:&lt;br /&gt;
* Microsoft .NET Framework 4.6.1&lt;br /&gt;
* Microsoft Visual Studio Tools for Office Runtime&lt;br /&gt;
&lt;br /&gt;
Additional requirement for using [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command: [[Installing QPR ProcessAnalyzer Excel Client#Installing_SAP_Connector_for_Microsoft_.NET_Version_3.0_Dll_Files|install the SAP Connector for Microsoft .NET Dll files]].&lt;br /&gt;
&lt;br /&gt;
== Additional System Requirements for QPR ProcessAnalyzer Xpress ==&lt;br /&gt;
In addition to the requirements for QPR ProcessAnalyzer Excel Client, there are the following additional requirements for QPR ProcessAnalyzer Xpress:&lt;br /&gt;
* 64-bit Microsoft Windows 7, Windows 8.1 or Windows 10 operating system&lt;br /&gt;
* SQL Server LocalDB 2016 database&lt;br /&gt;
* Internet connection in order to [[Activating QPR ProcessAnalyzer|activate]] the product&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer Server ==&lt;br /&gt;
QPR ProcessAnalyzer Server is needed for QPR ProcessAnalyzer Pro. System requirements for QPR ProcessAnalyzer Server:&lt;br /&gt;
* Microsoft Windows Server 2008 R2, 2012 or 2016 operating system&lt;br /&gt;
* Microsoft SQL Server 2012, 2014, 2016 or 2017 database with Database Engine Services installed&lt;br /&gt;
* Sufficiently powerful enough hardware to run the operating system&lt;br /&gt;
* &#039;&#039;&#039;Microsoft .NET Framework 4.6.1&#039;&#039;&#039; is installed &lt;br /&gt;
* [[Installing_QPR_ProcessAnalyzer_Server#Install_Server_Roles_and_Features_for_Microsoft_Internet_Information_Services_(IIS) | Install Server Roles and Features for Microsoft Internet Information Services (IIS)]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements for QPR ProcessAnalyzer ScriptLauncher ==&lt;br /&gt;
* Microsoft Windows 7, Windows 8.1, Windows 10 or Windows Server 2012 R2 operating system. Mac users need to use Windows as a pure virtual machine, created on e.g. [http://www.parallels.com/products/desktop/ Parallels Desktop] or [http://www.vmware.com/products/fusion/overview.html VMware Fusion], or as a virtualized Boot Camp partition created by either one.&lt;br /&gt;
* Internet connection &lt;br /&gt;
* The sapnco.dll and sapnco_utils.dll files distributed in the [http://service.sap.com/connectors SAP Connector for Microsoft .NET Version 3.0 (requires SAP Service Marketplace credentials)] package are needed in order to use the [[Data_Extraction,_Transformation,_and_Loading#--.23ImportSapQuery|ImportSapQuery]] script command. See the [[Installing QPR ProcessAnalyzer Excel Client#Installing_QPR_ProcessAnalyzer_ScriptLauncher|instructions]] for installing them.&lt;br /&gt;
* Microsoft .NET Framework 4.6.1 or newer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Server ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Small&#039;&#039;&#039; datasets (up to 5 million events per model) with simultaneous users&lt;br /&gt;
** 32GB memory&lt;br /&gt;
** 4 processor cores&lt;br /&gt;
** 50GB disk &lt;br /&gt;
* &#039;&#039;&#039;Medium&#039;&#039;&#039; datasets (5-10 million events per model) with simultaneous users&lt;br /&gt;
** 64GB memory&lt;br /&gt;
** 8 processor cores&lt;br /&gt;
** 100GB disk &lt;br /&gt;
* &#039;&#039;&#039;Large&#039;&#039;&#039; datasets (10-50 million events per model) with simultaneous users&lt;br /&gt;
** 256GB memory&lt;br /&gt;
** 16 processor cores&lt;br /&gt;
** 150GB disk &lt;br /&gt;
* &#039;&#039;&#039;Very large&#039;&#039;&#039; datasets (more than 50 million events per model) with simultaneous users&lt;br /&gt;
** 512GB memory&lt;br /&gt;
** 32 processor cores&lt;br /&gt;
** 200GB disk&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Pro Database Server ==&lt;br /&gt;
Recommended hardware configuration for the server computer running Microsoft SQL Server database:&lt;br /&gt;
* 16GB memory&lt;br /&gt;
* 4 processor cores&lt;br /&gt;
* 300GB - 1TB available SSD disk for SQL Server temp database&lt;br /&gt;
* 500GB - 10TB available SSD disk for data storage on a disk dedicated to QPR ProcessAnalyzer&lt;br /&gt;
&lt;br /&gt;
== Recommended Hardware for QPR ProcessAnalyzer Xpress Excel Client==&lt;br /&gt;
* 8GB memory&lt;br /&gt;
* 4 core processor&lt;br /&gt;
* 32GB disk&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR ProcessAnalyzer]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Filtering_in_QPR_ProcessAnalyzer_Queries&amp;diff=13228</id>
		<title>Filtering in QPR ProcessAnalyzer Queries</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Filtering_in_QPR_ProcessAnalyzer_Queries&amp;diff=13228"/>
		<updated>2019-04-11T07:13:29Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer analyses can be &#039;&#039;filtered&#039;&#039; enabling to include only defined data to the analysis calculation. QPR ProcessAnalyzer analysis requests have parameter &#039;&#039;&#039;Filter&#039;&#039;&#039; which is used to pass a JSON formatted filter definition for the analysis. This filter definition is combined with the &#039;&#039;stored filter object&#039;&#039;, which is provided as the &#039;&#039;&#039;FilterId&#039;&#039;&#039; parameter. Influence analyses have also parameter &#039;&#039;&#039;Comparison&#039;&#039;&#039; which divides the analyzed data into two parts to compare them in the analysis. Comparison parameter has the same JSON syntax as in the Filter parameter.&lt;br /&gt;
&lt;br /&gt;
When performing analyses, different filter specifications are applied in the following order (from first to last):&lt;br /&gt;
# Filter rules defined by a stored filter (the &#039;&#039;&#039;FilterId&#039;&#039;&#039; parameter) (this is mandatory as it also defines the model to use)&lt;br /&gt;
# Filter rules defined in the &#039;&#039;&#039;Filter&#039;&#039;&#039; parameter&lt;br /&gt;
# Other filtering related parameters, such as &#039;&#039;&#039;SelectedActivities&#039;&#039;&#039; or &#039;&#039;&#039;SelectedTransitions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Filter parameter JSON syntax ==&lt;br /&gt;
The filter definition has syntax demonstrated by the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Items: [&lt;br /&gt;
    {&lt;br /&gt;
      Type: &amp;quot;IncludeCases&amp;quot;,&lt;br /&gt;
      Items: [&lt;br /&gt;
        {&lt;br /&gt;
          Type: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
          Values: [&amp;quot;Sales Order Created&amp;quot;, &amp;quot;Payment Received&amp;quot;]&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          Type: &amp;quot;CaseAttributeValue&amp;quot;,&lt;br /&gt;
          Attribute: &amp;quot;Region&amp;quot;,&lt;br /&gt;
          Values: [&amp;quot;Dallas&amp;quot;, &amp;quot;Austin&amp;quot;]&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      Type: &amp;quot;ExcludeCases&amp;quot;,&lt;br /&gt;
      Items: [&lt;br /&gt;
        {&lt;br /&gt;
          Type: &amp;quot;Case&amp;quot;,&lt;br /&gt;
          Values: [&amp;quot;Case1&amp;quot;, &amp;quot;Case2&amp;quot;, &amp;quot;Case3&amp;quot;]&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          Type: &amp;quot;flow&amp;quot;,&lt;br /&gt;
          Values: [&lt;br /&gt;
            {&lt;br /&gt;
              From: &amp;quot;Shipment&amp;quot;,&lt;br /&gt;
              To: &amp;quot;Invoice&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outmost JSON object has a property &#039;&#039;&#039;Items&#039;&#039;&#039; which is an array of object with following properties:&lt;br /&gt;
* &#039;&#039;&#039;Type&#039;&#039;&#039;: Specifies the type of the filtering operation with following options:&lt;br /&gt;
** &#039;&#039;&#039;IncludeCases&#039;&#039;&#039;: Include only cases. All filter rule types can be used with this option.&lt;br /&gt;
** &#039;&#039;&#039;ExcludeCases&#039;&#039;&#039;: Exclude cases. All filter rule types can be used with this option.&lt;br /&gt;
** &#039;&#039;&#039;IncludeEventTypes&#039;&#039;&#039;: Include only event types. Only [[Filtering_in_QPR_ProcessAnalyzer_Queries#Event_ type|Event type]] and [[Filtering_in_QPR_ProcessAnalyzer_Queries#Expression|Expression]] filter rule types can be used with this option.&lt;br /&gt;
** &#039;&#039;&#039;ExcludeEventTypes&#039;&#039;&#039;: Exclude event types. Only [[Filtering_in_QPR_ProcessAnalyzer_Queries#Event_type|Event type]] and [[Filtering_in_QPR_ProcessAnalyzer_Queries#Expression|Expression]] filter rule types can be used with this option.&lt;br /&gt;
** &#039;&#039;&#039;IncludeCaseAttributes&#039;&#039;&#039;: Include only given case attributes.&lt;br /&gt;
** &#039;&#039;&#039;ExcludeCaseAttributes&#039;&#039;&#039;: Exclude given case attributes.&lt;br /&gt;
** &#039;&#039;&#039;IncludeEventAttributes&#039;&#039;&#039;: Include only given event attributes.&lt;br /&gt;
** &#039;&#039;&#039;ExcludeEventAttributes&#039;&#039;&#039;: Exclude given event attributes.&lt;br /&gt;
** &#039;&#039;&#039;Union&#039;&#039;&#039;: Select objects that belong to union of all the given child selections.&lt;br /&gt;
** &#039;&#039;&#039;Intersection&#039;&#039;&#039;: Select objects that belong to intersection of all the given child selections.&lt;br /&gt;
** &#039;&#039;&#039;Negate&#039;&#039;&#039;: Negate the filtered objects of given type.&lt;br /&gt;
** &#039;&#039;&#039;ClearFilters&#039;&#039;&#039;: Clear filter for given type of objects.&lt;br /&gt;
* &#039;&#039;&#039;Items&#039;&#039;&#039;: Specifies selected model objects. It is used when the Type is &#039;&#039;&#039;IncludeCases&#039;&#039;&#039;, &#039;&#039;&#039;ExcludeCases&#039;&#039;&#039;, &#039;&#039;&#039;IncludeEventTypes&#039;&#039;&#039; or &#039;&#039;&#039;ExcludeEventTypes&#039;&#039;&#039;. The following chapter define all possibilities that can be used here.&lt;br /&gt;
* &#039;&#039;&#039;ChildItems&#039;&#039;&#039;: Specifies the selections to be combined using a set operation. Applicable only when the Type is &#039;&#039;&#039;Union&#039;&#039;&#039; or &#039;&#039;&#039;Intersection&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Attributes&#039;&#039;&#039;: Specifies an array of attribute names. Applicable when the Type is &#039;&#039;&#039;IncludeCaseAttributes&#039;&#039;&#039;, &#039;&#039;&#039;ExcludeCaseAttributes&#039;&#039;&#039;, &#039;&#039;&#039;IncludeEventAttributes&#039;&#039;&#039; or &#039;&#039;&#039;IncludeEventAttributes&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;TargetObjectType&#039;&#039;&#039;: Specifies the type of objects the operation is targeted to. Supported values are &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Case&#039;&#039;&#039;. It is applicable when the Type is &#039;&#039;&#039;ClearFilters&#039;&#039;&#039; or &#039;&#039;&#039;Negate&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The following chapters list all filter rule types that can be used in the above defined &#039;&#039;&#039;Items&#039;&#039;&#039; property.&lt;br /&gt;
&lt;br /&gt;
== Filter Rule Types ==&lt;br /&gt;
=== Expression ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;ExpressionValue&#039;&#039;&#039; selects cases or event types that match the given expression. It has property &#039;&#039;&#039;Configuration&#039;&#039;&#039; which contains the following properties:&lt;br /&gt;
* &#039;&#039;&#039;Root&#039;&#039;&#039;: Specifies the root expression to return QPR ProcessAnalyzer objects that are used to evaluate the &#039;&#039;Expressions&#039;&#039; (see below). If not defined, all the cases in the current event log are used as root objects. Allowed object types for the root expression for the Cases filter are &#039;&#039;&#039;Case&#039;&#039;&#039;, &#039;&#039;&#039;Event&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039;, &#039;&#039;&#039;Flow&#039;&#039;&#039;, &#039;&#039;&#039;FlowOccurrence&#039;&#039;&#039; and &#039;&#039;&#039;Variation&#039;&#039;&#039;. For the EventTypes filter, only EventsType objects are valid.&lt;br /&gt;
* &#039;&#039;&#039;Expressions&#039;&#039;&#039;: An array of expressions specifying the filter rules. The is an AND logic between the filter rules, so all expressions need to match for the objects to come to the filter. In the CAses filter, the resulting matched objects are converted to Cases to get the actual filtered Cases. If not defined, all the objects returned from the &#039;&#039;Root expression&#039;&#039; will be selected to the filter. Properties:&lt;br /&gt;
** &#039;&#039;&#039;Expression&#039;&#039;&#039;: Expression that is evaluated for the root objects.&lt;br /&gt;
** &#039;&#039;&#039;Values&#039;&#039;&#039;: An array of values to match to the expression result.&lt;br /&gt;
* &#039;&#039;&#039;Variables&#039;&#039;&#039;: An object specifying key-value pairs, where each key-value pair generates one variable into the expression language where key is the name of the variable and value is its value. The values will be converted to strings.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;ExpressionValue&amp;quot;,&lt;br /&gt;
  Configuration: {&lt;br /&gt;
    Root: &amp;quot;Cases&amp;quot;,&lt;br /&gt;
    Expressions: [&lt;br /&gt;
      {&lt;br /&gt;
        Expression: &amp;quot;Name&amp;quot;,&lt;br /&gt;
        Values: [&amp;quot;case1&amp;quot;, &amp;quot;case2&amp;quot;]&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Select cases named &amp;quot;case1&amp;quot; and &amp;quot;case2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;ExpressionValue&amp;quot;,&lt;br /&gt;
  Configuration: {&lt;br /&gt;
    Root: &amp;quot;Cases.Where(Duration.TotalDays &amp;gt; 1)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
Selects cases whose duration is longer than one day.&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;ExpressionValue&amp;quot;,&lt;br /&gt;
  Configuration: {&lt;br /&gt;
    Variables: {&lt;br /&gt;
      bpmnXml: &amp;quot;&amp;lt;XML BPMN model&amp;gt;&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    Root: &amp;quot;Let(\&amp;quot;myConformanceModel\&amp;quot;, ConformanceModelFromXml(bpmnXml));Cases.Where(IsConformant(myConformanceModel));&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Returns all cases that are conformant with the specified BPNM model.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case names ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;Case&#039;&#039;&#039; selects individual cases. It supports property &#039;&#039;&#039;Values&#039;&#039;&#039; which is an array of case names (strings).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;Case&amp;quot;,&lt;br /&gt;
  Values: [&amp;quot;case1&amp;quot;, &amp;quot;case2&amp;quot;, &amp;quot;case3&amp;quot;]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same example in the whole JSON configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Items: [&lt;br /&gt;
    {&lt;br /&gt;
      Type: &amp;quot;IncludeCases&amp;quot;,&lt;br /&gt;
      Items: [&lt;br /&gt;
        {&lt;br /&gt;
          Type: &amp;quot;Case&amp;quot;,&lt;br /&gt;
          Values: [&amp;quot;case1&amp;quot;, &amp;quot;case2&amp;quot;, &amp;quot;case3&amp;quot;]&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case attribute values ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;CaseAttributeValue&#039;&#039;&#039; selects cases having given value in given case attribute. Properties: &lt;br /&gt;
* &#039;&#039;&#039;Attribute&#039;&#039;&#039;: Case attribute name.&lt;br /&gt;
* &#039;&#039;&#039;Values&#039;&#039;&#039;: Array of case attribute values in string format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;CaseAttributeValue&amp;quot;,&lt;br /&gt;
  Attribute: &amp;quot;Region&amp;quot;,&lt;br /&gt;
  Values: [&amp;quot;Dallas&amp;quot;, &amp;quot;Austin&amp;quot;, &amp;quot;New York&amp;quot;]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Event attribute values ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;EventAttributeValue&#039;&#039;&#039; selects cases having events with given event attribute values. Properties: &lt;br /&gt;
* &#039;&#039;&#039;Attribute&#039;&#039;&#039;: Name of the event attribute.&lt;br /&gt;
* &#039;&#039;&#039;Values&#039;&#039;&#039;: An array of event attribute values in string format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;EventAttributeValue&amp;quot;,&lt;br /&gt;
  Attribute: &amp;quot;Organization&amp;quot;,&lt;br /&gt;
  Values: [&amp;quot;Organization 1&amp;quot;, &amp;quot;Organization 2&amp;quot;]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Event type ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;EventType&#039;&#039;&#039; selects cases containing selected event types (Type=IncludeCases/ExcludeCases) or selects event types (Type=IncludeEventTypes/ExcludeEventTypes). It has property &#039;&#039;&#039;Values&#039;&#039;&#039; which is an array of event type names.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  Values: [&amp;quot;Sales Order Created&amp;quot;, &amp;quot;Payment Received&amp;quot;, &amp;quot;Delivery Sent&amp;quot;]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variation ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;Variation&#039;&#039;&#039; selects cases belonging to selected variations. It has the property &#039;&#039;&#039;Paths&#039;&#039;&#039; which is an array of variations. Each variation is a string array of event type names in the variation.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;Variation&amp;quot;,&lt;br /&gt;
  Paths: [&lt;br /&gt;
    [&amp;quot;Activity 1&amp;quot;, &amp;quot;Activity 2&amp;quot;, &amp;quot;Activity 3&amp;quot;],&lt;br /&gt;
    [&amp;quot;Activity 3&amp;quot;],&lt;br /&gt;
    [&amp;quot;Activity 2&amp;quot;, &amp;quot;Activity 4&amp;quot;]&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flow ===&lt;br /&gt;
Filter rule type &#039;&#039;&#039;Flow&#039;&#039;&#039; selects cases having the defined flows. It has property &#039;&#039;&#039;Flows&#039;&#039;&#039; which selects an array of objects with following properties:&lt;br /&gt;
* &#039;&#039;&#039;From&#039;&#039;&#039;: Event type name which starts the flow.&lt;br /&gt;
* &#039;&#039;&#039;To&#039;&#039;&#039;: Event type name into which the flow goes.&lt;br /&gt;
* &#039;&#039;&#039;Occurrence&#039;&#039;&#039;: Zero-based occurrence index of the selected flow within its case. If not specified, represents all occurrences. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Type: &amp;quot;Flow&amp;quot;,&lt;br /&gt;
  Flows: [ {From: &amp;quot;EventType1&amp;quot;, To: &amp;quot;EventType2&amp;quot;, &amp;quot;Occurrence&amp;quot;: 1} ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Legacy Filter Rules in QPR ProcessAnalyzer Queries]] ==&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  Items: [&lt;br /&gt;
    {&lt;br /&gt;
      Type: &amp;quot;Union&amp;quot;,&lt;br /&gt;
      ChildItems: [&lt;br /&gt;
        {&lt;br /&gt;
          Items: [&lt;br /&gt;
            {&lt;br /&gt;
              Type: &amp;quot;IncludeCases&amp;quot;,&lt;br /&gt;
              Items: [&lt;br /&gt;
                {&lt;br /&gt;
                  Type: &amp;quot;Case&amp;quot;,&lt;br /&gt;
                  Values: [&amp;quot;c1&amp;quot;, &amp;quot;c3&amp;quot;]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          Items: [&lt;br /&gt;
            {&lt;br /&gt;
              Type: &amp;quot;IncludeCases&amp;quot;,&lt;br /&gt;
              Items: [&lt;br /&gt;
                {&lt;br /&gt;
                  Type: &amp;quot;Case&amp;quot;,&lt;br /&gt;
                  Values: [&amp;quot;c1&amp;quot;]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
              Type: &amp;quot;Negate&amp;quot;,&lt;br /&gt;
              TargetObjectType: &amp;quot;Case&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=12915</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=12915"/>
		<updated>2019-03-07T13:30:45Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* ODBC Driver Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Memory Usage Settings ==&lt;br /&gt;
The memory usage settings are used to manage, how long objects are kept in the memory, which affect both the memory usage and performance. The longer the object storing durations, the more memory is consumed, but on the other hand users perceive better performance as analyses are more likely to be found in the memory already calculated. Memory usage settings can be defined in the [[Web.config_file_in_QPR_ProcessAnalyzer#Qpr.ProcessAnalyzer.Common.Properties.Settings_Section|web.config]] file and for each model separately in the model settings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
CacheUsage/&lt;br /&gt;
DropUnusedModelsAfter&lt;br /&gt;
||&lt;br /&gt;
Duration after which the unused model, is dropped from the memory. Defined in format &#039;&#039;HH:mm:ss&#039;&#039; or &#039;&#039;d.HH:mm:ss&#039;&#039;, for example 01:00:00 (one hour), 00:30:00 (30 minutes) or 1.00:00:00 (24 hours). When an analysis is requested for a model, the model&#039;s last used time is updated (also filter&#039;s last used time is updated).&lt;br /&gt;
&lt;br /&gt;
If this setting is not defined, the server level [[Web.config_file_in_QPR_ProcessAnalyzer#Qpr.ProcessAnalyzer.Common.Properties.Settings_Section|default setting]] is used.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
CacheUsage/&lt;br /&gt;
DropUnusedFiltersAfter&lt;br /&gt;
||&lt;br /&gt;
Duration after which the model&#039;s unused filters, are dropped from the memory. Defined in format &#039;&#039;HH:mm:ss&#039;&#039; or &#039;&#039;d.HH:mm:ss&#039;&#039;, for example 01:00:00 (one hour), 00:30:00 (30 minutes) or 1.00:00:00 (24 hours). When an analysis is requested for a filter , the filter&#039;s last used time is updated (also model&#039;s last used time is updated).&lt;br /&gt;
&lt;br /&gt;
If this setting is not defined, the server level [[Web.config_file_in_QPR_ProcessAnalyzer#Qpr.ProcessAnalyzer.Common.Properties.Settings_Section|default setting]] is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Configuration Examples===&lt;br /&gt;
The following configuration keeps the model in memory for 1 hour and filters for 30 minutes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;CacheUsage&amp;quot;: {&lt;br /&gt;
    &amp;quot;DropUnusedModelsAfter&amp;quot;: &amp;quot;1:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;DropUnusedFiltersAfter&amp;quot;: &amp;quot;00:30:00&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configuration keeps the model in memory for 15 minutes and filters for 5 minutes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;CacheUsage&amp;quot;: {&lt;br /&gt;
    &amp;quot;DropUnusedModelsAfter&amp;quot;: &amp;quot;0:15:00&amp;quot;,&lt;br /&gt;
    &amp;quot;DropUnusedFiltersAfter&amp;quot;: &amp;quot;00:05:00&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following configuration keeps the model in memory for 100 days (practically it&#039;s never dropped) and filters for 2 hours.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;CacheUsage&amp;quot;: {&lt;br /&gt;
    &amp;quot;DropUnusedModelsAfter&amp;quot;: &amp;quot;100.00:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;DropUnusedFiltersAfter&amp;quot;: &amp;quot;02:00:00&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Memory Objects Summary===&lt;br /&gt;
Data handled by QPR ProcessAnalyzer memory is stored in following types of objects:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Stored&amp;amp;nbsp;Objects&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Unused objects dropped after&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Time to reload/calculate&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Memory&amp;amp;nbsp;consumption&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||Models&lt;br /&gt;
||Models objects contain all data in a QPR ProcessAnalyzer model, such as&lt;br /&gt;
* cases&lt;br /&gt;
* events&lt;br /&gt;
* variations&lt;br /&gt;
* event types&lt;br /&gt;
* flows&lt;br /&gt;
* flow occurrences&lt;br /&gt;
||Primarily defined by a model setting &#039;&#039;CacheUsage/DropUnusedModelsAfter&#039;&#039;. If the model setting is not defined, the server level setting in the web.config file is used. If the server setting is not defined either, a default value of 1 hour is used. When the is a memory shortage in the server, models are not dropped from the memory.&lt;br /&gt;
||&#039;&#039;&#039;Slow&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Models are loaded from the database requiring to transfer considerable amount of data, which takes much more time than e.g. calculating filters and analyses.&lt;br /&gt;
||&#039;&#039;&#039;High&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||Filters&lt;br /&gt;
||Filters contain all filtered data in QPR ProcessAnalyzer model, which includes similar data and structures as the models.&lt;br /&gt;
||Primarily defined by a model setting. If the model setting is not defined, the server setting is used. If the server setting is not defined, a default value of 30 minutes is used. When the is a memory shortage in the server, filters may be dropped from the memory to free memory.&lt;br /&gt;
||&#039;&#039;&#039;Fast&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Filters are calculated from the model data that already exists in the memory. Practically, filters are subsets of models.&lt;br /&gt;
||&#039;&#039;&#039;Medium&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||Analysis&amp;amp;nbsp;results&lt;br /&gt;
||Results of the analysis (in tabular form).&lt;br /&gt;
||Unused analysis results are kept maximum of 15 minutes in the memory. When the is a memory shortage in the server, analysis results may be dropped from the memory to free memory.&lt;br /&gt;
||&#039;&#039;&#039;Fast&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Analysis results are calculated from filters, which already exist in memory.&lt;br /&gt;
||&#039;&#039;&#039;Low&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the QPR ProcessAnalyzer server doesn&#039;t have enough memory to store more objects, already stored objects are dropped from the memory starting from the one having the longest time from the last usage. Thus, when there is a short of memory, objects may be dropped earlier than their settings define. Only filters and analysis results are dropped during the memory shortage, i.e. model objects are not dropped prematurely. This is because recalculating filters and analysis results is usually faster than loading models from the database. That&#039;s why, when trying to load more models than there is available memory in the server, an out of memory error situation may occur.&lt;br /&gt;
&lt;br /&gt;
== Model Automatic Loading on Server Startup ==&lt;br /&gt;
QPR ProcessAnalyzer models can be loaded automatically, when QPR ProcessAnalyzer Server starts. When the model loading takes long time, it&#039;s useful to load it automatically beforehand. In the model JSON settings, when the &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; property is set to &#039;&#039;true&#039;&#039;, the model is loaded automatically during QPR ProcessAnalyzer Server startup. The JSON configuration is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true,&lt;br /&gt;
  &amp;quot;CacheUsage&amp;quot;: {&lt;br /&gt;
    &amp;quot;DropUnusedModelsAfter&amp;quot;: &amp;quot;100.00:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;DropUnusedFiltersAfter&amp;quot;: &amp;quot;00:30:00&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: For models that are set to load automatically on server startup, you also need to set the &#039;&#039;CacheUsage/DropUnusedModelsAfter&#039;&#039; setting is large value (as shown by the previous example), so that the model is not dropped from memory even if it&#039;s not used.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;LoadOnStartup&#039;&#039; setting to work, [[Installing_QPR_ProcessAnalyzer_Server#IIS_Configuration|IIS configurations]] related to QPR ProcessAnalyzer Server installation needs to be in place.&lt;br /&gt;
&lt;br /&gt;
== Loading Process Mining Data from ODBC Datasource ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Cases/Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||DataSource/Events/Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Configurations examples ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
If 32-bit office is installed in machine then 64-bit ODBC driver need install using /passive parameter.&lt;br /&gt;
More information &lt;br /&gt;
* ht tps://stackoverflow.com/questions/7116019/hand-install-of-64-bit-ms-access-odbc-drivers-when-32-bit-office-is-present &lt;br /&gt;
* ht tps://techblog.aimms.com/2014/10/27/installing-32-bit-and-64-bit-microsoft-access-drivers-next-to-each-other/&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
Recommended driver: https://www.microsoft.com/en-us/download/details.aspx?id=56567&lt;br /&gt;
&lt;br /&gt;
In this example, data is loaded from an SQL Server table. SQL Server hostname is &#039;&#039;myServerName&#039;&#039;, instance name is &#039;&#039;myInstanceName&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;. The &#039;&#039;Trusted_Connection&#039;&#039; is for Windows authentication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={ODBC Driver 17 for SQL Server};Server=myServerName\myInstanceName;DataBase=MyDatabase;Trusted_Connection=Yes;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={ODBC Driver 17 for SQL Server};Server=myServerName\myInstanceName;DataBase=MyDatabase;Trusted_Connection=Yes;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENTS_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If SQL Server authentication is used, the connection string is &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Driver={ODBC Driver 17 for SQL Server};Server=myServerName\myInstanceName;DataBase=MyDatabase;Trusted_Connection=No;Uid=myUsername;PWD=myPassword;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More about SQL Server connection strings: https://www.connectionstrings.com/sql-server/&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
The following error message may be encountered: &#039;&#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039;&#039;. Probable reason is that the ODBC driver is missing or driver name is not correct. To solve the issue:&lt;br /&gt;
* Check ODBC drivers is installed by running &#039;&#039;&#039;C:\Windows\System32\odbcad32.exe&#039;&#039;&#039;.&lt;br /&gt;
* Check the connection string.&lt;br /&gt;
&lt;br /&gt;
The following error message may be encountered: &#039;&#039;&#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&#039;&#039;.&lt;br /&gt;
Example error when specified directory is missing:&lt;br /&gt;
&lt;br /&gt;
Error when CSV file is missing: &#039;&#039;&#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting: [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Permissions/Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Permissions/Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||Permissions/EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
Case level permissions (security control) can be implemented with the principle illustrated in the image below. &#039;&#039;Users&#039;&#039; already belong to certain &#039;&#039;groups&#039;&#039; in the user management, and &#039;&#039;cases&#039;&#039; have certain &#039;&#039;case attribute values&#039;&#039; which is part of the loaded process mining data. Additionally, the linkage between case attribute values (of a certain case attribute) and groups needs to be defined when this security feature is configured. The image below illustrates the chain between &#039;&#039;users&#039;&#039; and &#039;&#039;cases&#039;&#039;, how certain users are able to see certain cases when viewing analyses from a QPR ProcessAnalyzer model.&lt;br /&gt;
&lt;br /&gt;
[[File:CasePermissions.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Example: There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Release_Notes&amp;diff=12651</id>
		<title>QPR ProcessAnalyzer Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Release_Notes&amp;diff=12651"/>
		<updated>2019-02-14T09:22:18Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Additional Release for QPR ProcessAnalyzer 2019.1 (release date 2019-01-23) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains new features and fixed issues for each QPR ProcessAnalyzer release. For information on the compatibility of different versions, see [[QPR ProcessAnalyzer Version Compatibility|Version Compatibility Information]]. See also [[Planned Releases for QPR ProcessAnalyzer and QPR UI|next planned releases]].&lt;br /&gt;
&lt;br /&gt;
== Next Release: QPR ProcessAnalyzer 2019.2 (release date 2019-02-14) ==&lt;br /&gt;
Build number: 2019.2.0.38539, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;:&lt;br /&gt;
* Support for [[QPR_ProcessAnalyzer_System_Requirements#System_Requirements_for_QPR_ProcessAnalyzer_Excel_Client| Microsoft Office 2019]] for QPR ProcessAnalyzer Excel Client.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307423: Improved memory management: unused objects are automatically dropped from the memory. Settings can be configured in [[Web.config_file_in_QPR_ProcessAnalyzer#Qpr.ProcessAnalyzer.Common.Properties.Settings_Section | web.config]] or from the [[QPR_ProcessAnalyzer_Model_JSON_Settings#Memory_Usage_Settings | model JSON settings]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218838: KPI analysis: Event Occurrence Time isn&#039;t calculated properly, e.g. Period=Month fails.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218880: PAPO: odbc case and event attributes are not shown in dropdown menu.&lt;br /&gt;
* 218877: Support material - Project admins are not able to create new users.&lt;br /&gt;
* 218898: Importing XES file with xmlns -definition fails.&lt;br /&gt;
* 218893: Model status shows incorrectly &amp;quot;offline&amp;quot; when Model event log is in memory and Model information not.&lt;br /&gt;
* 218917: BaseContext.EvaluateChildExpression with given root object iterates the root object if it is an array.&lt;br /&gt;
&lt;br /&gt;
== Additional Release for QPR ProcessAnalyzer 2019.1 (release date 2019-01-23) ==&lt;br /&gt;
Build number: 2019.1.0.38400, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 307357: PA model management: Analysis requests canceling. All operations have new parameters QueryIdentifier and CancelEarlierQueriesWithIdentifier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218806: Variation filter doesn&#039;t filter correctly.&lt;br /&gt;
* 218802: It should not be able to load deleted models into memory.&lt;br /&gt;
* 218866: Case Analysis shows &amp;quot;0&amp;quot; for textual Case Attribute (SelectedActivityCounts=0 column count and data not match).&lt;br /&gt;
* 218862: Case Analysis returns incorrect Start and End times when start or end transition is selected.&lt;br /&gt;
* 218847: Variation Analysis Include Only Cases Filter Fails when using Event Counts and filter.&lt;br /&gt;
* 218765: Event Occurrence Time calculation for KPI analysis (Server side).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2019.1 (release date 2019-01-03) ==&lt;br /&gt;
Build number: 2019.1.0.38310, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;:&lt;br /&gt;
* There are new training videos available for QPR ProcessAnalyzer in QPR Community. QPR ProcessAnalyzer users can access the videos by clicking Training Videos in the header menu of QPR ProcessAnalyzer UI.&lt;br /&gt;
* ChartView can show several measures at the same time. In table, measures are in different columns, and in chart, measures are presented as different series.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218768: Number of decimals is not updated in KPI analysis due to HistoryId context variable.&lt;br /&gt;
* 218787: Datagrid export fails with numerical values.&lt;br /&gt;
* 218757: KPI analysis - null value shown as NaN.0 in table.&lt;br /&gt;
* 218794: Popup menu is replicated when PAPO is drawn multiple times.&lt;br /&gt;
* 218740: Case Analysis Year period should not show thousand separator.&lt;br /&gt;
* 218805: Analysis not shown after adding duration analysis to panel using view designer &amp;quot;shortcuts buttons&amp;quot;.&lt;br /&gt;
* 218804: PAPO showing only Analysis Window doesn&#039;t show anything when other PAPO hides the Analysis window.&lt;br /&gt;
* 218815: Flowchart influence analysis does not always show the results in an identical way.&lt;br /&gt;
* 218791: Flowcharts visibility stepper don&#039;t work in PA deployment package Process benchmarking view.&lt;br /&gt;
* 218844: KPI Analysis sorting is not saved to the context variable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218755: If user selects Influence Analysis for Case Attributes into analysis window, it freezes the analysis window completely.&lt;br /&gt;
* 218756: PA model - with event attributes - without case attributes = event attributes shown in profiling case attributes analysis.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.8 (release date 2018-11-29) ==&lt;br /&gt;
Build number: 2018.8.0.38236, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;:&lt;br /&gt;
* New types of charts have been added to the KPI Analysis in PAPO. In addition to the previously available column chart and table presentations, there are now bar, donut, area, line and spline charts.&lt;br /&gt;
* Tool palette contains now items for each QPR ProcessAnalyzer analysis making it easier to create dashboards with different analyses. The analyses have also needed context variables predefined so that settings are saved to the dashboard.&lt;br /&gt;
* Duration Influence Analysis is now calculated in the memory which makes it significantly faster than previously when it was calculated in the SQL Server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307398: [[KPI_Analysis_(PAPO)#Settings |More chart types to KPI analysis]], such as line chart, bar chart and donut chart.&lt;br /&gt;
* 307473: PAPO tables exporting to Excel, Word and PDF&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307417: Duration Influence Analysis in In-Memory.&lt;br /&gt;
* 307458: Performance improvement in reusing event logs.&lt;br /&gt;
* 307456: Expression language plugin mechanism.&lt;br /&gt;
* 307459: [[QPR_ProcessAnalyzer_Web_Service_API#Functions_in_the_Web_Service_API|PA service support for script generated reports as csv file (for QPR UI Script Manager)]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218711: PAPO duration analysis is failing.&lt;br /&gt;
* 218663: PAPO - KPI Analysis - Number of decimals effects column height.&lt;br /&gt;
* 218664: PAPO - KPI Analysis - Default number of decimals in the drop-down list should be 1.&lt;br /&gt;
* 218669: PAPO - KPI Analysis duration from - to.&lt;br /&gt;
* 218557: PAPO - Duplicate flows when increasing the flow amounts in flowchart.&lt;br /&gt;
* 218718: PAPO - Flowchart sometimes shows portions of the flowchart completely unconnected from start/end nodes of the flowchart.&lt;br /&gt;
* 218668: PAPO - KPI Analysis - wrong names in droplist and wrong chart title.&lt;br /&gt;
* 218666: PAPO - KPI Analysis - CamelCase column headers.&lt;br /&gt;
* 218670: PAPO - KPI Analysis - title Duration between &amp;quot;undefined&amp;quot; and &amp;quot;undefined&amp;quot;. &lt;br /&gt;
* 218665: PAPO - KPI Analysis - numerical data should be shown linear on X axis.&lt;br /&gt;
* 218629: PAPO - KPI Analysis - Year period should not show thousand separator.&lt;br /&gt;
* 218667: PAPO - KPI Analysis - units are missing in table.&lt;br /&gt;
* 218725: PAPO - KPI Analysis - NumberOfDecimals should be enabled for numerical case&amp;amp;event attribute.&lt;br /&gt;
* 218731: PAPO - layout issue when displaying error message.&lt;br /&gt;
* 218747: PAPO - KPI analysis - Column header text is not consistent with x-axis label.&lt;br /&gt;
* 218762: PAPO - KPI Analysis - Error message doesn&#039;t disappear when switching from wrong selections to correct ones.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218727: Null values don&#039;t work in GroupBy/GroupByValue functions.&lt;br /&gt;
* 218708: Filtering with duration value 0 does not work in duration analysis.&lt;br /&gt;
* 218770: Case analysis with variation Id -&amp;gt; Exception: The given key was not present in the dictionary.&lt;br /&gt;
* 218771: Conformance: Parallel gateways having multiple branches with only one node aren&#039;t analyzed correctly.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.7 (release date 2018-10-10) ==&lt;br /&gt;
Build number: 2018.7.0.38036, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307319: Expression language: [[Generic_Properties_and_Functions_in_QPR_ProcessAnalyzer_Expressions#Other_functions | GroupBy and GroupByValue -functions]].&lt;br /&gt;
* 307370: PAPO/A1 cell case/event/event type/variation count should only show cases user has permissions in case level security.&lt;br /&gt;
* 307369: String handling functions in the expression language.&lt;br /&gt;
* 307424: KPI analysis in generic context.&lt;br /&gt;
* 307439: Quick &amp;amp; easy expression language improvements.&lt;br /&gt;
* 307336: PA performance improvement (part 1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218673: Null values in PA expression language should appear as nulls in datasets.&lt;br /&gt;
* 218693: Performance for PAPO&#039;s data grids has been optimized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218453: .TMP files is not deleted always. After 65k .TMP files exist then PA service stop working. If issue is encountered, workaround is to manually delete .TMP files (e.g. files are located in folder C:\Windows\Temp or C:\Users\&amp;lt;pa_applicationpool_user&amp;gt;\AppData\Local\Temp).&lt;br /&gt;
* 218643: InMemory: Open model after pacm file import fails to &amp;quot;Object reference not set to an instance of an object.&amp;quot;.&lt;br /&gt;
* 218652: Access denied. Unexpected ModelEventLog dropping object with from cache.&lt;br /&gt;
* 218648: Import empty model with filter crash (evevenlog.Content is null).&lt;br /&gt;
* 218685: XES import runs out of memory when importing BPIC2018 -model.&lt;br /&gt;
* 218690: Expressions returning boolean values should be returned to QPR UI as booleans.&lt;br /&gt;
* 218687: Average and Sum functions should return null for zero length arrays instead of zero.&lt;br /&gt;
* 218705: InMemoryCore: TotalCost in event analysis has incorrect values.&lt;br /&gt;
* 218704: Mismatch in case counts in Variation Analysis when event type filter has been applied.&lt;br /&gt;
* 218709: FileType parameter not select correct stream compression mode in ImportFromStream.&lt;br /&gt;
* 218698: The given key was not present in the dictionary - Variation Analysis error.&lt;br /&gt;
* 218710: PAPO case analysis is currently failing.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.6 (release date 2018-08-29) ==&lt;br /&gt;
Build number: 2018.6.0.37869, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;&lt;br /&gt;
* KPI Analysis update: The KPI Analysis feature has new updates to it. The Analysis Menu design has new options that allow for efficient creation of KPI analysis presentations. Menu items have been grouped into sub-groups making finding analysis options much swifter. &lt;br /&gt;
* Model load on startup: You can now define which models are loaded onto memory on startup allowing for quicker setup of QPR ProcessAnalyzer servers. This loads the key models needed directly into memory without any separate in-memory loading.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307351: KPI analysis UI - part 2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307323: [[PA Migration to 2018.6 |Remove old PA web client]].&lt;br /&gt;
* 307200: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Necessary_IIS_setup |PA model management: PA model automatic loading on startup]].	&lt;br /&gt;
* 307350: KPI analysis UI - part 2 (server side).&lt;br /&gt;
* 307208: PA model management: PA model status information to expression language.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218391: PA UI Flowchart selection does not clear automatically.&lt;br /&gt;
* 218606: Edit mode is ON  &amp;gt; Floating Action Buttons are not clickable.&lt;br /&gt;
* 218626: PAPO: some popup menus are not closed properly in IE 11.&lt;br /&gt;
* 218607: PAPO: popup menu is not displayed in IE 11.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218597: PA Exception details show null in QPR UI.&lt;br /&gt;
* 218575: Incorrect results in conformance analysis calculation. &lt;br /&gt;
* 218540: KPI analysis not working properly.&lt;br /&gt;
* 218314: Variation analysis shows duplicate variations if there are excluded event types.&lt;br /&gt;
* 218604: PA Excel client does not log enough during connection creation.&lt;br /&gt;
* 218624: Estimatedmemory not calculated correctly when model not have events.&lt;br /&gt;
* 218396: KPI analysis - ApplyAnalysisFilters. InvalidOperationException: Sequence contains no elements.´&lt;br /&gt;
* 218628: PAPO: Error popup appears, &amp;quot;Error processing QPR ProcessAnalyzer request.&lt;br /&gt;
* 218631: Performance improvements (Path analysis was slow).&lt;br /&gt;
* 218485: ProcessAnalyzer Excel client cannot be removed from Programs and Features, as it wont show up there.&lt;br /&gt;
* 217775: GetAnalysis(18) should write a progress log entry after each chunk.&lt;br /&gt;
* 217653: SQL command not in log when ODBC connection failed.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.5 (release date 2018-07-17) ==&lt;br /&gt;
Build number: 2018.5.0.37716, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;&lt;br /&gt;
*QPR ProcessAnalyzer Deployment Package for QPR UI: The new version comes with preloaded QPR UI views that can instantly kickstart your Process Mining experience. These views are readymade and require no extra configuration. These views introduce new functionalities, such as ready made conformance views, for deploying a more varied Process Mining offering. &lt;br /&gt;
*New Dashboard Design features: Panels can be now instantly developed and evaluated in viewer mode, allowing for a more powerful dashboard creation. The object placing logic has been overhauled, allowing for new options in creating dashboards. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307338: [[QPR_ProcessAnalyzer_API:_ResetModelCache | Web service support to load and drop PA models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218536: PAPO: KPI Analysis should not be available from Control Windows.&lt;br /&gt;
* 218519: The numerical values in QPR ProcessAnalyzer Influence Analysis were aligned to the left.&lt;br /&gt;
* 217888: Selection lost from influence analysis table when user slightly adjusts browser window or panel/presentation object window size.&lt;br /&gt;
* 218465: PAPO: Newly created filters are not displayed in the list.&lt;br /&gt;
* 218556: PAPO: An unnecessary vertical scrollbar was shown after PAPO Case Analysis was resized.&lt;br /&gt;
* 218520: PAPO: Filter does not recognize decimal separators.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218537: ODBC xlsx loading failed with data format issue.&lt;br /&gt;
* 218495: Changing default filter does not drop cached model information.&lt;br /&gt;
* 218550: Accessing projects from expression language fails in some cases.&lt;br /&gt;
* 218549: Datatable import from Excel sheet data corruption if first column value is empty.&lt;br /&gt;
* 218558: Errors in default.aspx. Login fails.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.4 (release date 2018-06-11) ==&lt;br /&gt;
Build number: 2018.4.0.37669, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* ODBC driver support for QPR ProcessAnalyzer: Use external data sources to create a dynamic model that is updated every time the model is loaded. Using the ODBC driver, the model data can be accessed from a separate data source. All the event data information can be defined in JSON format allowing for automatic model creation.&lt;br /&gt;
* KPI Analysis: A new analysis is added to QPR ProcessAnalyzer. KPI Analysis utilizes the KPI expression engine for creating visualizations of data. KPI Analysis is a fully fledged analysis that can be used in conjuction with the existing QPR ProcessAnalyzer analysis for more focused results. In addition, KPI Analysis is available as a separate QPR UI view for creation of dashboards that present real-time data taken from QPR ProcessAnalyzer.&lt;br /&gt;
* Tabular Analysis results updated with data types: Analysis featuring tabulated data are now automatically updated with correct data types. Automatic data types allow for exporting the data in a format that can be used in other compatible tools as the data types are automatically defined into the data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307265: [[KPI_Analysis_(PAPO)|KPI analysis UI]] - part 1 (KPI).&lt;br /&gt;
* 307278: The tabular analyses (e.g. Case analysis) in QPR ProcessAnalyzer UI now have the correct column data types based on the information from the QPR ProcessAnalyzer server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307204: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Model Datasources|Load PA model from ODBC datasource]].&lt;br /&gt;
* 307313: Expression language improvements - part 7 (performance).&lt;br /&gt;
* 307317: Update new [[QPR_End_User_Software_License_Agreement|EULA]] to QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218487: Influence analysis for Flowchart changes the flowchart settings.&lt;br /&gt;
* 218498: No history entry is created while changing visibility threshold via stepper or context variable.&lt;br /&gt;
* 218508: PAPO variation analysis should limit the queried number of variations.&lt;br /&gt;
* 218513: PAPO settings buttons cover analysis content.&lt;br /&gt;
* 218532: PAPO: Profiling analysis does not work with data loaded via ODBC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218515: IIS crashes in kernel during Odbc query reading csv/xlsx file with Microsoft Access Text Driver and Microsoft Excel Driver.&lt;br /&gt;
* 218484: ImportEvents fails in StartBackground mode.&lt;br /&gt;
* 218525: InMemory CaseAnalysis ShowAllCases not work if there is cases without events.&lt;br /&gt;
* 218463: Issue to install excel client (part 2).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.3 (release date 2018-04-23) ==&lt;br /&gt;
Build number: 2018.3.0.37545, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
*Conformance Checking is supported in QPR ProcessAnalyzer. Using the KPI Expression Language as a basis, process mining models can be compared to BPMN notation and analyzed if the process data conforms to the BPMN design. These results are implemented in ChartView and KPI Expression Language allows them to be implemented into dashboards.&lt;br /&gt;
*BPMN Editor has been added to ChartView. You can now import and design BPMN process maps for use in conformance analysis. The BPMN editor is a web component that is used in the browser, allowing for quick and easy process design. The designs can also be exported for further use.&lt;br /&gt;
*Flowchart Visibility Settings have been overhauled with a new visual presentation. New stepper elements allow for more flexible flow threshold settings while maintaining a user-friendly approach.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307276: Remove PAPO Offline mode.&lt;br /&gt;
* 307193 &amp;amp; 307298: The [[Flowchart_Analysis_(PAPO)#Visibility_Settings|Flowchart Visibility Settings]] were improved.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307077: [[QPR_ProcessAnalyzer_System_Requirements#System_Requirements_for_QPR_ProcessAnalyzer_Server | Support for Windows Server 2016 (PA Service)]].&lt;br /&gt;
* 307246: Expression function to calculate conformance to BPMN.&lt;br /&gt;
* 307297: Expression language improvements - part 6.&lt;br /&gt;
* 307301: In-memory memory usage optimizations.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218306: PAPO control window is affected by analysis window&#039;s &#039;Show as&#039; setting.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218241: PA Duration Analysis In-Memory - numbers for Events and Cases too high (focus flow).&lt;br /&gt;
* 218456: Issue to install excel client (part 1).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.2 (release date 2018-03-12) ==&lt;br /&gt;
Build number: 2018.2.0.37453, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* Case Permissions have been added to the data security featureset. Case Permissions allow for limiting model visibility based on rules that reference the case attributes of a set model. Case permissions can refer to usernames or user groups, creating a link between the attributes and groups.&lt;br /&gt;
* Influence Analysis for Case Attributes has been simplified. The feature presents basic information relating to the root causes when it is opened. If further information is needed, this can be accessed via the feature menu. &lt;br /&gt;
* DataGrids support Excel exporting. You are now able to export data from fixed dashboards featuring datagrids. With this feature, you can take your data for further manipulation using Microsoft Excel.&lt;br /&gt;
* Chartview has been improved with a new layout and excel exporting. The new layout allows for quicker access to creating charts using the ChartView tool. With the exporting functionality, the views created are exported for use in presentations in Microsoft Excel.&lt;br /&gt;
* KPI Expression Language has been added with support for Influence Analysis for Case Attributes. This allows for further creation of dashboards with specific analysis result queries. Using the KPI expression language, dashboards can be made to present up-to-date data based on influence analysis results.&lt;br /&gt;
* Dataset tag support for data visualization. Adding dataset tags will help in creating more dynamic chart presentations as the data can be inserted into the JSON settings of charts and datagrids. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307220: The [[Influence_Analysis_for_Case_Attributes_(PAPO)|Influence Analysis for Case Attributes]] settings now has a toggle for showing and hiding the detail columns.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307273: [[QPR ProcessAnalyzer Web Service API#Example| PA model JSON settings]].&lt;br /&gt;
* 307269: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Case_Permissions |Case permissions]].&lt;br /&gt;
* 307261: PA InMemory core, part 8 (Path Analysis).&lt;br /&gt;
* 307282: PA KPI&#039;s and expressions (part 5).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218426: Using PAPO with customers model crashes PA Server (Entice Changes).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218371: Event types aren&#039;t provided to PAPO by PA server.&lt;br /&gt;
* 218372: Having multiple expressions in one selection item in a JSON filter does not work.&lt;br /&gt;
* 218375: Empty comparison -setting with nonempty filter -setting causes influence analysis to return incorrect results.&lt;br /&gt;
* 218380: PA Activation ends one day before the actual end date.&lt;br /&gt;
* 218362: WebService GetAnalysisAsImage does not work.&lt;br /&gt;
* 218389, 218397: Performance issues in PA in-memory core with multiple simultaneous users.&lt;br /&gt;
* 218412: PercentageNumber property is not set properly in PA analyses.&lt;br /&gt;
* 218410: Event attribute profiling event amount mismatch.&lt;br /&gt;
* 218404: Using PAPO with customers model crashes PA Server (PA changes).&lt;br /&gt;
* 218430: Pre-release mandatory PA bugfixes.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.1 (release date 2018-01-31) ==&lt;br /&gt;
Build number: 2018.1.0.37330, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* ChartView is introduced as a new QPR UI view. This interactive view allows the creation of customized charts to answer specific business needs, with measures and dimensions the user has selected. ChartView comes preloaded with numerous different presentation features for the creation of customized charts fit for any business need.&lt;br /&gt;
* New Table Filtering for Data Table Views. A new Excel-style filtering feature has been added to the different analysis features, such as Influence Analysis for Case Attributes and Event Analysis. The feature allows the presentation and comparison of different data using robust filters.&lt;br /&gt;
* The QPR UI version of QPR ProcessAnalyzer has an overhauled popup menu. Selecting different analysis and creating new filters is quicker and new icons have been added for added clarity.&lt;br /&gt;
* XES filetype importing support. The IEEE TaskForce standardized XES logs are now supported by QPR ProcessAnalyzer. This filetype aims to unify the transactional data produced by information systems and makes them usable in tools used in data analysis. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Full Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307244: The various tables (e.g. Case Analysis) in QPR ProcessAnalyzer UI received filtering functionality familiar to the one in Microsoft Excel.&lt;br /&gt;
* 307163: Popup menu improvements.&lt;br /&gt;
* 307224: Cache model information into browser side.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307271: PA InMemory core, part 7 (Canceling analysis).&lt;br /&gt;
* 307247: XES Event log file format support.&lt;br /&gt;
* 307257, 307270: PA KPI&#039;s and expressions (part 3, 4).&lt;br /&gt;
* 307211: Enable custom data sources: Selections as JSON.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218327: PAPO Grid view row selection issues when opening popup menu.&lt;br /&gt;
* 218328: PAPO Missing null check in ModelState.&lt;br /&gt;
* 218365: PAPO: Settings etc. buttons not visible in the latest chrome version (automatically updated).&lt;br /&gt;
* 218324: Fixed an issue where a dataset wasn&#039;t refreshed when a context variable was changed from PAPO.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218288: PA service installation with DeployPAService.ps1.&lt;br /&gt;
* 218291: Problem with --#GetAnalysis type 31 (filter rules).&lt;br /&gt;
* 218315: PAPO: InMemoryCore: Offline mode shows incorrect case attribute values.&lt;br /&gt;
* 217922: Filtering Flow Table with Case Attribute is too slow.&lt;br /&gt;
* 218321: PA core - Internal server error in PAPO when duration analysis result is empty.&lt;br /&gt;
* 218322: Flow analysis results not always in same order (InMemory).&lt;br /&gt;
* 218340: Not allow to delete default filter (&amp;quot;No access/Access denied&amp;quot;).&lt;br /&gt;
* 218345: Unknown filter rule. The given key was not present in the dictionary.&lt;br /&gt;
* 218363: Attribute values are sent to clients as strings from InMemory profiling analysis.&lt;br /&gt;
* 218365: PAPO: Settings etc. buttons not visible in the latest chrome version (automatically updated).&lt;br /&gt;
* 218379: PAPO: Side panels visible in multi papo even if they should be closed and invisible.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.9 (release date 2017-12-19) ==&lt;br /&gt;
Build number: 2017.9.0.37199, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The Filtering system on the WebUI has been updated. The user can now easily rename filters, add specific permissions to control privacy of the filters and delete filters easily. The filtering system has an improved interface for easier handling of the filters. &lt;br /&gt;
* New Expression language for KPI calculation. This new language allows power users to create analysis that are customized to their needs and creates the possibility for caluclating KPIs inside the server core. This JSON based language allows users to take their analysis functions even further.&lt;br /&gt;
* Other improvements in this release include performance improvements and further development of the in-memory mode.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307237: PAPO: There&#039;s now a new &amp;quot;DisabledFunctionalities&amp;quot; [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#PAPO.27s_Context_Variables|context variable for using with PAPO]] to define which PAPO functionalities should not be.&lt;br /&gt;
* 307173: It&#039;s now possible to edit the Name and Privacy of a filter in QPR ProcessAnalyzer UI, as well as delete a filter.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307235: PA InMemory core, part 5 (Flow Analysis).&lt;br /&gt;
* 307262: PA InMemory core, part 6 (Canceling model loading).&lt;br /&gt;
* 307257: PA KPI&#039;s and expressions (part 2).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218251: Multi-PAPO: Model page shows when model button of one papo has been disabled.&lt;br /&gt;
* 218275: Change PA WS methods from GET to POST.&lt;br /&gt;
* 218132: PAPO: Zoom change when item is selected from Variation Analysis.&lt;br /&gt;
* 218196: PAPO: Variation Analysis: graph bar lengths doesn&#039;t match with data.&lt;br /&gt;
* 218157: PAPO: QPR UI Graphics messed in Influence Analysis for Flowchart.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218241: Duration Analysis In-Memory - numbers for Events, Median duration and Average duration are too high.&lt;br /&gt;
* 218046: System.ArgumentException: Value of &#039;-170&#039; is not valid for &#039;red&#039;. &#039;red&#039; should be greater than or equal to 0 and less than or equal to 255.&lt;br /&gt;
* 218275: Change PA WS methods from GET to POST.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.8 (release date 2017-11-07) ==&lt;br /&gt;
Build number: 2017.8.0.37022, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The QPR UI interface features a new feature: Profiling Event Analysis. Now you can drilldown to your events and see what event attributes the event types in your data contain. You can also use this knowledge to benchmark your process.&lt;br /&gt;
* The Selection logic in the QPR UI has been updated. You no longer have to update after making a selection, as the selections are responsive and updated automatically. This leads to more responsive and effective analysis.&lt;br /&gt;
* In-Memory Engine has been improved upon, allowing for more efficient analysis for small-to-mid-size models. This update gives you improved performance in your analysis operations. This feature applies for all analysis features and improves the performance of the software immensely, giving you faster operations.&lt;br /&gt;
* The Excel Client has been preloaded with new and updated demo models that demonstrate the power of QPR ProcessAnalyzer. New Models include Healthcare and Insurance claims process models. These give you a great idea on how to utilize QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307161: When selecting items in PAPO, the &amp;quot;Selected&amp;quot; context variables are now updated without the need to explicitly do the update. As a result, the &amp;quot;Select into UI Context&amp;quot; item was removed from the PAPO popup menu. This means that the TempSelectedActivities, TempSelectedTransitions, TempSelectedVariations, and TempSelectedCounts context variables were removed, and their functionality changed to be in the SelectedActivities, SelectedTransitions, SelectedVariations, and SelectedCounts context variables.&lt;br /&gt;
* 307061: PAPO now has the [[Profiling_Case_Analysis_(PAPO)#Profiling_Event_Analysis|Profiling Event Analysis]] available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307219: Excel client demo model changes.&lt;br /&gt;
* 307216: To improve performance, QPR ProcessAnalyzer can now be configured to run the analyses in the server memory instead of the database.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218060: PAPO doesn&#039;t add transition duration but case duration filter rule type when Duration analysis shows transition duration.&lt;br /&gt;
* 218039: PAPO: Analysis window has incorrect width when opening view (splitter issue).&lt;br /&gt;
* 218036: PAPO: Web UI shows archived/recycled PA models.&lt;br /&gt;
* 218100: PAPO: Once Analysis view show &amp;quot;No records to display&amp;quot; message, then switch to other analysis view is not possible for current model.&lt;br /&gt;
* 218159: PAPO: Popup menus don&#039;t work in tabular analyses in IE11.&lt;br /&gt;
* 218169: PAPO: SelectedAttributeType parameter in PA request has invalid value when switching model and applying filter that requires model change.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218148: InMemory: Include Only Event Types does not work with sampled models.&lt;br /&gt;
* 218179: InMemory: Amount of cases in Duration analysis when flow is selected.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.7 (release date 2017-09-25) ==&lt;br /&gt;
Build number: 2017.7.0.36871 &amp;lt;s&amp;gt;36762&amp;lt;/s&amp;gt;, Model compatibility version: 2, Database version: 57, Stream version: 7. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* New In-Memory core for Process Analysis calculation. This server-side improvement can improve Analysis Performance speed up to 20 times faster than previous releases. This is achieved by offloading the memory functions directly to the application server where in the previous versions of the software, the SQL server handledthe workload.&lt;br /&gt;
* This release also features different bug fixes and performance improvements, aiming to improve your process analysis experience. Combining these features with the new WebUI platform release, the implementation of your data for analysis and improvement is smoother than ever.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307060: CSS styling and grid configuration improvements (technical feature).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 217986: The pie (in profiling analysis) is rendered initially too small.&lt;br /&gt;
* 217721: One extra scroll position / zoom -history entry created when PAPO is initialized. &lt;br /&gt;
* 218052: Flowchart shows incorrect duration. &lt;br /&gt;
* 217978: Profiling analysis is empty in Analysis window when opening splitter again. &lt;br /&gt;
* 217926: Duration Analysis in control window doesn&#039;t select all &amp;quot;other&amp;quot; cases. &lt;br /&gt;
* 217708: It is not possible to make multiselection using radial graph. &lt;br /&gt;
* 218043: Issue with AnalysisWindowSize context variable. &lt;br /&gt;
* 218058: Profiling Analysis for Case Attributes doesn&#039;t work when using numerical case attribute. &lt;br /&gt;
* 218035: Switch model from filter: Error processing PA request. Invalid column name &#039;CA_VALUE_1290462&#039;. &lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218024: Add log writing to odbc query.&lt;br /&gt;
* 217836: Error when opening filter in customer environment.&lt;br /&gt;
* 217995: ImportCaseAttributes command does not import cases properly.&lt;br /&gt;
* 218094: PA error text doesn&#039;t have information which value have problem.&lt;br /&gt;
* 218145: Input String was not in the correct format error when opening customer model.&lt;br /&gt;
&lt;br /&gt;
== Old Releases ==&lt;br /&gt;
See older releases in [[QPR ProcessAnalyzer Release Archive]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Troubleshooting_SQL_Scripts&amp;diff=12607</id>
		<title>Troubleshooting SQL Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Troubleshooting_SQL_Scripts&amp;diff=12607"/>
		<updated>2019-02-07T09:48:22Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Using &amp;quot;##&amp;quot; in a Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page goes though some common problem situations in QPR ProcessAnalyzer scripts. After a script has been run, the [[QPR_ProcessAnalyzer_Logs#Script_Log|Script Log]] dialog is shown. You can use it to troubleshoot your script.&lt;br /&gt;
&lt;br /&gt;
== Invalid Object Name ==&lt;br /&gt;
Issue: &#039;&#039;&#039;Invalid object name&#039;&#039;&#039; exception is thrown when running a script with #GetAnalysis and #ImportEvents commands.&lt;br /&gt;
&lt;br /&gt;
The issue may arise when there are no events to import, i.e. the #GetAnalysis command doesn&#039;t create any table. In this case, the missing event table needs to be created in the script between the #GetAnalysis and #ImportEvents commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*This is the GetAnalysis part */&lt;br /&gt;
(SELECT &#039;AnalysisType&#039;, &#039;6&#039;) UNION ALL&lt;br /&gt;
(SELECT &#039;MaximumCount&#039;, &#039;0&#039;) UNION ALL&lt;br /&gt;
(SELECT &#039;FilterId&#039;, &#039;10&#039;) UNION ALL&lt;br /&gt;
(SELECT &#039;SelectedEventAttributes&#039;, &#039;*&#039;) UNION ALL&lt;br /&gt;
(SELECT &#039;TargetTable&#039;, &#039;#AnalysisResult&#039;)&lt;br /&gt;
--#GetAnalysis&lt;br /&gt;
&lt;br /&gt;
/*Here we create the event table, if it is missing */&lt;br /&gt;
IF object_id(&#039;tempdb..#AnalysisResult&#039;) is  null&lt;br /&gt;
BEGIN&lt;br /&gt;
CREATE TABLE #AnalysisResult (&lt;br /&gt;
CaseName NVARCHAR(MAX),&lt;br /&gt;
EventTypeName NVARCHAR(MAX),&lt;br /&gt;
TimeStamp DATETIME,&lt;br /&gt;
Cost FLOAT,&lt;br /&gt;
TotalCost FLOAT&lt;br /&gt;
);&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
/*Then we use the ImportEvents */&lt;br /&gt;
(SELECT &#039;ProjectName&#039;, &#039;ExampleProject&#039;) UNION ALL&lt;br /&gt;
(SELECT &#039;ModelName&#039;, &#039;ExampleModel&#039;)&lt;br /&gt;
(SELECT * FROM [#AnalysisResult])&lt;br /&gt;
--#ImportEvents&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Incorrect Syntax When Using &#039; Characters ==	 	&lt;br /&gt;
Issue: &#039;&#039;&#039;SQL error: Incorrect syntax near &#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you get this error message, check the &#039; characters in the parameter definitions. Note that you cannot use the &#039; character in the parameter value.&lt;br /&gt;
	 	&lt;br /&gt;
== Incorrect Syntax When Running Scripts Copied from QPR ProcessAnalyzer Wiki ==&lt;br /&gt;
Issue: &#039;&#039;&#039;SQL error: Incorrect syntax&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You may get this kind of error message when trying to run a script that you have copied and pasted directly from, for example, the examples given in [[Data Extraction, Transformation, and Loading#Supported QPR ProcessAnalyzer Commands in Scripts|Supported QPR ProcessAnalyzer Commands in Scripts]]. This happens because the scripts are then likely to contain non-breaking spaces (encoded as 0xA0 but not visible when pasted to the &#039;&#039;&#039;Script Code&#039;&#039;&#039; field) which cause the running of the scripts to fail as they are not accepted in the SQL syntax. &lt;br /&gt;
&lt;br /&gt;
The solution is to manually remove the non-breaking spaces after copying and pasting the script, so there are no extra spaces at the beginning of each line, for example.&lt;br /&gt;
&lt;br /&gt;
== Using &amp;quot;##&amp;quot; in a Script ==&lt;br /&gt;
Issue: &#039;&#039;&#039;Using &amp;quot;##&amp;quot; in a script is not allowed. Did you mistype temporary table name?&#039;&#039;&#039;	&lt;br /&gt;
&lt;br /&gt;
This error message is displayed if the name of the project or model name contains two consecutive # characters (i.e. ##) and you try creating a new project or a model using scripts. Note that you cannot use the ## character in the name of the project or the model. Use expression like &#039;stringstart#&#039; + &#039;#stringend&#039; or simlar to avoid have &amp;quot;##&amp;quot; in script.&lt;br /&gt;
&lt;br /&gt;
== The ? Character in Project and Model Names ==&lt;br /&gt;
Issue: A project or model name contains question marks.	&lt;br /&gt;
&lt;br /&gt;
The problem arises if you try to, for example, create a project or a model with a name containing multibyte characters using scripts. The created project or model will then include question mark characters instead of multibyte characters. The fix is to add a prefix N&#039; to the name containing multibyte characters (for example, N&#039;【隱藏▲】【純文字檢視】【複製到剪貼簿】&#039;). Another workaround is not to use multibyte characters at all in scripts but instead ProjectId and ModelId, if possible. To do that, you can view the Id column in the Models tab of the Workspace dialog in the same way as described for data tables in [[Project Workspace in QPR ProcessAnalyzer Excel Client#Adding_an_Id_Column_to_the_Data_Tables_List|Adding an Id Column to the Data Tables List]].&lt;br /&gt;
&lt;br /&gt;
== Multiple Projects with the Same Name ==&lt;br /&gt;
Issue: &#039;&#039;&#039;There are multiple projects with name &#039;&amp;lt;ProjectName&amp;gt;&#039;. Please, specify ProjectId in sandbox script operation: #&amp;lt;Operation&amp;gt;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
This error message is displayed when trying to run a script if you have access to two or several projects with the same name and you refer to the project by name in the script. The fix for resolving this ambiguity is to refer to the project by its ID using the &#039;ProjectId&#039; parameter instead of &#039;ProjectName&#039;. An ID is always unique, whereas a name is not.&lt;br /&gt;
&lt;br /&gt;
== Multiple Models with the Same Name ==&lt;br /&gt;
Issue: &#039;&#039;&#039;There are multiple models with name &#039;&amp;lt;ModelName&amp;gt;&#039;. Please, specify ModelId in sandbox script operation: #&amp;lt;Operation&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This error message is displayed when trying to run a script if you have access to two or several models with the same name and you refer to the model by name in the script. The fix for resolving this ambiguity is to refer to the model by its ID using the &#039;ModelId&#039; parameter instead of &#039;ModelName&#039;. An ID is always unique, whereas a name is not.&lt;br /&gt;
&lt;br /&gt;
== String Comparisons Not Being Correct ==&lt;br /&gt;
Issue: Different characters are considered as similar and my analysis or script is affected.&lt;br /&gt;
&lt;br /&gt;
Due to the way SQL Server handles string comparisons, comparing attribute values that are in non-western character sets may result in values that are not similar to be treated as they were. For example the following characters are considered the same as the space character: Ǹ, ǹ, Ș, ș. This can have an effect in  analyses using the attributes, i.e. Profiling Analysis, Influence Analysis, as well as Benchmarking and attribute value filtering and scripts that are run. To overcome this, before importing the attribute values, cast the SQL Variants holding the values into VARBINARY(MAX).&lt;br /&gt;
&lt;br /&gt;
For example, the following script will show characters that are treated similar as zero &amp;quot;0&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DECLARE @referenceAscii int = 0&lt;br /&gt;
&lt;br /&gt;
IF object_id(&#039;tempdb..#ids&#039;) is null &lt;br /&gt;
CREATE TABLE #ids ( id int)&lt;br /&gt;
&lt;br /&gt;
DECLARE @i int = 0&lt;br /&gt;
WHILE @i &amp;lt; 70000 BEGIN&lt;br /&gt;
    SET @i = @i + 1&lt;br /&gt;
    INSERT #ids VALUES (@i)&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
select * FROM (&lt;br /&gt;
  select &lt;br /&gt;
    sys.fn_varbintohexstr(CONVERT(varBINARY(8), id)) as CharacterAsHex,&lt;br /&gt;
    id as ASCIICode,&lt;br /&gt;
    nchar(id) as Character,&lt;br /&gt;
   (CASE WHEN Nchar(@referenceAscii) = NCHAR(id) THEN 1 ELSE 0 END) as ShownAsSimilar &lt;br /&gt;
  FROM #ids ) as x&lt;br /&gt;
where x.ShownAsSimilar = 1&lt;br /&gt;
--#ShowReport&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Client Exception When Using #ImportSapQuery Command ==&lt;br /&gt;
Issue: Limitations in size of SAP query result.&lt;br /&gt;
&lt;br /&gt;
The SAP system has limitations as to how much data can be queried. The workaround for the error is to reduce the amount of data to be queried using &#039;SapRowcount&#039;, &#039;SapRowskips&#039;, &#039;SapWhereClauseSelect&#039;, &#039;SapFieldNames&#039; and &#039;SapFunction&#039; parameters. See [[QPR ProcessAnalyzer Scripting Commands#--.23ImportSapQuery|--#ImportSapQuery]] for parameter explanations.&lt;br /&gt;
&lt;br /&gt;
Issue: &#039;&#039;&#039;Client exception&#039;&#039;&#039; is thrown when running a script with #ImportSapQuery command using the &#039;SapWhereClauseSelect&#039; parameter.&lt;br /&gt;
&lt;br /&gt;
For example, the following error text can be displayed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #ImportSapQuery: SAP.Middleware.Connector.RfcAbapRuntimeException: SAP.Middleware.Connector.RfcAbapRuntimeException:&lt;br /&gt;
 Error in module RSQL of the database interface&lt;br /&gt;
   at SAP.Middleware.Connector.RfcConnection.ThrowRfcErrorMsg()&lt;br /&gt;
   at SAP.Middleware.Connector.RfcConnection.ReadBytes(Byte* buffer, Int32 count)&lt;br /&gt;
   at SAP.Middleware.Connector.RfcConnection.ReadRfcIDBegin(Int32&amp;amp; length)&lt;br /&gt;
   at SAP.Middleware.Connector.RfcConnection.ReadUpTo(RFCGET readState, RfcFunction function, RFCID toRid)&lt;br /&gt;
   at SAP.Middleware.Connector.RfcConnection.RfcReceive(RfcFunction function)&lt;br /&gt;
   at SAP.Middleware.Connector.RfcFunction.RfcDeserialize(RfcConnection conn, IRfcIOStream stream)&lt;br /&gt;
   at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn, IRfcIOStream stream, RFCID rid)&lt;br /&gt;
   at SAP.Middleware.Connector.RfcFunction.Invoke(RfcDestination destination)&lt;br /&gt;
   at Qpr.ProcessAnalyzer.Common.Integration.Sap.SapQuery(RfcDestination destination, Action`2 getSapWhereClauseSelect, Boolean enableStreamCompression, IDictionary`2 parameters)&lt;br /&gt;
   System.ServiceModel.FaultException`1[Qpr.Utils.SapError]: SAP.Middleware.Connector.RfcAbapRuntimeException: Error in module RSQL of the database interface&lt;br /&gt;
   (Fault Detail is equal to SAP.Middleware.Connector.RfcAbapRuntimeException: Error in module RSQL of the database interface&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This issue may arise when you are extracting data from SAP and the size of &#039;SapWhereClauseSelect&#039; parameter value is too large. Reduce the size of the &#039;SapWhereClauseSelect&#039; value.&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12497</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12497"/>
		<updated>2019-01-11T11:46:01Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModel|GetModel]]: Can be used to query QPR ProcessAnalyzer model data.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: can be used to get user related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ModifyUserRelations|ModifyUserRelations]] can be used to modify permissions given user.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Users (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Model Configuration (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Flowchart Image (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12496</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12496"/>
		<updated>2019-01-11T11:23:35Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Functions in the Web Service API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModel|GetModel]]: Can be used to query QPR ProcessAnalyzer model data.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: can be used to get user related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Users (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Model Configuration (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Flowchart Image (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12488</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12488"/>
		<updated>2019-01-11T07:58:10Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModel|GetModel]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: can be used to get user related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Users (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Model Configuration (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Flowchart Image (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12478</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12478"/>
		<updated>2019-01-10T10:47:03Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Functions in the Web Service API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: can be used to get user related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Users (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Model Configuration (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Flowchart Image (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12434</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12434"/>
		<updated>2019-01-07T14:11:44Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Functions in the Web Service API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]] can be used to get users.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Users (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Model Configuration (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Flowchart Image (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12433</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=12433"/>
		<updated>2019-01-07T14:11:27Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Functions in the Web Service API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: CancelQueryOperation|CancelQueryOperation]]: Cancels running operation using query identifier.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: DeleteModel|DeleteModel]]: Deletes a model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysis|GetAnalysis]]: Calculates and returns QPR ProcessAnalyzer analysis.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: LogOff|LogOff]]: Logs off the user session.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetUser|SetUser]]: Can be used to set user information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]] can be used to get users.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserPermissions|GetUserPermissions]] can be used to query permissions given user has for a set of objects.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUserRoles|GetUserRoles]] can be used to get available user roles.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetUsers|GetUsers]] can be used to get users.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== JavaScript Examples ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: sessionId&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Users (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Model Configuration (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId=@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Flowchart Image (PowerShell) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=11222</id>
		<title>QPR ProcessAnalyzer API</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_API&amp;diff=11222"/>
		<updated>2018-10-24T07:42:25Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Functions in the Web Service API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QPR ProcessAnalyzer Web Service API (Application Programming Interface) can be used to automate operations and to create integration with other applications. All Web Service operations only accept HTTP POST method (HTTP GET is not allowed).&lt;br /&gt;
&lt;br /&gt;
== Functions in the Web Service API ==&lt;br /&gt;
The following functions are available:&lt;br /&gt;
* [[QPR ProcessAnalyzer API: Authenticate|Authenticate]]: Tries to authenticate given user with given password and authentication parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetModels|GetModels]]: Can be used to query QPR ProcessAnalyzer model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetAnalysisImageAsByteArray|GetAnalysisImageAsByteArray]]: Get [[Flowchart Analysis in QPR ProcessAnalyzer Excel Client|Flowchart Analysis]] as image.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] returns all the listed properties queried for all the listed objects identified by unique identifiers.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ResetModelCache|ResetModelCache]]: Can be used to clear all cached model information of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: SetModel|SetModel]]: Can be used to set model related information.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: ValidateModel|ValidateModel]] can be used to perform all the pending tasks stored in the work queue of the given model.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: RunScript|RunScript]] can be used to execute given PA script using given parameters.&lt;br /&gt;
* [[QPR ProcessAnalyzer API: GetStream|GetStream]] can be used to query contents of a stream bound to the given session identified by given stream id.&lt;br /&gt;
&lt;br /&gt;
== Common Properties for all Object Types ==&lt;br /&gt;
The following properties are supported by all ProcessAnalyzer object types. These properties are used in the &#039;&#039;&#039;properties&#039;&#039;&#039; parameter of the [[QPR ProcessAnalyzer API: QueryObjectProperties|QueryObjectProperties]] function:&lt;br /&gt;
* &#039;&#039;&#039;typename&#039;&#039;&#039;: Name of the type of the object.&lt;br /&gt;
* &#039;&#039;&#039;name&#039;&#039;&#039;: Name of the given object.&lt;br /&gt;
* &#039;&#039;&#039;properties&#039;&#039;&#039;: List of all the supported properties for given object.&lt;br /&gt;
* &#039;&#039;&#039;relatedcount&#039;&#039;&#039;: Integer number of how many child nodes there are in the next level of given hierarchy. This is 0 if the element doesn&#039;t support the relation or there are no child objects for the given object in given hierarchy. Requires hierarchy-parameter to be defined.&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
=== DataTable ===&lt;br /&gt;
The following properties are supported by the DataTable object type:&lt;br /&gt;
* &#039;&#039;&#039;typename&#039;&#039;&#039;: &amp;quot;DataTable&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;column identifier&amp;gt;&#039;&#039;&#039;: A Data Table column name converted to script name and also prefixed with&amp;quot;custom_&amp;quot; when used as an object property name in QueryObjectProperties. For example: when the Data Table column name is &amp;quot;Actual&amp;quot;, the column identifier is &amp;quot;custom_actual&amp;quot;.&lt;br /&gt;
* All [[QPR ProcessAnalyzer Web Service API#Common Properties for all Object Types|common properties]]&lt;br /&gt;
&lt;br /&gt;
=== Product ===&lt;br /&gt;
Properties of Product object type:&lt;br /&gt;
* &#039;&#039;&#039;typename&#039;&#039;&#039;: &amp;quot;product&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;name&#039;&#039;&#039;: Name of the product (QPR ProcessAnalyzer)&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039;: Dll version of the Qpr.ProcessAnalyzer.Core.dll&lt;br /&gt;
* All [[QPR ProcessAnalyzer Web Service API#Common Properties for all Object Types|common properties]]&lt;br /&gt;
&lt;br /&gt;
Relations of Product object type:&lt;br /&gt;
* &#039;&#039;&#039;related&#039;&#039;&#039;: Returns the related objects. Supported relation hierarchies is &#039;&#039;&#039;datatable&#039;&#039;&#039; which returns all the projects available for the user.&lt;br /&gt;
&lt;br /&gt;
=== Project ===&lt;br /&gt;
Properties of the Project object type:&lt;br /&gt;
* &#039;&#039;&#039;typename&#039;&#039;&#039;: &amp;quot;Project&amp;quot;&lt;br /&gt;
* All [[QPR ProcessAnalyzer Web Service API#Common Properties for all Object Types|common properties]]&lt;br /&gt;
&lt;br /&gt;
Relations of the Project object type:&lt;br /&gt;
* &#039;&#039;&#039;related&#039;&#039;&#039;: Returns the related objects. Supported relation hierarchies: &#039;&#039;&#039;datatable&#039;&#039;&#039; which returns all the data tables in given project available for the user.&lt;br /&gt;
&lt;br /&gt;
== Identifying QPR ProcessAnalyzer Objects ==&lt;br /&gt;
QPR ProcessAnalyzer unique identifiers are used to uniquely identify any object in QPR ProcessAnalyzer. The format of a unique identifier is:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PA.&amp;lt;type&amp;gt;.&amp;lt;object&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the format, &#039;&#039;&#039;&amp;lt;type&amp;gt;&#039;&#039;&#039; can be any of the following:&lt;br /&gt;
* &#039;&#039;&#039;0&#039;&#039;&#039;: undefined (reserved, do not use)&lt;br /&gt;
* &#039;&#039;&#039;1&#039;&#039;&#039;: project&lt;br /&gt;
* &#039;&#039;&#039;2&#039;&#039;&#039;: data table&lt;br /&gt;
* &#039;&#039;&#039;3&#039;&#039;&#039;: model&lt;br /&gt;
* &#039;&#039;&#039;4&#039;&#039;&#039;: filter&lt;br /&gt;
* &#039;&#039;&#039;5&#039;&#039;&#039;: bookmark&lt;br /&gt;
&lt;br /&gt;
== Example Usage==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//login                 &lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/Authenticate&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({&lt;br /&gt;
    &#039;logOnName&#039;: &#039;&amp;lt;username&amp;gt;&#039;,&lt;br /&gt;
    &#039;password&#039;: &#039;&amp;lt;password&amp;gt;&#039;,&lt;br /&gt;
    &#039;parameters&#039;: &#039;&#039;&lt;br /&gt;
  })&lt;br /&gt;
});                       &lt;br /&gt;
&lt;br /&gt;
//create user&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/SetUser&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: &amp;quot;547c1aa5-e85b-4642-bbb1-8cb656015002&amp;quot;,&lt;br /&gt;
    &amp;quot;user&amp;quot;: {&amp;quot;Name&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;FullName&amp;quot;: &amp;quot;first last&amp;quot; },&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;Password&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;demo&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
//add user to group, value 8:12:0 is user:group:member type&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/ModifyUserRelations&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;: &amp;quot;749dcbdb-e57b-434b-a739-1f4ddc7ebc30&amp;quot;,&lt;br /&gt;
    &amp;quot;parameters&amp;quot;: [{&amp;quot;Key&amp;quot;: &amp;quot;AddGroups&amp;quot;, &amp;quot;Value&amp;quot;: &amp;quot;8:12:0&amp;quot;}]&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
//log off&lt;br /&gt;
$.ajax({&lt;br /&gt;
  &amp;quot;method&amp;quot;: &amp;quot;POST&amp;quot;,&lt;br /&gt;
  &amp;quot;url&amp;quot;: &amp;quot;http://localhost/qprpa/Mainservice.svc/webHttp/LogOff&amp;quot;,&lt;br /&gt;
  &amp;quot;dataType&amp;quot;: &amp;quot;json&amp;quot;, &amp;quot;contentType&amp;quot;: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
  &amp;quot;data&amp;quot;: JSON.stringify({ &lt;br /&gt;
    &amp;quot;sessionId&amp;quot;:&amp;quot;75aa3d08-5ad9-4b0b-8981-7daca98348cd&amp;quot;&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PowerShell example of listing users ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$param=@()&lt;br /&gt;
$users=$paService.GetUsers($token, $null, $param)&lt;br /&gt;
$users&lt;br /&gt;
$paService | get-member | ? {$_.definition -match &amp;quot;GetAnalysis&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PowerShell example update model configuration ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
$param=@()&lt;br /&gt;
$modelId =@(2)&lt;br /&gt;
$model=$paService.GetModels($token,$modelId, $param)&lt;br /&gt;
&lt;br /&gt;
$model[0]&lt;br /&gt;
$model[0].ConfigurationJson = &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$paService.SetModel($token,$model[0], $param)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PowerShell example get flowchart image ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$paService=New-WebServiceProxy –Uri &amp;quot;http://localhost/qprpa/MainService.svc&amp;quot;&lt;br /&gt;
$connection=$paService.Authenticate(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;, @())&lt;br /&gt;
$token=$connection.GetValue(0).Value&lt;br /&gt;
&lt;br /&gt;
$filterId = 13&lt;br /&gt;
$analysisType = 0&lt;br /&gt;
$processAnalysisType = 4&lt;br /&gt;
$minTransitionPercentage = 0.0&lt;br /&gt;
&lt;br /&gt;
$png=  $paService.GetAnalysisImageAsByteArray($token,$filterId,1,  $analysisType,1,  $processAnalysisType,1 , $minTransitionPercentage,1)&lt;br /&gt;
[IO.File]::WriteAllBytes(&#039;c:\tmp\image.png&#039;, $png)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Release_Notes&amp;diff=11028</id>
		<title>QPR ProcessAnalyzer Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Release_Notes&amp;diff=11028"/>
		<updated>2018-10-10T07:28:59Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Next Release: QPR ProcessAnalyzer 2018.7 (release date 2018-10-10) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists new features and fixed issues for each QPR ProcessAnalyzer release. For information on the compatibility of different versions, see [[QPR ProcessAnalyzer Version Compatibility Matrix|Version Compatibility Matrix]]. Contact [mailto:customercare@qpr.com? QPR Customer Care] if you need more information.&lt;br /&gt;
&lt;br /&gt;
== Next Release: QPR ProcessAnalyzer 2018.7 (release date 2018-10-10) ==&lt;br /&gt;
Build number: 2018.7.0.38036, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307319: Expression language: [[Generic_Properties_and_Functions_in_QPR_ProcessAnalyzer_Expressions#Other_functions | GroupBy and GroupByValue -functions]].&lt;br /&gt;
* 307370: PAPO/A1 cell case/event/event type/variation count should only show cases user has permissions in case level security.&lt;br /&gt;
* 307369: String handling functions in the expression language.&lt;br /&gt;
* 307424: KPI analysis in generic context.&lt;br /&gt;
* 307439: Quick &amp;amp; easy expression language improvements.&lt;br /&gt;
* 307336: PA performance improvement (part 1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218673: Null values in PA expression language should appear as nulls in datasets.&lt;br /&gt;
* 218693: Performance for PAPO&#039;s data grids has been optimized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218453: .TMP files is not deleted always. After 65k .TMP files exist then PA service stop working. If issue is encountered, workaround is to manually delete .TMP files (e.g. files are located in folder C:\Windows\Temp or C:\Users\&amp;lt;pa_applicationpool_user&amp;gt;\AppData\Local\Temp).&lt;br /&gt;
* 218643: InMemory: Open model after pacm file import fails to &amp;quot;Object reference not set to an instance of an object.&amp;quot;.&lt;br /&gt;
* 218652: Access denied. Unexpected ModelEventLog dropping object with from cache.&lt;br /&gt;
* 218648: Import empty model with filter crash (evevenlog.Content is null).&lt;br /&gt;
* 218685: XES import runs out of memory when importing BPIC2018 -model.&lt;br /&gt;
* 218690: Expressions returning boolean values should be returned to QPR UI as booleans.&lt;br /&gt;
* 218687: Average and Sum functions should return null for zero length arrays instead of zero.&lt;br /&gt;
* 218705: InMemoryCore: TotalCost in event analysis has incorrect values.&lt;br /&gt;
* 218704: Mismatch in case counts in Variation Analysis when event type filter has been applied.&lt;br /&gt;
* 218709: FileType parameter not select correct stream compression mode in ImportFromStream.&lt;br /&gt;
* 218698: The given key was not present in the dictionary - Variation Analysis error.&lt;br /&gt;
* 218710: PAPO case analysis is currently failing.&lt;br /&gt;
&lt;br /&gt;
== Latest Release: QPR ProcessAnalyzer 2018.6 (release date 2018-08-29) ==&lt;br /&gt;
Build number: 2018.6.0.37869, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;&lt;br /&gt;
* KPI Analysis update: The KPI Analysis feature has new updates to it. The Analysis Menu design has new options that allow for efficient creation of KPI analysis presentations. Menu items have been grouped into sub-groups making finding analysis options much swifter. &lt;br /&gt;
* Model load on startup: You can now define which models are loaded onto memory on startup allowing for quicker setup of QPR ProcessAnalyzer servers. This loads the key models needed directly into memory without any separate in-memory loading.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307351: KPI analysis UI - part 2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307323: [[PA Migration to 2018.6 |Remove old PA web client]].&lt;br /&gt;
* 307200: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Necessary_IIS_setup |PA model management: PA model automatic loading on startup]].	&lt;br /&gt;
* 307350: KPI analysis UI - part 2 (server side).&lt;br /&gt;
* 307208: PA model management: PA model status information to expression language.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218391: PA UI Flowchart selection does not clear automatically.&lt;br /&gt;
* 218606: Edit mode is ON  &amp;gt; Floating Action Buttons are not clickable.&lt;br /&gt;
* 218626: PAPO: some popup menus are not closed properly in IE 11.&lt;br /&gt;
* 218607: PAPO: popup menu is not displayed in IE 11.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218597: PA Exception details show null in QPR UI.&lt;br /&gt;
* 218575: Incorrect results in conformance analysis calculation. &lt;br /&gt;
* 218540: KPI analysis not working properly.&lt;br /&gt;
* 218314: Variation analysis shows duplicate variations if there are excluded event types.&lt;br /&gt;
* 218604: PA Excel client does not log enough during connection creation.&lt;br /&gt;
* 218624: Estimatedmemory not calculated correctly when model not have events.&lt;br /&gt;
* 218396: KPI analysis - ApplyAnalysisFilters. InvalidOperationException: Sequence contains no elements.´&lt;br /&gt;
* 218628: PAPO: Error popup appears, &amp;quot;Error processing QPR ProcessAnalyzer request.&lt;br /&gt;
* 218631: Performance improvements (Path analysis was slow).&lt;br /&gt;
* 218485: ProcessAnalyzer Excel client cannot be removed from Programs and Features, as it wont show up there.&lt;br /&gt;
* 217775: GetAnalysis(18) should write a progress log entry after each chunk.&lt;br /&gt;
* 217653: SQL command not in log when ODBC connection failed.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.5 (release date 2018-07-17) ==&lt;br /&gt;
Build number: 2018.5.0.37716, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;&lt;br /&gt;
*QPR ProcessAnalyzer Deployment Package for QPR UI: The new version comes with preloaded QPR UI views that can instantly kickstart your Process Mining experience. These views are readymade and require no extra configuration. These views introduce new functionalities, such as ready made conformance views, for deploying a more varied Process Mining offering. &lt;br /&gt;
*New Dashboard Design features: Panels can be now instantly developed and evaluated in viewer mode, allowing for a more powerful dashboard creation. The object placing logic has been overhauled, allowing for new options in creating dashboards. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307338: [[QPR_ProcessAnalyzer_API:_ResetModelCache | Web service support to load and drop PA models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218536: PAPO: KPI Analysis should not be available from Control Windows.&lt;br /&gt;
* 218519: The numerical values in QPR ProcessAnalyzer Influence Analysis were aligned to the left.&lt;br /&gt;
* 217888: Selection lost from influence analysis table when user slightly adjusts browser window or panel/presentation object window size.&lt;br /&gt;
* 218465: PAPO: Newly created filters are not displayed in the list.&lt;br /&gt;
* 218556: PAPO: An unnecessary vertical scrollbar was shown after PAPO Case Analysis was resized.&lt;br /&gt;
* 218520: PAPO: Filter does not recognize decimal separators.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218537: ODBC xlsx loading failed with data format issue.&lt;br /&gt;
* 218495: Changing default filter does not drop cached model information.&lt;br /&gt;
* 218550: Accessing projects from expression language fails in some cases.&lt;br /&gt;
* 218549: Datatable import from Excel sheet data corruption if first column value is empty.&lt;br /&gt;
* 218558: Errors in default.aspx. Login fails.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.4 (release date 2018-06-11) ==&lt;br /&gt;
Build number: 2018.4.0.37669, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* ODBC driver support for QPR ProcessAnalyzer: Use external data sources to create a dynamic model that is updated every time the model is loaded. Using the ODBC driver, the model data can be accessed from a separate data source. All the event data information can be defined in JSON format allowing for automatic model creation.&lt;br /&gt;
* KPI Analysis: A new analysis is added to QPR ProcessAnalyzer. KPI Analysis utilizes the KPI expression engine for creating visualizations of data. KPI Analysis is a fully fledged analysis that can be used in conjuction with the existing QPR ProcessAnalyzer analysis for more focused results. In addition, KPI Analysis is available as a separate QPR UI view for creation of dashboards that present real-time data taken from QPR ProcessAnalyzer.&lt;br /&gt;
* Tabular Analysis results updated with data types: Analysis featuring tabulated data are now automatically updated with correct data types. Automatic data types allow for exporting the data in a format that can be used in other compatible tools as the data types are automatically defined into the data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307265: [[KPI Analysis|KPI analysis UI]] - part 1 (KPI).&lt;br /&gt;
* 307278: The tabular analyses (e.g. Case analysis) in QPR ProcessAnalyzer UI now have the correct column data types based on the information from the QPR ProcessAnalyzer server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307204: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Model Datasources|Load PA model from ODBC datasource]].&lt;br /&gt;
* 307313: Expression language improvements - part 7 (performance).&lt;br /&gt;
* 307317: Update new [[QPR_End_User_Software_License_Agreement|EULA]] to QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218487: Influence analysis for Flowchart changes the flowchart settings.&lt;br /&gt;
* 218498: No history entry is created while changing visibility threshold via stepper or context variable.&lt;br /&gt;
* 218508: PAPO variation analysis should limit the queried number of variations.&lt;br /&gt;
* 218513: PAPO settings buttons cover analysis content.&lt;br /&gt;
* 218532: PAPO: Profiling analysis does not work with data loaded via ODBC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218515: IIS crashes in kernel during Odbc query reading csv/xlsx file with Microsoft Access Text Driver and Microsoft Excel Driver.&lt;br /&gt;
* 218484: ImportEvents fails in StartBackground mode.&lt;br /&gt;
* 218525: InMemory CaseAnalysis ShowAllCases not work if there is cases without events.&lt;br /&gt;
* 218463: Issue to install excel client (part 2).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.3 (release date 2018-04-23) ==&lt;br /&gt;
Build number: 2018.3.0.37545, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
*Conformance Checking is supported in QPR ProcessAnalyzer. Using the KPI Expression Language as a basis, process mining models can be compared to BPMN notation and analyzed if the process data conforms to the BPMN design. These results are implemented in ChartView and KPI Expression Language allows them to be implemented into dashboards.&lt;br /&gt;
*BPMN Editor has been added to ChartView. You can now import and design BPMN process maps for use in conformance analysis. The BPMN editor is a web component that is used in the browser, allowing for quick and easy process design. The designs can also be exported for further use.&lt;br /&gt;
*Flowchart Visibility Settings have been overhauled with a new visual presentation. New stepper elements allow for more flexible flow threshold settings while maintaining a user-friendly approach.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307276: Remove PAPO Offline mode.&lt;br /&gt;
* 307193 &amp;amp; 307298: The [[Flowchart_Analysis_(PAPO)#Visibility_Settings|Flowchart Visibility Settings]] were improved.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307077: [[QPR_ProcessAnalyzer_System_Requirements#System_Requirements_for_QPR_ProcessAnalyzer_Server | Support for Windows Server 2016 (PA Service)]].&lt;br /&gt;
* 307246: Expression function to calculate conformance to BPMN.&lt;br /&gt;
* 307297: Expression language improvements - part 6.&lt;br /&gt;
* 307301: In-memory memory usage optimizations.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218306: PAPO control window is affected by analysis window&#039;s &#039;Show as&#039; setting.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218241: PA Duration Analysis In-Memory - numbers for Events and Cases too high (focus flow).&lt;br /&gt;
* 218456: Issue to install excel client (part 1).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.2 (release date 2018-03-12) ==&lt;br /&gt;
Build number: 2018.2.0.37453, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* Case Permissions have been added to the data security featureset. Case Permissions allow for limiting model visibility based on rules that reference the case attributes of a set model. Case permissions can refer to usernames or user groups, creating a link between the attributes and groups.&lt;br /&gt;
* Influence Analysis for Case Attributes has been simplified. The feature presents basic information relating to the root causes when it is opened. If further information is needed, this can be accessed via the feature menu. &lt;br /&gt;
* DataGrids support Excel exporting. You are now able to export data from fixed dashboards featuring datagrids. With this feature, you can take your data for further manipulation using Microsoft Excel.&lt;br /&gt;
* Chartview has been improved with a new layout and excel exporting. The new layout allows for quicker access to creating charts using the ChartView tool. With the exporting functionality, the views created are exported for use in presentations in Microsoft Excel.&lt;br /&gt;
* KPI Expression Language has been added with support for Influence Analysis for Case Attributes. This allows for further creation of dashboards with specific analysis result queries. Using the KPI expression language, dashboards can be made to present up-to-date data based on influence analysis results.&lt;br /&gt;
* Dataset tag support for data visualization. Adding dataset tags will help in creating more dynamic chart presentations as the data can be inserted into the JSON settings of charts and datagrids. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307220: The [[Influence_Analysis_for_Case_Attributes_(PAPO)|Influence Analysis for Case Attributes]] settings now has a toggle for showing and hiding the detail columns.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307273: [[QPR ProcessAnalyzer Web Service API#Example| PA model JSON settings]].&lt;br /&gt;
* 307269: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Case_Permissions |Case permissions]].&lt;br /&gt;
* 307261: PA InMemory core, part 8 (Path Analysis).&lt;br /&gt;
* 307282: PA KPI&#039;s and expressions (part 5).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218426: Using PAPO with customers model crashes PA Server (Entice Changes).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218371: Event types aren&#039;t provided to PAPO by PA server.&lt;br /&gt;
* 218372: Having multiple expressions in one selection item in a JSON filter does not work.&lt;br /&gt;
* 218375: Empty comparison -setting with nonempty filter -setting causes influence analysis to return incorrect results.&lt;br /&gt;
* 218380: PA Activation ends one day before the actual end date.&lt;br /&gt;
* 218362: WebService GetAnalysisAsImage does not work.&lt;br /&gt;
* 218389, 218397: Performance issues in PA in-memory core with multiple simultaneous users.&lt;br /&gt;
* 218412: PercentageNumber property is not set properly in PA analyses.&lt;br /&gt;
* 218410: Event attribute profiling event amount mismatch.&lt;br /&gt;
* 218404: Using PAPO with customers model crashes PA Server (PA changes).&lt;br /&gt;
* 218430: Pre-release mandatory PA bugfixes.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.1 (release date 2018-01-31) ==&lt;br /&gt;
Build number: 2018.1.0.37330, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* ChartView is introduced as a new QPR UI view. This interactive view allows the creation of customized charts to answer specific business needs, with measures and dimensions the user has selected. ChartView comes preloaded with numerous different presentation features for the creation of customized charts fit for any business need.&lt;br /&gt;
* New Table Filtering for Data Table Views. A new Excel-style filtering feature has been added to the different analysis features, such as Influence Analysis for Case Attributes and Event Analysis. The feature allows the presentation and comparison of different data using robust filters.&lt;br /&gt;
* The QPR UI version of QPR ProcessAnalyzer has an overhauled popup menu. Selecting different analysis and creating new filters is quicker and new icons have been added for added clarity.&lt;br /&gt;
* XES filetype importing support. The IEEE TaskForce standardized XES logs are now supported by QPR ProcessAnalyzer. This filetype aims to unify the transactional data produced by information systems and makes them usable in tools used in data analysis. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Full Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307244: The various tables (e.g. Case Analysis) in QPR ProcessAnalyzer UI received filtering functionality familiar to the one in Microsoft Excel.&lt;br /&gt;
* 307163: Popup menu improvements.&lt;br /&gt;
* 307224: Cache model information into browser side.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307271: PA InMemory core, part 7 (Canceling analysis).&lt;br /&gt;
* 307247: XES Event log file format support.&lt;br /&gt;
* 307257, 307270: PA KPI&#039;s and expressions (part 3, 4).&lt;br /&gt;
* 307211: Enable custom data sources: Selections as JSON.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218327: PAPO Grid view row selection issues when opening popup menu.&lt;br /&gt;
* 218328: PAPO Missing null check in ModelState.&lt;br /&gt;
* 218365: PAPO: Settings etc. buttons not visible in the latest chrome version (automatically updated).&lt;br /&gt;
* 218324: Fixed an issue where a dataset wasn&#039;t refreshed when a context variable was changed from PAPO.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218288: PA service installation with DeployPAService.ps1.&lt;br /&gt;
* 218291: Problem with --#GetAnalysis type 31 (filter rules).&lt;br /&gt;
* 218315: PAPO: InMemoryCore: Offline mode shows incorrect case attribute values.&lt;br /&gt;
* 217922: Filtering Flow Table with Case Attribute is too slow.&lt;br /&gt;
* 218321: PA core - Internal server error in PAPO when duration analysis result is empty.&lt;br /&gt;
* 218322: Flow analysis results not always in same order (InMemory).&lt;br /&gt;
* 218340: Not allow to delete default filter (&amp;quot;No access/Access denied&amp;quot;).&lt;br /&gt;
* 218345: Unknown filter rule. The given key was not present in the dictionary.&lt;br /&gt;
* 218363: Attribute values are sent to clients as strings from InMemory profiling analysis.&lt;br /&gt;
* 218365: PAPO: Settings etc. buttons not visible in the latest chrome version (automatically updated).&lt;br /&gt;
* 218379: PAPO: Side panels visible in multi papo even if they should be closed and invisible.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.9 (release date 2017-12-19) ==&lt;br /&gt;
Build number: 2017.9.0.37199, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The Filtering system on the WebUI has been updated. The user can now easily rename filters, add specific permissions to control privacy of the filters and delete filters easily. The filtering system has an improved interface for easier handling of the filters. &lt;br /&gt;
* New Expression language for KPI calculation. This new language allows power users to create analysis that are customized to their needs and creates the possibility for caluclating KPIs inside the server core. This JSON based language allows users to take their analysis functions even further.&lt;br /&gt;
* Other improvements in this release include performance improvements and further development of the in-memory mode.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307237: PAPO: There&#039;s now a new &amp;quot;DisabledFunctionalities&amp;quot; [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#PAPO.27s_Context_Variables|context variable for using with PAPO]] to define which PAPO functionalities should not be.&lt;br /&gt;
* 307173: It&#039;s now possible to edit the Name and Privacy of a filter in QPR ProcessAnalyzer UI, as well as delete a filter.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307235: PA InMemory core, part 5 (Flow Analysis).&lt;br /&gt;
* 307262: PA InMemory core, part 6 (Canceling model loading).&lt;br /&gt;
* 307257: PA KPI&#039;s and expressions (part 2).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218251: Multi-PAPO: Model page shows when model button of one papo has been disabled.&lt;br /&gt;
* 218275: Change PA WS methods from GET to POST.&lt;br /&gt;
* 218132: PAPO: Zoom change when item is selected from Variation Analysis.&lt;br /&gt;
* 218196: PAPO: Variation Analysis: graph bar lengths doesn&#039;t match with data.&lt;br /&gt;
* 218157: PAPO: QPR UI Graphics messed in Influence Analysis for Flowchart.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218241: Duration Analysis In-Memory - numbers for Events, Median duration and Average duration are too high.&lt;br /&gt;
* 218046: System.ArgumentException: Value of &#039;-170&#039; is not valid for &#039;red&#039;. &#039;red&#039; should be greater than or equal to 0 and less than or equal to 255.&lt;br /&gt;
* 218275: Change PA WS methods from GET to POST.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.8 (release date 2017-11-07) ==&lt;br /&gt;
Build number: 2017.8.0.37022, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The QPR UI interface features a new feature: Profiling Event Analysis. Now you can drilldown to your events and see what event attributes the event types in your data contain. You can also use this knowledge to benchmark your process.&lt;br /&gt;
* The Selection logic in the QPR UI has been updated. You no longer have to update after making a selection, as the selections are responsive and updated automatically. This leads to more responsive and effective analysis.&lt;br /&gt;
* In-Memory Engine has been improved upon, allowing for more efficient analysis for small-to-mid-size models. This update gives you improved performance in your analysis operations. This feature applies for all analysis features and improves the performance of the software immensely, giving you faster operations.&lt;br /&gt;
* The Excel Client has been preloaded with new and updated demo models that demonstrate the power of QPR ProcessAnalyzer. New Models include Healthcare and Insurance claims process models. These give you a great idea on how to utilize QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307161: When selecting items in PAPO, the &amp;quot;Selected&amp;quot; context variables are now updated without the need to explicitly do the update. As a result, the &amp;quot;Select into UI Context&amp;quot; item was removed from the PAPO popup menu. This means that the TempSelectedActivities, TempSelectedTransitions, TempSelectedVariations, and TempSelectedCounts context variables were removed, and their functionality changed to be in the SelectedActivities, SelectedTransitions, SelectedVariations, and SelectedCounts context variables.&lt;br /&gt;
* 307061: PAPO now has the [[Profiling_Analysis_(PAPO)#Profiling_Event_Analysis|Profiling Event Analysis]] available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307219: Excel client demo model changes.&lt;br /&gt;
* 307216: To improve performance, QPR ProcessAnalyzer can now be configured to run the analyses in the server memory instead of the database.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218060: PAPO doesn&#039;t add transition duration but case duration filter rule type when Duration analysis shows transition duration.&lt;br /&gt;
* 218039: PAPO: Analysis window has incorrect width when opening view (splitter issue).&lt;br /&gt;
* 218036: PAPO: Web UI shows archived/recycled PA models.&lt;br /&gt;
* 218100: PAPO: Once Analysis view show &amp;quot;No records to display&amp;quot; message, then switch to other analysis view is not possible for current model.&lt;br /&gt;
* 218159: PAPO: Popup menus don&#039;t work in tabular analyses in IE11.&lt;br /&gt;
* 218169: PAPO: SelectedAttributeType parameter in PA request has invalid value when switching model and applying filter that requires model change.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218148: InMemory: Include Only Event Types does not work with sampled models.&lt;br /&gt;
* 218179: InMemory: Amount of cases in Duration analysis when flow is selected.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.7 (release date 2017-09-25) ==&lt;br /&gt;
Build number: 2017.7.0.36871 &amp;lt;s&amp;gt;36762&amp;lt;/s&amp;gt;, Model compatibility version: 2, Database version: 57, Stream version: 7. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* New In-Memory core for Process Analysis calculation. This server-side improvement can improve Analysis Performance speed up to 20 times faster than previous releases. This is achieved by offloading the memory functions directly to the application server where in the previous versions of the software, the SQL server handledthe workload.&lt;br /&gt;
* This release also features different bug fixes and performance improvements, aiming to improve your process analysis experience. Combining these features with the new WebUI platform release, the implementation of your data for analysis and improvement is smoother than ever.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307060: CSS styling and grid configuration improvements (technical feature).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 217986: The pie (in profiling analysis) is rendered initially too small.&lt;br /&gt;
* 217721: One extra scroll position / zoom -history entry created when PAPO is initialized. &lt;br /&gt;
* 218052: Flowchart shows incorrect duration. &lt;br /&gt;
* 217978: Profiling analysis is empty in Analysis window when opening splitter again. &lt;br /&gt;
* 217926: Duration Analysis in control window doesn&#039;t select all &amp;quot;other&amp;quot; cases. &lt;br /&gt;
* 217708: It is not possible to make multiselection using radial graph. &lt;br /&gt;
* 218043: Issue with AnalysisWindowSize context variable. &lt;br /&gt;
* 218058: Profiling Analysis for Case Attributes doesn&#039;t work when using numerical case attribute. &lt;br /&gt;
* 218035: Switch model from filter: Error processing PA request. Invalid column name &#039;CA_VALUE_1290462&#039;. &lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218024: Add log writing to odbc query.&lt;br /&gt;
* 217836: Error when opening filter in customer environment.&lt;br /&gt;
* 217995: ImportCaseAttributes command does not import cases properly.&lt;br /&gt;
* 218094: PA error text doesn&#039;t have information which value have problem.&lt;br /&gt;
* 218145: Input String was not in the correct format error when opening customer model.&lt;br /&gt;
&lt;br /&gt;
==  QPR ProcessAnalyzer 2017.6 (release date 2017-08-15) ==&lt;br /&gt;
Build number: 2017.6.0.36561, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The major feature of this release is the support for Multiwindow Process Analysis. Need to create new, custom views for specific analysis? It&#039;s now possible with the customizable dashboards offered.&lt;br /&gt;
* If you want to take dashboard customization even further, you can now add SVG Backgrounds to views and panels. You can make your dashboards look more impressive by adding a SVG image to it.&lt;br /&gt;
* For powerful analysis, the new version offers a table view for Profiling Analysis. For larger datasets with multiple attributes, this is an extremely useful feature as you can easily profile the data with the table.&lt;br /&gt;
* If you want to do accurate lead time analysis, you will find the table view for Duration Analysis very useful. The data presented in the tables offers you accurate data and can be used for further analysis.&lt;br /&gt;
* Managing navigation and creating links for dashboards has been furthered with the addition of Identifier Support. You can now give your dashboards identifiers that you choose, making your dashboard management much easier.&lt;br /&gt;
* For more under the hood features, we implemented  dynamic tag support. Dynamic tags allow you to add functional behaviour to dashboards by specifying set context variables. This will lead to more responsive dashboards!&lt;br /&gt;
* Finally, we redesigned the zoom buttons. Not only did we redesign the buttons, but we implemented into the analysis window! By adding a zoom button to the analysis window, we now offer you the chance more control on the visualization of the analysis.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Features:&#039;&#039;&#039;&lt;br /&gt;
* 307063: The [[Profiling_Analysis_(PAPO)|Profiling Analysis]] can now be shown as a table.&lt;br /&gt;
* 307012: The zoom button look was changed.&lt;br /&gt;
* 307064: The [[Duration_Analysis_(PAPO)|Duration Analysis]] can now be shown as a table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 218010: Sample files are missing from PA Excel Client.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 218005: The Profiling Analysis case attribute selection was reset to the default value after applying a filter.&lt;br /&gt;
* 217876: The flowchart was not centered after being opened in the {{DriverNameForTheDay}} window.&lt;br /&gt;
* 217934: Fixed an issue where the &amp;quot;Limit to&amp;quot; field in the analysis settings could be used to enter unacceptable values and could display negative values.&lt;br /&gt;
* 218028: The Model and Analysis buttons were shown in the {{DriverNameForTheDay}} and {{AnalysisNameForTheDay}} windows even when the windows were hidden by using the splitter.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.5 (release date 2017-07-06) ==&lt;br /&gt;
Build number: 2017.5.0.36503, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Features:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 307067: The [[Variation_Analysis (PAPO)|Variation Analysis]] in QPR ProcessAnalyzer Presentation Object can now be run in the {{DriverNameForTheDay}} window.&amp;lt;br&amp;gt;&lt;br /&gt;
* 307021: The QPR ProcessAnalyzer Presentation Object now has [[Case_Analysis_(PAPO)|Case Analysis]].&amp;lt;br&amp;gt;&lt;br /&gt;
* 307020: The QPR ProcessAnalyzer Presentation Object now has [[Event_Analysis_(PAPO)|Event Analysis]].&amp;lt;br&amp;gt;&lt;br /&gt;
* 307058: The QPR ProcessAnalyzer Presentation Object now has [[Event_Type_Analysis_(PAPO)|Event Type Analysis]].&amp;lt;br&amp;gt;&lt;br /&gt;
* 307105: PAPO: In the Flowchart analysis, some terms, default values, and button visibility were changed.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217925: &#039;SelectedCaseAttributeTypes&#039; is not supported in --#CreateFilter.&lt;br /&gt;
* 217710: Copyright shows 2016.&lt;br /&gt;
* 217973: PAPO now uses the web browser&#039;s date and number formatting when showing date and numbers in data grids/tables.&amp;lt;br&amp;gt;&lt;br /&gt;
* 217946: Fixed an issue in PAPO, where the table grid didn&#039;t fit the window after switching from Offline Mode to normal mode on Case analysis&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.4 (release date 2017-05-23) ==&lt;br /&gt;
Build number: 2017.4.0.36424, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Features:&#039;&#039;&#039;&lt;br /&gt;
* 307022: The Profiling Analysis can now be used in the Control window in the [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#QPR_ProcessAnalyzer_Presentation_Object_.28PAPO.29|QPR ProcessAnalyzer Presentation Object]] to select cases for the analysis in the Analysis window.&amp;lt;br&amp;gt;&lt;br /&gt;
* 307003: The buttons in the [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#QPR_ProcessAnalyzer_Presentation_Object_.28PAPO.29|QPR ProcessAnalyzer Presentation Object (PAPO)]] were rearranged.&amp;lt;br&amp;gt;&lt;br /&gt;
* 307057: The Duration, Profiling, Influence, and Variation Analyses in [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#QPR_ProcessAnalyzer_Presentation_Object_.28PAPO.29|QPR ProcessAnalyzer Presentation Object]] now have generic and some analysis specific settings supported.&amp;lt;br&amp;gt;&lt;br /&gt;
* 306969: The QPR ProcessAnalyzer Presentation Object now supports the [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#Influence_Analysis_for_Case_Attributes|Influence Analysis for Case Attributes]] in the grid format.&lt;br /&gt;
* 307030: [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#Duration_Analysis|Duration Analysis]] can now be used in the {{DriverNameForTheDay}} window of the QPR ProcessAnalyzer Presentation Object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PA Features:&#039;&#039;&#039;&lt;br /&gt;
* 403516: Consolidate event names in PA example Excels (SAP_OrderToCash.xlsx, SAP_OrderToCash v2.xlsx and SAP_OrderToCash_Extended.xlsx).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217845: Create Filter from CaseAttributeTrends with PA script doesn&#039;t work.&lt;br /&gt;
* 217830: Tab delimiter is not taken into use when datatable imported.&lt;br /&gt;
* 217902: SqlException thrown when opening influence analysis on a filter without any case attributes.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.3 (release date 2017-04-11) ==&lt;br /&gt;
Build number: 2017.3.0.36338 &amp;lt;s&amp;gt;36324&amp;lt;/s&amp;gt;, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features:&#039;&#039;&#039;&lt;br /&gt;
* 305862: There now are new StartTime Limit and Maximum Text Length settings to be used with the [[Operation Log]] and the Operation Log Analysis [[QPR ProcessAnalyzer Scripting Commands#--.23GetAnalysis|GetAnalysis]] script command.&lt;br /&gt;
* 306983: PAPO - Highlight selected flow label in flowchart: selected flow labels are now clearly visible on the flowchart. Selected objects are highlighted on the flowchart.&lt;br /&gt;
* 306986 &amp;amp; 307017: The QPR ProcessAnalyzer Presentation Object (PAPO) now has a new [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#Control_Window_and_Analysis_Window|window system]].&lt;br /&gt;
* 306987: PAPO - in-memory Variation analysis:  Variation analysis is now supported in in-memory mode.&lt;br /&gt;
* 307000: The model shown in the QPR ProcessAnalyzer Presentation Object (PAPO) can now be changed via a menu.&lt;br /&gt;
* 306999: The Start and End symbols in the QPR ProcessAnalyzer Presentation Object (PAPO) flowchart were updated.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217679: PA cannot add new case Attribute values to exising case via Excel if CaseId starts with leading zero.&lt;br /&gt;
* 217790: Filtering is too slow.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.2 (release date 2017-02-28) ==&lt;br /&gt;
Build number: 2017.2.0.36218, Model compatibility version: 2, Database version: 56, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features:&#039;&#039;&#039;&lt;br /&gt;
* 306966: Performance optimizations into PA database.&lt;br /&gt;
* 306930: Improved messages to SQL Queries.&lt;br /&gt;
* 306910: Implement importSalesforceQuery support for TLS 1.1. Note that the support from PA Salesforce Integration service has been discontinued.&lt;br /&gt;
* 306964: Make it possible to transfer the contents of a filter efficiently to UI.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217605: Operation log throws some exception.&lt;br /&gt;
* 217546: Slow access to project by project name. ETL parameter: (SELECT &#039;ProjectName&#039;, &#039;name&#039;).&lt;br /&gt;
* 217363: ScriptLauncher should LogOff.&lt;br /&gt;
* 217618, 217636: PA Excel Client doesn&#039;t connect to PA Server when Windows performance counter is not accessible (part 1 and 2).&lt;br /&gt;
* 217650: System.DBNull objects returned from event analysis when IncludeCaseAttributeValues is used.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.1 (release date 2017-01-16) ==&lt;br /&gt;
Build number: 2017.1.0.36111, Model compatibility version: 2, Database version: 55, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 306899: The [[QPR ProcessAnalyzer Scripting Commands#--.23SendEmail|SendEmail]] script command now supports sending attachments.&lt;br /&gt;
* 306896: A [[Open R in QPR ProcessAnalyzer#Case_Prediction_Example_Script|case prediction Open R example script]] was added to QPR ProcessAnalyzer wiki.&lt;br /&gt;
* 306484: There is now a new [[QPR ProcessAnalyzer Scripting Commands#--.23ImportEventsIncremental|ImportEventsIncremental]] script command for synchronizing event data between a data table that holds event data and the specified model.&lt;br /&gt;
* 306906: The [[Script Log]] entries are now written to the database at the same time as the script is being run. There is also a new Script Log Report analysis type for the [[QPR ProcessAnalyzer Scripting Commands#--.23GetAnalysis|GetAnalysis]] script command for administrators to access script logs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217526: Log entries written as errors even if they are not.&lt;br /&gt;
* 217545: Session expires exceedingly often in a service deployed in AWS behind load balancer.&lt;br /&gt;
* 217591: Special characters in PA script parameters cause script to fail and hide the actual root cause of the failure.&lt;br /&gt;
&lt;br /&gt;
== Old Releases ==&lt;br /&gt;
See older releases in [[QPR ProcessAnalyzer Release Archive]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Release_Notes&amp;diff=10580</id>
		<title>QPR ProcessAnalyzer Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=QPR_ProcessAnalyzer_Release_Notes&amp;diff=10580"/>
		<updated>2018-08-27T06:55:06Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Next Release: QPR ProcessAnalyzer 2018.6 (planned release date 2018-08-28) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists new features and fixed issues for each QPR ProcessAnalyzer release. For information on the compatibility of different versions, see [[QPR ProcessAnalyzer Version Compatibility Matrix|Version Compatibility Matrix]]. Contact [mailto:customercare@qpr.com? QPR Customer Care] if you need more information.&lt;br /&gt;
&lt;br /&gt;
== Next Release: QPR ProcessAnalyzer 2018.6 (planned release date 2018-08-28) ==&lt;br /&gt;
Build number: 2018.6.0.37869, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307351: KPI analysis UI - part 2 (client side).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307323: [[PA Migration to 2018.6 |Remove old PA web client]] .&lt;br /&gt;
* 307200: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Necessary_IIS_setup |PA model management: PA model automatic loading on startup]].	&lt;br /&gt;
* 307350: KPI analysis UI - part 2 (server side).&lt;br /&gt;
* 307208: PA model management: PA model status information to expression language.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218391: PA UI Flowchart selection does not clear automatically.&lt;br /&gt;
* 218606: Edit mode is ON  &amp;gt; Floating Action Buttons are not clickable.&lt;br /&gt;
* 218626: PAPO: some popup menus are not closed properly in IE 11.&lt;br /&gt;
* 218607: PAPO: popup menu is not displayed in IE 11.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218597: PA Exception details show null in QPR UI.&lt;br /&gt;
* 218575: Incorrect results in conformance analysis calculation. &lt;br /&gt;
* 218540: KPI analysis not working properly.&lt;br /&gt;
* 218314: Variation analysis shows duplicate variations if there are excluded event types.&lt;br /&gt;
* 218604: PA Excel client does not log enough during connection creation.&lt;br /&gt;
* 218624: Estimatedmemory not calculated correctly when model not have events.&lt;br /&gt;
* 218396: KPI analysis - ApplyAnalysisFilters. InvalidOperationException: Sequence contains no elements.´&lt;br /&gt;
* 218628: PAPO: Error popup appears, &amp;quot;Error processing QPR ProcessAnalyzer request.&lt;br /&gt;
* 218631: Performance improvements (Path analysis was slow).&lt;br /&gt;
* 218485: ProcessAnalyzer Excel client cannot be removed from Programs and Features, as it wont show up there.&lt;br /&gt;
* 217775: GetAnalysis(18) should write a progress log entry after each chunk.&lt;br /&gt;
* 217653: SQL command not in log when ODBC connection failed.&lt;br /&gt;
&lt;br /&gt;
== Latest Release: QPR ProcessAnalyzer 2018.5 (release date 2018-07-17) ==&lt;br /&gt;
Build number: 2018.5.0.37716, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights&#039;&#039;&#039;&lt;br /&gt;
*QPR ProcessAnalyzer Deployment Package for QPR UI: The new version comes with preloaded QPR UI views that can instantly kickstart your Process Mining experience. These views are readymade and require no extra configuration. These views introduce new functionalities, such as ready made conformance views, for deploying a more varied Process Mining offering. &lt;br /&gt;
*New Dashboard Design features: Panels can be now instantly developed and evaluated in viewer mode, allowing for a more powerful dashboard creation. The object placing logic has been overhauled, allowing for new options in creating dashboards. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307338: [[QPR_ProcessAnalyzer_API:_ResetModelCache | Web service support to load and drop PA models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218536: PAPO: KPI Analysis should not be available from Control Windows.&lt;br /&gt;
* 218519: The numerical values in QPR ProcessAnalyzer Influence Analysis were aligned to the left.&lt;br /&gt;
* 217888: Selection lost from influence analysis table when user slightly adjusts browser window or panel/presentation object window size.&lt;br /&gt;
* 218465: PAPO: Newly created filters are not displayed in the list.&lt;br /&gt;
* 218556: PAPO: An unnecessary vertical scrollbar was shown after PAPO Case Analysis was resized.&lt;br /&gt;
* 218520: PAPO: Filter does not recognize decimal separators.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218537: ODBC xlsx loading failed with data format issue.&lt;br /&gt;
* 218495: Changing default filter does not drop cached model information.&lt;br /&gt;
* 218550: Accessing projects from expression language fails in some cases.&lt;br /&gt;
* 218549: Datatable import from Excel sheet data corruption if first column value is empty.&lt;br /&gt;
* 218558: Errors in default.aspx. Login fails.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.4 (release date 2018-06-11) ==&lt;br /&gt;
Build number: 2018.4.0.37669, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* ODBC driver support for QPR ProcessAnalyzer: Use external data sources to create a dynamic model that is updated every time the model is loaded. Using the ODBC driver, the model data can be accessed from a separate data source. All the event data information can be defined in JSON format allowing for automatic model creation.&lt;br /&gt;
* KPI Analysis: A new analysis is added to QPR ProcessAnalyzer. KPI Analysis utilizes the KPI expression engine for creating visualizations of data. KPI Analysis is a fully fledged analysis that can be used in conjuction with the existing QPR ProcessAnalyzer analysis for more focused results. In addition, KPI Analysis is available as a separate QPR UI view for creation of dashboards that present real-time data taken from QPR ProcessAnalyzer.&lt;br /&gt;
* Tabular Analysis results updated with data types: Analysis featuring tabulated data are now automatically updated with correct data types. Automatic data types allow for exporting the data in a format that can be used in other compatible tools as the data types are automatically defined into the data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307265: [[KPI Analysis|KPI analysis UI]] - part 1 (KPI).&lt;br /&gt;
* 307278: The tabular analyses (e.g. Case analysis) in QPR ProcessAnalyzer UI now have the correct column data types based on the information from the QPR ProcessAnalyzer server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307204: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Model Datasources|Load PA model from ODBC datasource]].&lt;br /&gt;
* 307313: Expression language improvements - part 7 (performance).&lt;br /&gt;
* 307317: Update new [[QPR_End_User_Software_License_Agreement|EULA]] to QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218487: Influence analysis for Flowchart changes the flowchart settings.&lt;br /&gt;
* 218498: No history entry is created while changing visibility threshold via stepper or context variable.&lt;br /&gt;
* 218508: PAPO variation analysis should limit the queried number of variations.&lt;br /&gt;
* 218513: PAPO settings buttons cover analysis content.&lt;br /&gt;
* 218532: PAPO: Profiling analysis does not work with data loaded via ODBC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218515: IIS crashes in kernel during Odbc query reading csv/xlsx file with Microsoft Access Text Driver and Microsoft Excel Driver.&lt;br /&gt;
* 218484: ImportEvents fails in StartBackground mode.&lt;br /&gt;
* 218525: InMemory CaseAnalysis ShowAllCases not work if there is cases without events.&lt;br /&gt;
* 218463: Issue to install excel client (part 2).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.3 (release date 2018-04-23) ==&lt;br /&gt;
Build number: 2018.3.0.37545, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
*Conformance Checking is supported in QPR ProcessAnalyzer. Using the KPI Expression Language as a basis, process mining models can be compared to BPMN notation and analyzed if the process data conforms to the BPMN design. These results are implemented in ChartView and KPI Expression Language allows them to be implemented into dashboards.&lt;br /&gt;
*BPMN Editor has been added to ChartView. You can now import and design BPMN process maps for use in conformance analysis. The BPMN editor is a web component that is used in the browser, allowing for quick and easy process design. The designs can also be exported for further use.&lt;br /&gt;
*Flowchart Visibility Settings have been overhauled with a new visual presentation. New stepper elements allow for more flexible flow threshold settings while maintaining a user-friendly approach.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307276: Remove PAPO Offline mode.&lt;br /&gt;
* 307193 &amp;amp; 307298: The [[Flowchart_Analysis_(PAPO)#Visibility_Settings|Flowchart Visibility Settings]] were improved.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307077: [[QPR_ProcessAnalyzer_System_Requirements#System_Requirements_for_QPR_ProcessAnalyzer_Server | Support for Windows Server 2016 (PA Service)]].&lt;br /&gt;
* 307246: Expression function to calculate conformance to BPMN.&lt;br /&gt;
* 307297: Expression language improvements - part 6.&lt;br /&gt;
* 307301: In-memory memory usage optimizations.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218306: PAPO control window is affected by analysis window&#039;s &#039;Show as&#039; setting.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218241: PA Duration Analysis In-Memory - numbers for Events and Cases too high (focus flow).&lt;br /&gt;
* 218456: Issue to install excel client (part 1).&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.2 (release date 2018-03-12) ==&lt;br /&gt;
Build number: 2018.2.0.37453, Model compatibility version: 2, Database version: 58, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* Case Permissions have been added to the data security featureset. Case Permissions allow for limiting model visibility based on rules that reference the case attributes of a set model. Case permissions can refer to usernames or user groups, creating a link between the attributes and groups.&lt;br /&gt;
* Influence Analysis for Case Attributes has been simplified. The feature presents basic information relating to the root causes when it is opened. If further information is needed, this can be accessed via the feature menu. &lt;br /&gt;
* DataGrids support Excel exporting. You are now able to export data from fixed dashboards featuring datagrids. With this feature, you can take your data for further manipulation using Microsoft Excel.&lt;br /&gt;
* Chartview has been improved with a new layout and excel exporting. The new layout allows for quicker access to creating charts using the ChartView tool. With the exporting functionality, the views created are exported for use in presentations in Microsoft Excel.&lt;br /&gt;
* KPI Expression Language has been added with support for Influence Analysis for Case Attributes. This allows for further creation of dashboards with specific analysis result queries. Using the KPI expression language, dashboards can be made to present up-to-date data based on influence analysis results.&lt;br /&gt;
* Dataset tag support for data visualization. Adding dataset tags will help in creating more dynamic chart presentations as the data can be inserted into the JSON settings of charts and datagrids. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307220: The [[Influence_Analysis_for_Case_Attributes_(PAPO)|Influence Analysis for Case Attributes]] settings now has a toggle for showing and hiding the detail columns.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307273: [[QPR ProcessAnalyzer Web Service API#Example| PA model JSON settings]].&lt;br /&gt;
* 307269: [[QPR_ProcessAnalyzer_Model_JSON_Settings#Case_Permissions |Case permissions]].&lt;br /&gt;
* 307261: PA InMemory core, part 8 (Path Analysis).&lt;br /&gt;
* 307282: PA KPI&#039;s and expressions (part 5).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218426: Using PAPO with customers model crashes PA Server (Entice Changes).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218371: Event types aren&#039;t provided to PAPO by PA server.&lt;br /&gt;
* 218372: Having multiple expressions in one selection item in a JSON filter does not work.&lt;br /&gt;
* 218375: Empty comparison -setting with nonempty filter -setting causes influence analysis to return incorrect results.&lt;br /&gt;
* 218380: PA Activation ends one day before the actual end date.&lt;br /&gt;
* 218362: WebService GetAnalysisAsImage does not work.&lt;br /&gt;
* 218389, 218397: Performance issues in PA in-memory core with multiple simultaneous users.&lt;br /&gt;
* 218412: PercentageNumber property is not set properly in PA analyses.&lt;br /&gt;
* 218410: Event attribute profiling event amount mismatch.&lt;br /&gt;
* 218404: Using PAPO with customers model crashes PA Server (PA changes).&lt;br /&gt;
* 218430: Pre-release mandatory PA bugfixes.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2018.1 (release date 2018-01-31) ==&lt;br /&gt;
Build number: 2018.1.0.37330, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* ChartView is introduced as a new QPR UI view. This interactive view allows the creation of customized charts to answer specific business needs, with measures and dimensions the user has selected. ChartView comes preloaded with numerous different presentation features for the creation of customized charts fit for any business need.&lt;br /&gt;
* New Table Filtering for Data Table Views. A new Excel-style filtering feature has been added to the different analysis features, such as Influence Analysis for Case Attributes and Event Analysis. The feature allows the presentation and comparison of different data using robust filters.&lt;br /&gt;
* The QPR UI version of QPR ProcessAnalyzer has an overhauled popup menu. Selecting different analysis and creating new filters is quicker and new icons have been added for added clarity.&lt;br /&gt;
* XES filetype importing support. The IEEE TaskForce standardized XES logs are now supported by QPR ProcessAnalyzer. This filetype aims to unify the transactional data produced by information systems and makes them usable in tools used in data analysis. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Full Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307244: The various tables (e.g. Case Analysis) in QPR ProcessAnalyzer UI received filtering functionality familiar to the one in Microsoft Excel.&lt;br /&gt;
* 307163: Popup menu improvements.&lt;br /&gt;
* 307224: Cache model information into browser side.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307271: PA InMemory core, part 7 (Canceling analysis).&lt;br /&gt;
* 307247: XES Event log file format support.&lt;br /&gt;
* 307257, 307270: PA KPI&#039;s and expressions (part 3, 4).&lt;br /&gt;
* 307211: Enable custom data sources: Selections as JSON.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218327: PAPO Grid view row selection issues when opening popup menu.&lt;br /&gt;
* 218328: PAPO Missing null check in ModelState.&lt;br /&gt;
* 218365: PAPO: Settings etc. buttons not visible in the latest chrome version (automatically updated).&lt;br /&gt;
* 218324: Fixed an issue where a dataset wasn&#039;t refreshed when a context variable was changed from PAPO.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218288: PA service installation with DeployPAService.ps1.&lt;br /&gt;
* 218291: Problem with --#GetAnalysis type 31 (filter rules).&lt;br /&gt;
* 218315: PAPO: InMemoryCore: Offline mode shows incorrect case attribute values.&lt;br /&gt;
* 217922: Filtering Flow Table with Case Attribute is too slow.&lt;br /&gt;
* 218321: PA core - Internal server error in PAPO when duration analysis result is empty.&lt;br /&gt;
* 218322: Flow analysis results not always in same order (InMemory).&lt;br /&gt;
* 218340: Not allow to delete default filter (&amp;quot;No access/Access denied&amp;quot;).&lt;br /&gt;
* 218345: Unknown filter rule. The given key was not present in the dictionary.&lt;br /&gt;
* 218363: Attribute values are sent to clients as strings from InMemory profiling analysis.&lt;br /&gt;
* 218365: PAPO: Settings etc. buttons not visible in the latest chrome version (automatically updated).&lt;br /&gt;
* 218379: PAPO: Side panels visible in multi papo even if they should be closed and invisible.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.9 (release date 2017-12-19) ==&lt;br /&gt;
Build number: 2017.9.0.37199, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The Filtering system on the WebUI has been updated. The user can now easily rename filters, add specific permissions to control privacy of the filters and delete filters easily. The filtering system has an improved interface for easier handling of the filters. &lt;br /&gt;
* New Expression language for KPI calculation. This new language allows power users to create analysis that are customized to their needs and creates the possibility for caluclating KPIs inside the server core. This JSON based language allows users to take their analysis functions even further.&lt;br /&gt;
* Other improvements in this release include performance improvements and further development of the in-memory mode.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307237: PAPO: There&#039;s now a new &amp;quot;DisabledFunctionalities&amp;quot; [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#PAPO.27s_Context_Variables|context variable for using with PAPO]] to define which PAPO functionalities should not be.&lt;br /&gt;
* 307173: It&#039;s now possible to edit the Name and Privacy of a filter in QPR ProcessAnalyzer UI, as well as delete a filter.&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307235: PA InMemory core, part 5 (Flow Analysis).&lt;br /&gt;
* 307262: PA InMemory core, part 6 (Canceling model loading).&lt;br /&gt;
* 307257: PA KPI&#039;s and expressions (part 2).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218251: Multi-PAPO: Model page shows when model button of one papo has been disabled.&lt;br /&gt;
* 218275: Change PA WS methods from GET to POST.&lt;br /&gt;
* 218132: PAPO: Zoom change when item is selected from Variation Analysis.&lt;br /&gt;
* 218196: PAPO: Variation Analysis: graph bar lengths doesn&#039;t match with data.&lt;br /&gt;
* 218157: PAPO: QPR UI Graphics messed in Influence Analysis for Flowchart.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218241: Duration Analysis In-Memory - numbers for Events, Median duration and Average duration are too high.&lt;br /&gt;
* 218046: System.ArgumentException: Value of &#039;-170&#039; is not valid for &#039;red&#039;. &#039;red&#039; should be greater than or equal to 0 and less than or equal to 255.&lt;br /&gt;
* 218275: Change PA WS methods from GET to POST.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.8 (release date 2017-11-07) ==&lt;br /&gt;
Build number: 2017.8.0.37022, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The QPR UI interface features a new feature: Profiling Event Analysis. Now you can drilldown to your events and see what event attributes the event types in your data contain. You can also use this knowledge to benchmark your process.&lt;br /&gt;
* The Selection logic in the QPR UI has been updated. You no longer have to update after making a selection, as the selections are responsive and updated automatically. This leads to more responsive and effective analysis.&lt;br /&gt;
* In-Memory Engine has been improved upon, allowing for more efficient analysis for small-to-mid-size models. This update gives you improved performance in your analysis operations. This feature applies for all analysis features and improves the performance of the software immensely, giving you faster operations.&lt;br /&gt;
* The Excel Client has been preloaded with new and updated demo models that demonstrate the power of QPR ProcessAnalyzer. New Models include Healthcare and Insurance claims process models. These give you a great idea on how to utilize QPR ProcessAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307161: When selecting items in PAPO, the &amp;quot;Selected&amp;quot; context variables are now updated without the need to explicitly do the update. As a result, the &amp;quot;Select into UI Context&amp;quot; item was removed from the PAPO popup menu. This means that the TempSelectedActivities, TempSelectedTransitions, TempSelectedVariations, and TempSelectedCounts context variables were removed, and their functionality changed to be in the SelectedActivities, SelectedTransitions, SelectedVariations, and SelectedCounts context variables.&lt;br /&gt;
* 307061: PAPO now has the [[Profiling_Analysis_(PAPO)#Profiling_Event_Analysis|Profiling Event Analysis]] available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 307219: Excel client demo model changes.&lt;br /&gt;
* 307216: To improve performance, QPR ProcessAnalyzer can now be configured to run the analyses in the server memory instead of the database.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 218060: PAPO doesn&#039;t add transition duration but case duration filter rule type when Duration analysis shows transition duration.&lt;br /&gt;
* 218039: PAPO: Analysis window has incorrect width when opening view (splitter issue).&lt;br /&gt;
* 218036: PAPO: Web UI shows archived/recycled PA models.&lt;br /&gt;
* 218100: PAPO: Once Analysis view show &amp;quot;No records to display&amp;quot; message, then switch to other analysis view is not possible for current model.&lt;br /&gt;
* 218159: PAPO: Popup menus don&#039;t work in tabular analyses in IE11.&lt;br /&gt;
* 218169: PAPO: SelectedAttributeType parameter in PA request has invalid value when switching model and applying filter that requires model change.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218148: InMemory: Include Only Event Types does not work with sampled models.&lt;br /&gt;
* 218179: InMemory: Amount of cases in Duration analysis when flow is selected.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.7 (release date 2017-09-25) ==&lt;br /&gt;
Build number: 2017.7.0.36871 &amp;lt;s&amp;gt;36762&amp;lt;/s&amp;gt;, Model compatibility version: 2, Database version: 57, Stream version: 7. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* New In-Memory core for Process Analysis calculation. This server-side improvement can improve Analysis Performance speed up to 20 times faster than previous releases. This is achieved by offloading the memory functions directly to the application server where in the previous versions of the software, the SQL server handledthe workload.&lt;br /&gt;
* This release also features different bug fixes and performance improvements, aiming to improve your process analysis experience. Combining these features with the new WebUI platform release, the implementation of your data for analysis and improvement is smoother than ever.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features for QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 307060: CSS styling and grid configuration improvements (technical feature).&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer UI:&#039;&#039;&#039;&lt;br /&gt;
* 217986: The pie (in profiling analysis) is rendered initially too small.&lt;br /&gt;
* 217721: One extra scroll position / zoom -history entry created when PAPO is initialized. &lt;br /&gt;
* 218052: Flowchart shows incorrect duration. &lt;br /&gt;
* 217978: Profiling analysis is empty in Analysis window when opening splitter again. &lt;br /&gt;
* 217926: Duration Analysis in control window doesn&#039;t select all &amp;quot;other&amp;quot; cases. &lt;br /&gt;
* 217708: It is not possible to make multiselection using radial graph. &lt;br /&gt;
* 218043: Issue with AnalysisWindowSize context variable. &lt;br /&gt;
* 218058: Profiling Analysis for Case Attributes doesn&#039;t work when using numerical case attribute. &lt;br /&gt;
* 218035: Switch model from filter: Error processing PA request. Invalid column name &#039;CA_VALUE_1290462&#039;. &lt;br /&gt;
&#039;&#039;&#039;Fixed bugs in QPR ProcessAnalyzer Server:&#039;&#039;&#039;&lt;br /&gt;
* 218024: Add log writing to odbc query.&lt;br /&gt;
* 217836: Error when opening filter in customer environment.&lt;br /&gt;
* 217995: ImportCaseAttributes command does not import cases properly.&lt;br /&gt;
* 218094: PA error text doesn&#039;t have information which value have problem.&lt;br /&gt;
* 218145: Input String was not in the correct format error when opening customer model.&lt;br /&gt;
&lt;br /&gt;
==  QPR ProcessAnalyzer 2017.6 (release date 2017-08-15) ==&lt;br /&gt;
Build number: 2017.6.0.36561, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Release Highlights:&#039;&#039;&#039;&lt;br /&gt;
* The major feature of this release is the support for Multiwindow Process Analysis. Need to create new, custom views for specific analysis? It&#039;s now possible with the customizable dashboards offered.&lt;br /&gt;
* If you want to take dashboard customization even further, you can now add SVG Backgrounds to views and panels. You can make your dashboards look more impressive by adding a SVG image to it.&lt;br /&gt;
* For powerful analysis, the new version offers a table view for Profiling Analysis. For larger datasets with multiple attributes, this is an extremely useful feature as you can easily profile the data with the table.&lt;br /&gt;
* If you want to do accurate lead time analysis, you will find the table view for Duration Analysis very useful. The data presented in the tables offers you accurate data and can be used for further analysis.&lt;br /&gt;
* Managing navigation and creating links for dashboards has been furthered with the addition of Identifier Support. You can now give your dashboards identifiers that you choose, making your dashboard management much easier.&lt;br /&gt;
* For more under the hood features, we implemented  dynamic tag support. Dynamic tags allow you to add functional behaviour to dashboards by specifying set context variables. This will lead to more responsive dashboards!&lt;br /&gt;
* Finally, we redesigned the zoom buttons. Not only did we redesign the buttons, but we implemented into the analysis window! By adding a zoom button to the analysis window, we now offer you the chance more control on the visualization of the analysis.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Features:&#039;&#039;&#039;&lt;br /&gt;
* 307063: The [[Profiling_Analysis_(PAPO)|Profiling Analysis]] can now be shown as a table.&lt;br /&gt;
* 307012: The zoom button look was changed.&lt;br /&gt;
* 307064: The [[Duration_Analysis_(PAPO)|Duration Analysis]] can now be shown as a table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 218010: Sample files are missing from PA Excel Client.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 218005: The Profiling Analysis case attribute selection was reset to the default value after applying a filter.&lt;br /&gt;
* 217876: The flowchart was not centered after being opened in the {{DriverNameForTheDay}} window.&lt;br /&gt;
* 217934: Fixed an issue where the &amp;quot;Limit to&amp;quot; field in the analysis settings could be used to enter unacceptable values and could display negative values.&lt;br /&gt;
* 218028: The Model and Analysis buttons were shown in the {{DriverNameForTheDay}} and {{AnalysisNameForTheDay}} windows even when the windows were hidden by using the splitter.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.5 (release date 2017-07-06) ==&lt;br /&gt;
Build number: 2017.5.0.36503, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Features:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 307067: The [[Variation_Analysis (PAPO)|Variation Analysis]] in QPR ProcessAnalyzer Presentation Object can now be run in the {{DriverNameForTheDay}} window.&amp;lt;br&amp;gt;&lt;br /&gt;
* 307021: The QPR ProcessAnalyzer Presentation Object now has [[Case_Analysis_(PAPO)|Case Analysis]].&amp;lt;br&amp;gt;&lt;br /&gt;
* 307020: The QPR ProcessAnalyzer Presentation Object now has [[Event_Analysis_(PAPO)|Event Analysis]].&amp;lt;br&amp;gt;&lt;br /&gt;
* 307058: The QPR ProcessAnalyzer Presentation Object now has [[Event_Type_Analysis_(PAPO)|Event Type Analysis]].&amp;lt;br&amp;gt;&lt;br /&gt;
* 307105: PAPO: In the Flowchart analysis, some terms, default values, and button visibility were changed.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217925: &#039;SelectedCaseAttributeTypes&#039; is not supported in --#CreateFilter.&lt;br /&gt;
* 217710: Copyright shows 2016.&lt;br /&gt;
* 217973: PAPO now uses the web browser&#039;s date and number formatting when showing date and numbers in data grids/tables.&amp;lt;br&amp;gt;&lt;br /&gt;
* 217946: Fixed an issue in PAPO, where the table grid didn&#039;t fit the window after switching from Offline Mode to normal mode on Case analysis&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.4 (release date 2017-05-23) ==&lt;br /&gt;
Build number: 2017.4.0.36424, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PAPO Features:&#039;&#039;&#039;&lt;br /&gt;
* 307022: The Profiling Analysis can now be used in the Control window in the [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#QPR_ProcessAnalyzer_Presentation_Object_.28PAPO.29|QPR ProcessAnalyzer Presentation Object]] to select cases for the analysis in the Analysis window.&amp;lt;br&amp;gt;&lt;br /&gt;
* 307003: The buttons in the [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#QPR_ProcessAnalyzer_Presentation_Object_.28PAPO.29|QPR ProcessAnalyzer Presentation Object (PAPO)]] were rearranged.&amp;lt;br&amp;gt;&lt;br /&gt;
* 307057: The Duration, Profiling, Influence, and Variation Analyses in [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#QPR_ProcessAnalyzer_Presentation_Object_.28PAPO.29|QPR ProcessAnalyzer Presentation Object]] now have generic and some analysis specific settings supported.&amp;lt;br&amp;gt;&lt;br /&gt;
* 306969: The QPR ProcessAnalyzer Presentation Object now supports the [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#Influence_Analysis_for_Case_Attributes|Influence Analysis for Case Attributes]] in the grid format.&lt;br /&gt;
* 307030: [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#Duration_Analysis|Duration Analysis]] can now be used in the {{DriverNameForTheDay}} window of the QPR ProcessAnalyzer Presentation Object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PA Features:&#039;&#039;&#039;&lt;br /&gt;
* 403516: Consolidate event names in PA example Excels (SAP_OrderToCash.xlsx, SAP_OrderToCash v2.xlsx and SAP_OrderToCash_Extended.xlsx).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217845: Create Filter from CaseAttributeTrends with PA script doesn&#039;t work.&lt;br /&gt;
* 217830: Tab delimiter is not taken into use when datatable imported.&lt;br /&gt;
* 217902: SqlException thrown when opening influence analysis on a filter without any case attributes.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.3 (release date 2017-04-11) ==&lt;br /&gt;
Build number: 2017.3.0.36338 &amp;lt;s&amp;gt;36324&amp;lt;/s&amp;gt;, Model compatibility version: 2, Database version: 57, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features:&#039;&#039;&#039;&lt;br /&gt;
* 305862: There now are new StartTime Limit and Maximum Text Length settings to be used with the [[Operation Log]] and the Operation Log Analysis [[QPR ProcessAnalyzer Scripting Commands#--.23GetAnalysis|GetAnalysis]] script command.&lt;br /&gt;
* 306983: PAPO - Highlight selected flow label in flowchart: selected flow labels are now clearly visible on the flowchart. Selected objects are highlighted on the flowchart.&lt;br /&gt;
* 306986 &amp;amp; 307017: The QPR ProcessAnalyzer Presentation Object (PAPO) now has a new [[QPR_ProcessAnalyzer_Presentation_Object_(PAPO)#Control_Window_and_Analysis_Window|window system]].&lt;br /&gt;
* 306987: PAPO - in-memory Variation analysis:  Variation analysis is now supported in in-memory mode.&lt;br /&gt;
* 307000: The model shown in the QPR ProcessAnalyzer Presentation Object (PAPO) can now be changed via a menu.&lt;br /&gt;
* 306999: The Start and End symbols in the QPR ProcessAnalyzer Presentation Object (PAPO) flowchart were updated.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217679: PA cannot add new case Attribute values to exising case via Excel if CaseId starts with leading zero.&lt;br /&gt;
* 217790: Filtering is too slow.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.2 (release date 2017-02-28) ==&lt;br /&gt;
Build number: 2017.2.0.36218, Model compatibility version: 2, Database version: 56, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features:&#039;&#039;&#039;&lt;br /&gt;
* 306966: Performance optimizations into PA database.&lt;br /&gt;
* 306930: Improved messages to SQL Queries.&lt;br /&gt;
* 306910: Implement importSalesforceQuery support for TLS 1.1. Note that the support from PA Salesforce Integration service has been discontinued.&lt;br /&gt;
* 306964: Make it possible to transfer the contents of a filter efficiently to UI.&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217605: Operation log throws some exception.&lt;br /&gt;
* 217546: Slow access to project by project name. ETL parameter: (SELECT &#039;ProjectName&#039;, &#039;name&#039;).&lt;br /&gt;
* 217363: ScriptLauncher should LogOff.&lt;br /&gt;
* 217618, 217636: PA Excel Client doesn&#039;t connect to PA Server when Windows performance counter is not accessible (part 1 and 2).&lt;br /&gt;
* 217650: System.DBNull objects returned from event analysis when IncludeCaseAttributeValues is used.&lt;br /&gt;
&lt;br /&gt;
== QPR ProcessAnalyzer 2017.1 (release date 2017-01-16) ==&lt;br /&gt;
Build number: 2017.1.0.36111, Model compatibility version: 2, Database version: 55, Stream version: 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Features:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 306899: The [[QPR ProcessAnalyzer Scripting Commands#--.23SendEmail|SendEmail]] script command now supports sending attachments.&lt;br /&gt;
* 306896: A [[Open R in QPR ProcessAnalyzer#Case_Prediction_Example_Script|case prediction Open R example script]] was added to QPR ProcessAnalyzer wiki.&lt;br /&gt;
* 306484: There is now a new [[QPR ProcessAnalyzer Scripting Commands#--.23ImportEventsIncremental|ImportEventsIncremental]] script command for synchronizing event data between a data table that holds event data and the specified model.&lt;br /&gt;
* 306906: The [[Script Log]] entries are now written to the database at the same time as the script is being run. There is also a new Script Log Report analysis type for the [[QPR ProcessAnalyzer Scripting Commands#--.23GetAnalysis|GetAnalysis]] script command for administrators to access script logs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed bugs:&#039;&#039;&#039;&lt;br /&gt;
* 217526: Log entries written as errors even if they are not.&lt;br /&gt;
* 217545: Session expires exceedingly often in a service deployed in AWS behind load balancer.&lt;br /&gt;
* 217591: Special characters in PA script parameters cause script to fail and hide the actual root cause of the failure.&lt;br /&gt;
&lt;br /&gt;
== Old Releases ==&lt;br /&gt;
See older releases in [[QPR ProcessAnalyzer Release Archive]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10463</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10463"/>
		<updated>2018-08-13T08:23:59Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Necessary IIS setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Necessary IIS setup ===&lt;br /&gt;
&lt;br /&gt;
==== Install the Application Initialization role or feature ====&lt;br /&gt;
To support application initialization on your Web server, you must install the Application Initialization role or feature.&lt;br /&gt;
&lt;br /&gt;
In Windows Server 2012, Windows Server 2012 R2 or Windows Server 2016:&lt;br /&gt;
* On the taskbar, click Server Manager.&lt;br /&gt;
* In Server Manager, click the Manage menu, and then click Add Roles and Features.&lt;br /&gt;
* In the Add Roles and Features Wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.&lt;br /&gt;
* On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select Application Initialization. Click Next.&lt;br /&gt;
[[File:AddRolesAndFeaturesWizard.JPG]]&lt;br /&gt;
* On the Select Features page, click Next.&lt;br /&gt;
* On the Confirm installation selections page, click Install.&lt;br /&gt;
* On the Results page, click Close.&lt;br /&gt;
&lt;br /&gt;
==== Set the application pool to AlwaysRunning ====&lt;br /&gt;
You need to set the pool to AlwaysRunning. Open C:\Windows\System32\inetsrv\config\applicationHost.config and change the pool settings as shown below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationPools&amp;gt; &amp;lt;add name=&amp;quot;MyAppPool&amp;quot; startMode=&amp;quot;AlwaysRunning&amp;quot; /&amp;gt; &amp;lt;/applicationPools&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set site or application to Preloaded ====&lt;br /&gt;
In the same file (applicationHost.config), look for your site in the element and add preloadEnabled=&amp;quot;true&amp;quot;, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;application path=&amp;quot;/pa_ui_inmemory_test&amp;quot; preloadEnabled=&amp;quot;true&amp;quot; applicationPool=&amp;quot;QPRPAPoolUI&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set site or application initialize after restart ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;system.webServer&amp;gt;&lt;br /&gt;
    &amp;lt;applicationInitialization&lt;br /&gt;
      doAppInitAfterRestart=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;add initializationPage=&amp;quot;/MainService.svc&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/applicationInitialization&amp;gt;&lt;br /&gt;
  &amp;lt;/system.webServer&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Disable ModelLoadOnStartup via web.config setting ====&lt;br /&gt;
&lt;br /&gt;
Default value is true. If ModelLoadOnStartup need disable set value to false.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;configuration&amp;gt;&lt;br /&gt;
  &amp;lt;applicationSettings&amp;gt;&lt;br /&gt;
    &amp;lt;Qpr.ProcessAnalyzer.Service.Properties.Settings&amp;gt;&lt;br /&gt;
      &amp;lt;setting name=&amp;quot;ModelLoadOnStartup&amp;quot; serializeAs=&amp;quot;String&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;True&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/setting&amp;gt;&lt;br /&gt;
    &amp;lt;/Qpr.ProcessAnalyzer.Service.Properties.Settings&amp;gt;&lt;br /&gt;
  &amp;lt;/applicationSettings&amp;gt;&lt;br /&gt;
&amp;lt;/configuration&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10374</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10374"/>
		<updated>2018-07-04T08:40:54Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Necessary IIS setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Necessary IIS setup ===&lt;br /&gt;
&lt;br /&gt;
==== Install the Application Initialization role or feature ====&lt;br /&gt;
To support application initialization on your Web server, you must install the Application Initialization role or feature.&lt;br /&gt;
&lt;br /&gt;
Windows Server 2012 or Windows Server 2012 R2&lt;br /&gt;
* On the taskbar, click Server Manager.&lt;br /&gt;
* In Server Manager, click the Manage menu, and then click Add Roles and Features.&lt;br /&gt;
* In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.&lt;br /&gt;
* On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select Application Initialization. Click Next.&lt;br /&gt;
* .&lt;br /&gt;
* On the Select Features page, click Next.&lt;br /&gt;
* On the Confirm installation selections page, click Install.&lt;br /&gt;
* On the Results page, click Close.&lt;br /&gt;
&lt;br /&gt;
==== Set the application pool to AlwaysRunning ====&lt;br /&gt;
You need to set the pool to AlwaysRunning. Open C:\Windows\System32\inetsrv\config\applicationHost.config and change the pool settings as shown below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationPools&amp;gt; &amp;lt;add name=”MyAppPool” startMode=”AlwaysRunning” /&amp;gt; &amp;lt;/applicationPools&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set site or application to Preloaded ====&lt;br /&gt;
Look for your site in the element and add preloadEnabled=”true”, for example:&lt;br /&gt;
&lt;br /&gt;
preloadEnabled=&amp;quot;true&amp;quot; applicationPool=&amp;quot;.NET v4.5&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Disable ModelLoadOnStartup via web.config setting ====&lt;br /&gt;
&lt;br /&gt;
Default value is true. If ModelLoadOnStartup need disable set value to false.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;configuration&amp;gt;&lt;br /&gt;
  &amp;lt;applicationSettings&amp;gt;&lt;br /&gt;
    &amp;lt;Qpr.ProcessAnalyzer.Service.Properties.Settings&amp;gt;&lt;br /&gt;
      &amp;lt;setting name=&amp;quot;ModelLoadOnStartup&amp;quot; serializeAs=&amp;quot;String&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;value&amp;gt;True&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/setting&amp;gt;&lt;br /&gt;
    &amp;lt;/Qpr.ProcessAnalyzer.Service.Properties.Settings&amp;gt;&lt;br /&gt;
  &amp;lt;/applicationSettings&amp;gt;&lt;br /&gt;
&amp;lt;/configuration&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10371</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10371"/>
		<updated>2018-06-28T08:29:50Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* IIS setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Necessary IIS setup ===&lt;br /&gt;
&lt;br /&gt;
==== Install the Application Initialization role or feature ====&lt;br /&gt;
To support application initialization on your Web server, you must install the Application Initialization role or feature.&lt;br /&gt;
&lt;br /&gt;
Windows Server 2012 or Windows Server 2012 R2&lt;br /&gt;
* On the taskbar, click Server Manager.&lt;br /&gt;
* In Server Manager, click the Manage menu, and then click Add Roles and Features.&lt;br /&gt;
* In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.&lt;br /&gt;
* On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select Application Initialization. Click Next.&lt;br /&gt;
* .&lt;br /&gt;
* On the Select Features page, click Next.&lt;br /&gt;
* On the Confirm installation selections page, click Install.&lt;br /&gt;
* On the Results page, click Close.&lt;br /&gt;
&lt;br /&gt;
==== Set the application pool to AlwaysRunning ====&lt;br /&gt;
You need to set the pool to AlwaysRunning. Open C:\Windows\System32\inetsrv\config\applicationHost.config and change the pool settings as shown below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationPools&amp;gt; &amp;lt;add name=”MyAppPool” startMode=”AlwaysRunning” /&amp;gt; &amp;lt;/applicationPools&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set site or application to Preloaded ====&lt;br /&gt;
Look for your site in the element and add preloadEnabled=”true”, for example:&lt;br /&gt;
&lt;br /&gt;
preloadEnabled=&amp;quot;true&amp;quot; applicationPool=&amp;quot;.NET v4.5&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10370</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10370"/>
		<updated>2018-06-28T08:29:01Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Set the pool to AlwaysRunning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IIS setup ===&lt;br /&gt;
&lt;br /&gt;
==== Install the Application Initialization role or feature ====&lt;br /&gt;
To support application initialization on your Web server, you must install the Application Initialization role or feature.&lt;br /&gt;
&lt;br /&gt;
Windows Server 2012 or Windows Server 2012 R2&lt;br /&gt;
* On the taskbar, click Server Manager.&lt;br /&gt;
* In Server Manager, click the Manage menu, and then click Add Roles and Features.&lt;br /&gt;
* In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.&lt;br /&gt;
* On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select Application Initialization. Click Next.&lt;br /&gt;
* .&lt;br /&gt;
* On the Select Features page, click Next.&lt;br /&gt;
* On the Confirm installation selections page, click Install.&lt;br /&gt;
* On the Results page, click Close.&lt;br /&gt;
&lt;br /&gt;
==== Set the application pool to AlwaysRunning ====&lt;br /&gt;
You need to set the pool to AlwaysRunning. Open C:\Windows\System32\inetsrv\config\applicationHost.config and change the pool settings as shown below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationPools&amp;gt; &amp;lt;add name=”MyAppPool” startMode=”AlwaysRunning” /&amp;gt; &amp;lt;/applicationPools&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set site or application to Preloaded ====&lt;br /&gt;
Look for your site in the element and add preloadEnabled=”true”, for example:&lt;br /&gt;
&lt;br /&gt;
preloadEnabled=&amp;quot;true&amp;quot; applicationPool=&amp;quot;.NET v4.5&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10369</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10369"/>
		<updated>2018-06-28T08:28:41Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* IIS setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IIS setup ===&lt;br /&gt;
&lt;br /&gt;
==== Install the Application Initialization role or feature ====&lt;br /&gt;
To support application initialization on your Web server, you must install the Application Initialization role or feature.&lt;br /&gt;
&lt;br /&gt;
Windows Server 2012 or Windows Server 2012 R2&lt;br /&gt;
* On the taskbar, click Server Manager.&lt;br /&gt;
* In Server Manager, click the Manage menu, and then click Add Roles and Features.&lt;br /&gt;
* In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.&lt;br /&gt;
* On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select Application Initialization. Click Next.&lt;br /&gt;
* .&lt;br /&gt;
* On the Select Features page, click Next.&lt;br /&gt;
* On the Confirm installation selections page, click Install.&lt;br /&gt;
* On the Results page, click Close.&lt;br /&gt;
&lt;br /&gt;
==== Set the pool to AlwaysRunning ====&lt;br /&gt;
You need to set the pool to AlwaysRunning. Open C:\Windows\System32\inetsrv\config\applicationHost.config and change the pool settings as shown below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;applicationPools&amp;gt; &amp;lt;add name=”MyAppPool” startMode=”AlwaysRunning” /&amp;gt; &amp;lt;/applicationPools&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set site or application to Preloaded ====&lt;br /&gt;
Look for your site in the element and add preloadEnabled=”true”, for example:&lt;br /&gt;
&lt;br /&gt;
preloadEnabled=&amp;quot;true&amp;quot; applicationPool=&amp;quot;.NET v4.5&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10368</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10368"/>
		<updated>2018-06-28T08:14:19Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Model Load OnStartup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IIS setup===&lt;br /&gt;
&lt;br /&gt;
====Install the Application Initialization role or feature====&lt;br /&gt;
To support application initialization on your Web server, you must install the Application Initialization role or feature.&lt;br /&gt;
&lt;br /&gt;
Windows Server 2012 or Windows Server 2012 R2&lt;br /&gt;
* On the taskbar, click Server Manager.&lt;br /&gt;
* In Server Manager, click the Manage menu, and then click Add Roles and Features.&lt;br /&gt;
* In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.&lt;br /&gt;
* On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select Application Initialization. Click Next.&lt;br /&gt;
* .&lt;br /&gt;
* On the Select Features page, click Next.&lt;br /&gt;
* On the Confirm installation selections page, click Install.&lt;br /&gt;
* On the Results page, click Close.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10367</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10367"/>
		<updated>2018-06-28T08:01:01Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Model Load OnStartup ==&lt;br /&gt;
The &#039;&#039;&#039;LoadOnStartup&#039;&#039;&#039; section is used to define automatic the QPR ProcessAnalyzer model data loading in memory during startup. If value is true model is loaded on startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;LoadOnStartup&amp;quot;: true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10288</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10288"/>
		<updated>2018-06-12T06:02:51Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Read data from SQL Server table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, COST, COUNTRY, PRODUCT FROM CASES_TABLE&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT CASENAME, CREATED_DATE, CREATED_BY FROM EVENT_TABLE&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;CASENAME&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;CREATED_BY&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10235</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10235"/>
		<updated>2018-06-11T12:20:14Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
[https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true Application pool crash]&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10234</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10234"/>
		<updated>2018-06-11T12:19:18Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
Application pool crash [https://devnet.onqpr.com/pawiki/index.php/Installing_QPR_ProcessAnalyzer_Server#Update_IIS_Application_pool_loadUserProfile_to_true]&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10233</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10233"/>
		<updated>2018-06-11T12:14:40Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
Example error when CSV file is missing: &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Access database engine could not find the object &#039;CaseAttributes.csv&#039;. Make sure the object exists and that you spell its name and the path name correctly. If &#039;CaseAttributes.csv&#039; is not a local object, check your network connection or contact the server administrator.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10232</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10232"/>
		<updated>2018-06-11T12:12:34Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Example error when specified directory is missing: &#039;ERROR [HY024] [Microsoft][ODBC Text Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10231</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10231"/>
		<updated>2018-06-11T12:06:17Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
* Check ODBC drivers is installed. 64-bit machine: C:\Windows\System32\odbcad32.exe&lt;br /&gt;
* Check connection string. Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10230</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10230"/>
		<updated>2018-06-11T12:04:42Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Most common reason for error &#039;System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&#039; is driver is missing or driver name is not exactly correct.&lt;br /&gt;
#Check ODBC drivers. 64-bit machine:&lt;br /&gt;
C:\Windows\System32\odbcad32.exe&lt;br /&gt;
#Check connection string&lt;br /&gt;
Example 32-bit driver name &#039;Driver={Microsoft Text Driver (*.txt; *.csv)}&#039; and 64-bit driver name &#039;Driver={Microsoft Access Text Driver (*.txt, *.csv)}&#039;.&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10229</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=10229"/>
		<updated>2018-06-11T11:11:14Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Model Datasources ==&lt;br /&gt;
The &#039;&#039;&#039;DataSource&#039;&#039;&#039; section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Datasource type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data. Query syntax depends on the source system where the data is fetched.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are taken to the model as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example: Loading QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
==== ODBC Driver Installation ====&lt;br /&gt;
&#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; is software package that contains ODBC drivers for&lt;br /&gt;
* Microsoft SQL Server&lt;br /&gt;
* Microsoft Access (*.mdb and *.accdb) files&lt;br /&gt;
* Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files&lt;br /&gt;
* CSV text files&lt;br /&gt;
&lt;br /&gt;
The package needs to be installed in the same computer where the QPR ProcessAnalyzer Server is running. Installation instructions:&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (x64) version (usually it&#039;s the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==== Read data from CSV file ====&lt;br /&gt;
In this example, data is loaded from CSV files located in the file system using &#039;&#039;Microsoft Access Text Driver (*.txt, *.csv)&#039;&#039; driver. Loaded files are C:\ProcessMiningData\ModelCaseAttributes.csv and C:\ProcessMiningData\ModelEventData.csv.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\\ProcessMiningData\\;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from CSV files, you may need to set the CSV file format for the ODBC driver using the &#039;&#039;&#039;Schema.ini&#039;&#039;&#039; file (more information: https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?view=sql-server-2017).&lt;br /&gt;
&lt;br /&gt;
==== Read data from Excel file ====&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible in the file system. In this example, the loaded file is C:\ProcessMiningData\ModelData.xlsx and cases are in sheet &#039;&#039;MyCases&#039;&#039; and events in sheet &#039;&#039;MyEvents&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyCases$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\ProcessMiningData\\ModelData.xlsx&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [MyEvents$]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: {&lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Read data from SQL Server table ====&lt;br /&gt;
In this example, data is loaded from an SQL Server table. In this example, the SQL Server hostname is &#039;&#039;MySQLServer&#039;&#039; and database name is &#039;&#039;MyDatabase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=MySQLServer;DataBase=MyDatabase;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&lt;br /&gt;
Check ODBC drivers. 64-bit machine:&lt;br /&gt;
C:\Windows\System32\odbcad32.exe&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
If the error message mention about Case or Event attributes named as &#039;&#039;F&amp;lt;column number&amp;gt;&#039;&#039; (e.g. F10), the data might be inconsistent, as there might be different amount of columns in different rows.&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The &#039;&#039;&#039;Permissions&#039;&#039;&#039; section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=9882</id>
		<title>Case Level Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Case_Level_Permissions&amp;diff=9882"/>
		<updated>2018-05-30T07:26:33Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Load QPR ProcessAnalyzer models from ODBC datasources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each QPR ProcessAnalyzer model has a &#039;&#039;&#039;[[Project_Workspace_in_QPR_ProcessAnalyzer_Excel_Client#Model_Properties|Configuration]]&#039;&#039;&#039; field containing model related settings in a JSON format. Those settings are documented in this page. When the model JSON configuration is changed, the model is dropped from the memory.&lt;br /&gt;
&lt;br /&gt;
== Data sources ==&lt;br /&gt;
The DataSource section is used to define where the QPR ProcessAnalyzer model data is loaded. See below examples, how to construct the full JSON.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Cases&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Data source type to use, when fetching the Cases data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Cases data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Cases data.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||Column name mappings for QPR ProcessAnalyzer data model. Only supported mapping is &#039;&#039;&#039;CaseId&#039;&#039;&#039; defining the case id (case name). Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are imported as case attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Events&lt;br /&gt;
||&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||DataSourceType&lt;br /&gt;
||Data source type to use, when fetching the Events data. Currently the only supported value is &#039;&#039;&#039;odbc&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcConnectionString&lt;br /&gt;
||ODBC connection string to use to fetch the Events data. Connection strings can be found in https://www.connectionstrings.com.&lt;br /&gt;
|-&lt;br /&gt;
||OdbcQuery&lt;br /&gt;
||ODBC query to use to fetch the Events data.&lt;br /&gt;
|-&lt;br /&gt;
||Columns&lt;br /&gt;
||&lt;br /&gt;
Column name mappings for QPR ProcessAnalyzer data model. Supported mappings for Events are &#039;&#039;&#039;CaseId&#039;&#039;&#039;, &#039;&#039;&#039;EventType&#039;&#039;&#039; and &#039;&#039;&#039;Timestamp&#039;&#039;&#039;. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ &lt;br /&gt;
  &amp;quot;CaseId&amp;quot;: &amp;quot;SalesOrderHeaderId&amp;quot;,&lt;br /&gt;
  &amp;quot;EventType&amp;quot;: &amp;quot;EventType&amp;quot;,&lt;br /&gt;
  &amp;quot;Timestamp&amp;quot;: &amp;quot;CreatedDate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All unmapped columns are imported as event attributes. If the fetched data doesn&#039;t contain a mapped column, the model loading fails and an error message is given.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Load QPR ProcessAnalyzer models from ODBC datasources ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction below to install &#039;&#039;&#039;Microsoft Access Database Engine 2016 Redistributable&#039;&#039;&#039; to get ODBC drivers for Microsoft Access (*.mdb and *.accdb) files, Microsoft Excel (*.xls, *.xlsx, and *.xlsb) files, Microsoft SQL Server, and text files (it needs to be installed in the same computer where the QPR ProcessAnalyzer service is running):&lt;br /&gt;
# Go to https://www.microsoft.com/en-us/download/details.aspx?id=54920 and click Download.&lt;br /&gt;
# Select whether to use the 32bit or 64bit (X64) version (it&#039;s likely the 64bit version).&lt;br /&gt;
# Double-click the executable file on your hard disk to start the setup program.&lt;br /&gt;
# Follow the instructions on the screen to complete the installation.&lt;br /&gt;
&lt;br /&gt;
Error codes for troubleshooting are accessible from [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-2017| ODBC Error Codes].&lt;br /&gt;
&lt;br /&gt;
In this example, data is loaded from a CSV files that is accessible from though the file system (in this examples cases are store to path C:\). Example of path to csv file would be C:\\TestData\\. Example use 64-bit ODBC driver: {Microsoft Access Text Driver (*.txt, *.csv)}. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {    &lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=&amp;lt;path to csv file location&amp;gt;;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelCaseAttributes.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Name&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=&amp;lt;path to csv file location&amp;gt;;Extensions=asc,csv,tab,txt&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [ModelEventData.csv]&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;Case&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;Event Type&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, data is loaded from an SQL Server table. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
    &amp;quot;Cases&amp;quot;: {&lt;br /&gt;
    &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=&amp;lt;hostname&amp;gt;;DataBase=&amp;lt;database name&amp;gt;;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
    &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
    &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
      &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;Events&amp;quot;: {&lt;br /&gt;
      &amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={SQL Server};Server=&amp;lt;hostname&amp;gt;;DataBase=&amp;lt;database name&amp;gt;;Trusted_Connection=True;&amp;quot;,&lt;br /&gt;
      &amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT MOD_NAME, MOD_CREATED_DATE, MOD_CREATED_BY FROM PA_MODEL&amp;quot;,&lt;br /&gt;
      &amp;quot;Columns&amp;quot;: { &lt;br /&gt;
        &amp;quot;CaseId&amp;quot;: &amp;quot;MOD_CREATED_BY&amp;quot;,&lt;br /&gt;
        &amp;quot;Timestamp&amp;quot;: &amp;quot;MOD_CREATED_DATE&amp;quot;,&lt;br /&gt;
        &amp;quot;EventType&amp;quot;: &amp;quot;MOD_NAME&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, data is loaded from a Excel file that is accessible from though the file system (in this examples cases are store to path C:\). Example of filename would be C:\\TestData\\SAP_PurchaseToPay.xlsx. Event data and case attribute data is stored in different Excel sheet but in the same file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;DataSource&amp;quot;: {&lt;br /&gt;
		&amp;quot;Cases&amp;quot;: {&lt;br /&gt;
			&amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
			&amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=&amp;lt;path to excel filename&amp;gt;&amp;quot;,&lt;br /&gt;
			&amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [&amp;lt;sheet name&amp;gt;$]&amp;quot;,&lt;br /&gt;
			&amp;quot;Columns&amp;quot;: {&lt;br /&gt;
				&amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;Events&amp;quot;: {&lt;br /&gt;
			&amp;quot;DataSourceType&amp;quot;: &amp;quot;odbc&amp;quot;,&lt;br /&gt;
			&amp;quot;OdbcConnectionString&amp;quot;: &amp;quot;Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=&amp;lt;path to excel filename&amp;gt;&amp;quot;,&lt;br /&gt;
			&amp;quot;OdbcQuery&amp;quot;: &amp;quot;SELECT * FROM [&amp;lt;sheet name&amp;gt;$]&amp;quot;,&lt;br /&gt;
			&amp;quot;Columns&amp;quot;: {&lt;br /&gt;
				&amp;quot;CaseId&amp;quot;: &amp;quot;Case ID&amp;quot;,&lt;br /&gt;
				&amp;quot;EventType&amp;quot;: &amp;quot;Activity&amp;quot;,&lt;br /&gt;
				&amp;quot;Timestamp&amp;quot;: &amp;quot;Start Time&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Case Permissions ==&lt;br /&gt;
The Permissions section specifies data security restrictions for objects within the QPR ProcessAnalyzer model (i.e. limit visibility). If the Permissions section hasn&#039;t been defined, all the model data is visible to all users having &#039;&#039;&#039;GenericRead&#039;&#039;&#039; permission for the project in which the model resides ([[User Roles and Permissions in QPR ProcessAnalyzer|more information about roles and permissions]]). Permissions defined in this section, are only available when using the [[Installing QPR ProcessAnalyzer Server#Configure_Web_Service_to_use_In-Memory_or_In-Database_processing|In-Memory core]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;Property&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Initialization&lt;br /&gt;
|[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to make an initial calculation for all the other expressions within this same permissions context. This expression can be used to improve performance when part of the Case or EventLogKey expressions are common and thus they don&#039;t need to be calculated again for every Case separately. See the examples below of using the Initialization expression.&lt;br /&gt;
|-&lt;br /&gt;
||Case&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression determining which users can see each Cases. The expression is evaluated within the context of each Case. If the evaluation results &#039;&#039;&#039;true&#039;&#039;&#039;, the Case is visible for the user. Otherwise the Case, its Events and case and event attributes are not visible. This setting implements case level security restrictions.&lt;br /&gt;
|-&lt;br /&gt;
||EventLogKey&lt;br /&gt;
||[[QPR_ProcessAnalyzer_Expressions|Expression language]] expression used to uniquely identify all the unique event logs created by case permission filters. If a cached EventLog with the same key is already in the system, that EventLog is used instead of creating a new. The new EventLog is created by applying the Case expression to filter the Cases users have rights to.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example usecase for case permissions ===&lt;br /&gt;
There are groups G1, G2 and G3. Case permissions have been set as follows:&lt;br /&gt;
* group G1 can only see cases where (case attribute) Region is Dallas&lt;br /&gt;
* group G2 can only see cases where Region is Austin&lt;br /&gt;
* group G3 can only see cases where Region is either Austin or New York&lt;br /&gt;
&lt;br /&gt;
QPR ProcessAnalyzer model contains the following cases:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Case name&lt;br /&gt;
! Region (case attribute)&lt;br /&gt;
! Groups can see&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Dallas&lt;br /&gt;
|G1&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Austin&lt;br /&gt;
|G2, G3&lt;br /&gt;
|-&lt;br /&gt;
|D&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|E&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|New York&lt;br /&gt;
|G3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus, when viewing analyses, a user see that the model contains the following cases:&lt;br /&gt;
* If the user belongs to group G1 only, the user can see cases A and B (2 cases)&lt;br /&gt;
* If the user belongs to group G2 only, the user can see case C (1 case)&lt;br /&gt;
* If the user belongs to group G3 only, the user can see cases C, D, E and F (4 cases)&lt;br /&gt;
* If the user belongs to groups G1 and G2 only, the user can see cases A, B and C (3 cases)&lt;br /&gt;
&lt;br /&gt;
There is no way for a user to be aware of the existence of cases that the user doesn&#039;t have rights to.&lt;br /&gt;
&lt;br /&gt;
=== Configuration examples for case permissions ===&lt;br /&gt;
In this example, visibility of cases is limited in a way that only those users can see the cases belonging to a user group which name is same as the Region (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, OrderByValue(CurrentUser.GroupNames))&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;Region.In(groupNames)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;StringJoin(\&amp;quot;_\&amp;quot;, groupNames)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases are only visible for users whose user name is same as the Account Manager (case attribute).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;userName\&amp;quot;, CurrentUser.Name)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Attribute(\&amp;quot;Account Manager\&amp;quot;) == userName)&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;CurrentUser.Id&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, cases having &amp;quot;Region&amp;quot; case attribute of &amp;quot;Dallas&amp;quot; will only be visible for users belonging to user group &amp;quot;GroupA&amp;quot; (and &amp;quot;New York&amp;quot; for group &amp;quot;GroupB&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Permissions&amp;quot;: {&lt;br /&gt;
    &amp;quot;Initialization&amp;quot;: &amp;quot;Let(\&amp;quot;groupNames\&amp;quot;, CurrentUser.GroupNames)&amp;quot;, &lt;br /&gt;
    &amp;quot;Case&amp;quot;: &amp;quot;(Region == \&amp;quot;Dallas\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupA\&amp;quot;.In(groupNames)) || (Region == \&amp;quot;New York\&amp;quot; &amp;amp;&amp;amp; \&amp;quot;GroupB\&amp;quot;.In(groupNames))&amp;quot;,&lt;br /&gt;
    &amp;quot;EventLogKey&amp;quot;: &amp;quot;If(\&amp;quot;GroupA\&amp;quot;.In(groupNames), \&amp;quot;_A\&amp;quot;, \&amp;quot;_\&amp;quot;) + If(\&amp;quot;GroupB\&amp;quot;.In(groupNames), \&amp;quot;_B\&amp;quot;, \&amp;quot;_\&amp;quot;)&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
	<entry>
		<id>https://wiki.onqpr.com/pa/index.php?title=Process_Flowchart&amp;diff=9460</id>
		<title>Process Flowchart</title>
		<link rel="alternate" type="text/html" href="https://wiki.onqpr.com/pa/index.php?title=Process_Flowchart&amp;diff=9460"/>
		<updated>2018-04-12T10:52:28Z</updated>

		<summary type="html">&lt;p&gt;VesKivi: /* Settings Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Flowchart Analysis shows the ‘as-is’ process flowchart where you can see each event type and flow and how long the transitions between event types take. This is the starting point for the analysis and provides the big picture of the process.&lt;br /&gt;
&lt;br /&gt;
== Model Status ==&lt;br /&gt;
The Model Status indicators show how many percent of cases and events from the total number of cases and events are shown in the currently used filter. To see the amounts, hover the mouse over the indicators.&lt;br /&gt;
&lt;br /&gt;
== Visibility Settings ==&lt;br /&gt;
Using the Visibility Settings you can define the minimum volume of flows and events from the total amount of flows and events to be shown on the flowchart.&lt;br /&gt;
&lt;br /&gt;
== Panning and Zooming ==&lt;br /&gt;
Click and drag the flowchart to pan. Use the mouse wheel to zoom in and out. You can also use the + and - buttons on the bottom right corner to zoom. On touch devices, use the pinch gesture.&amp;lt;br&amp;gt;&lt;br /&gt;
The following keyboard shortcuts are in use:&lt;br /&gt;
* &#039;&#039;&#039;Ctrl+0&#039;&#039;&#039;: set the zoom to 100%.&lt;br /&gt;
* &#039;&#039;&#039;Shift+Z&#039;&#039;&#039;: fit the flowchart into view.&lt;br /&gt;
* &#039;&#039;&#039;+&#039;&#039;&#039;&#039; and &#039;&#039;&#039;-&#039;&#039;&#039;: zoom in and out.&lt;br /&gt;
* &#039;&#039;&#039;Cursor keys&#039;&#039;&#039;: scroll the flowchart.&lt;br /&gt;
* &#039;&#039;&#039;PageUp&#039;&#039;&#039; and &#039;&#039;&#039;PageDown&#039;&#039;&#039; keys: scroll the flowchart vertically up and down.&lt;br /&gt;
&lt;br /&gt;
== Selecting Event Types and Flows ==&lt;br /&gt;
Clicking an event type or a flow will select it. To select multiple event types and/or flows, hold down the Ctrl key on your keyboard and click on event types and flows. You can also select multiple event types and/or flows by first pressing and holding down the left mouse button and then dragging the mouse to have a rectangular selection tool to be activated.  Pressing Ctrl + A will select all flowchart event types and flows. Note that with the Radial graph layout, only the event type that is in the center of the graph can be selected and the popup menu opened for that event type. Every time an event type or a flow is selected in the flowchart, SelectedActivities and SelectedTransitions context variables will be updated with the identifiers of the selected objects.&lt;br /&gt;
&lt;br /&gt;
== Popup Menu ==&lt;br /&gt;
Right-clicking with the mouse or using a long press on a touch device will bring up the popup menu. Selecting an action from the popup menu will target the action to the currently selected event types and/or flows.&lt;br /&gt;
&lt;br /&gt;
== Left Side Pane ==&lt;br /&gt;
Clicking the Model and Analysis Buttons on the top left corner of the QPR ProcessAnalyzer Presentation Object will open a pane that can be used to change the model and filter, to view information about the model, to define settings for the data shown on the flowchart, and to change the layout algorithm used for the flowchart.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
By default, the pane closes when you click outside the pane. To have the pane visible when doing selections on the flowchart, click the slider on the pane header:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:PAPOFreezePane.png]]&lt;br /&gt;
&lt;br /&gt;
=== Model Page ===&lt;br /&gt;
The Model page shows the currently open model in the format &amp;quot;&amp;lt;Project Name&amp;gt; - &amp;lt;Model Name&amp;gt;&amp;quot;. &#039;&#039;&#039;To change the model&#039;&#039;&#039;, click on the model name and select a model from the drop-down menu that opens. In addition to the model drop-down menu, you can also &#039;&#039;&#039;select the filter&#039;&#039;&#039; to use by clicking on the &#039;&#039;&#039;Filter&#039;&#039;&#039; menu and selecting the filter from the drop-down menu that opens.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Information Page ===&lt;br /&gt;
This page displays additional information about the currently selected objects or the context of the whole flowchart displayed in PAPO if there are no other selections currently.&lt;br /&gt;
* &#039;&#039;&#039;Model Information&#039;&#039;&#039;&lt;br /&gt;
:: Model Information is displayed if there are no current selections in PAPO.&lt;br /&gt;
:: Model Information displays the &amp;quot;A1-comment&amp;quot; details of the shown flowchart including:&lt;br /&gt;
:::* Duration for generating the flowchart.&lt;br /&gt;
:::* Model name&lt;br /&gt;
:::* Project name&lt;br /&gt;
:::* Filter name&lt;br /&gt;
:::* Model size metrics&lt;br /&gt;
:::* Filter size metrics including sampling details&lt;br /&gt;
:: Model Information displays also all the [[QPR ProcessAnalyzer Analysis Parameters|Analysis Parameters]]&#039; values used to generate the analysis.&lt;br /&gt;
* &#039;&#039;&#039;Filter Rule Information&#039;&#039;&#039;&lt;br /&gt;
:: Displays the filter rule information for the filter rule selected in the filter rule section of the filter panel.&lt;br /&gt;
:: Displays the same text as the text that is displayed in the filter rule section of the filter panel.&lt;br /&gt;
* &#039;&#039;&#039;Event Type Information&#039;&#039;&#039;&lt;br /&gt;
:: Event type information is shown only if the model has at least one case attribute.&lt;br /&gt;
:: For every selected event type, the following information is made available:&lt;br /&gt;
:::* A pie chart displaying profiling analysis results for the event type based on selected case attribute.&lt;br /&gt;
:::* You can click on any value in the pie chart or its legend in order to set the context variable named: Selected&amp;lt;case attribute name&amp;gt; to be equal to the clicked value.&lt;br /&gt;
:::: NOTE: ContextVariablePrefix is added to the variable name if specified for PAPO.&lt;br /&gt;
::: The colors used for different values are the same across all the simultaneously displayed pie charts.&lt;br /&gt;
:: Count: The number of unique cases and the total number of cases going through this event type separated by &amp;quot;/&amp;quot;.&lt;br /&gt;
:: Value: The value of unique cases and the total value of cases going through this event type separated by &amp;quot;/&amp;quot;.&lt;br /&gt;
:: Profiling analysis configuration:&lt;br /&gt;
:::* By default, the selected case attribute is determined by the backend ProcessAnalyzer service.&lt;br /&gt;
:::* You can change the selected case attribute from the Attribute drop-down menu shown on top.&lt;br /&gt;
:::* The selected case attribute is shared by all the profiling analyses performed for all the event types within the selection.&lt;br /&gt;
* &#039;&#039;&#039;Flow Information&#039;&#039;&#039;&lt;br /&gt;
:: For every selected flow, the following information is made available:&lt;br /&gt;
:::* A bar chart displaying duration analysis results for the flow grouped by the selected granularity.&lt;br /&gt;
:::* Count: The number of unique cases and the total number of cases going through this flow separated by &amp;quot;/&amp;quot;.&lt;br /&gt;
:::* Avg. Duration: Average duration of all the unique occurrences of the selected flow.&lt;br /&gt;
:::* Median Duration: Median duration of all the unique occurrences of the selected flow.&lt;br /&gt;
:::* Std. Deviation: Standard deviation of all the unique occurrences of the selected flow.&lt;br /&gt;
:::* Value: The value of unique cases and the total value of cases going through this flow separated by &amp;quot;/&amp;quot;.&lt;br /&gt;
:: Duration analysis configuration:&lt;br /&gt;
:::* By default, the selected group by granularity is set to be &amp;quot;Day&amp;quot;.&lt;br /&gt;
:::* You can change the selected group by granularity from an UI control.&lt;br /&gt;
:::: The control is displayed next to the topmost displayed duration analysis chart.&lt;br /&gt;
:::* The selected group by granularity is shared by all the duration analyses performed for all the flows within the selection.&lt;br /&gt;
:::* Available group by granularities are: Second, Minute, Hour, Day, Week, Month, Quarter.&lt;br /&gt;
&lt;br /&gt;
=== Settings Page ===&lt;br /&gt;
On the Settings page, you can configure which information is shown in the flowchart. The following settings are available:&lt;br /&gt;
* &#039;&#039;&#039;Case Count KPI&#039;&#039;&#039;&lt;br /&gt;
::&#039;&#039;&#039;Show on Event Types&#039;&#039;&#039;: Makes the flowchart display the event type occurrence count and the percentage of occurrences within all the cases in the view. These are shown below the event type name for all the event types as &amp;quot;&amp;lt;percentage&amp;gt; % (&amp;lt;count&amp;gt;)&amp;quot;&lt;br /&gt;
:: &#039;&#039;&#039;Show on Flows&#039;&#039;&#039;: Makes the flowchart display the flow occurrence count and the percentage of occurrences within all the cases in the view. These are shown on top of flow detail texts for all the flows as &amp;quot;&amp;lt;percentage&amp;gt; % (&amp;lt;count&amp;gt;)&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Duration KPI&#039;&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;Show on Flows&#039;&#039;&#039;: Makes the flowchart display the duration for flows below the shown cost for all the flows. When enabled, allows selecting duration mode among the following choices:&lt;br /&gt;
::: &#039;&#039;&#039;Median&#039;&#039;&#039;: Median duration will be shown.&lt;br /&gt;
::: &#039;&#039;&#039;Average&#039;&#039;&#039;: Average duration will be shown.&lt;br /&gt;
::: &#039;&#039;&#039;Average Weighted by Cost&#039;&#039;&#039;: As &amp;quot;Average&amp;quot; but in addition the calculation will be weighted using the costs of the event type or flow as the weight.&lt;br /&gt;
* &#039;&#039;&#039;Cost KPI&#039;&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;Show on Event Types&#039;&#039;&#039;: Makes the flowchart display the cost for event types above the event type name for all the event types.&lt;br /&gt;
:: &#039;&#039;&#039;Show on Flow&#039;&#039;&#039;: Makes the flowchart display cost for flows below the amounts for all the flows.&lt;br /&gt;
::: &#039;&#039;&#039;Total&#039;&#039;&#039;: Total cost will be shown as element cost.&lt;br /&gt;
::: &#039;&#039;&#039;Average&#039;&#039;&#039;: Average cost will be shown as element cost.&lt;br /&gt;
* &#039;&#039;&#039;Transition Type&#039;&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;Unique Only&#039;&#039;&#039;: When enabled, data will be displayed in the Unique Only mode, i.e. only one occurrence per each case is counted, so that the generic flow of the process is shown, as well as the amount of occurrences of each event type. When disabled, all occurrences are counted, thus revealing if a certain step or a flow in the process is repeated several times impacting the process performance. This settign affects the values in both event types and flows.&lt;br /&gt;
* &#039;&#039;&#039;Graph Layout&#039;&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;Layout method&#039;&#039;&#039;: Layout method to use in the flowchart. Options are &#039;&#039;&#039;Grid&#039;&#039;&#039;, &#039;&#039;&#039;Tree&#039;&#039;&#039;, &#039;&#039;&#039;Force Directed&#039;&#039;&#039;, &#039;&#039;&#039;Layered Digraph&#039;&#039;&#039; (default), &#039;&#039;&#039;Circular&#039;&#039;&#039; and &#039;&#039;&#039;Radial&#039;&#039;&#039;. Note that when the &#039;&#039;&#039;Radial&#039;&#039;&#039; layout is used, only a single flow can be selected in the flowchart (no multiselection is possible).&lt;br /&gt;
:: &#039;&#039;&#039;Horizontal&#039;&#039;&#039;: Use vertical (top to bottom) or horizontal (left to right) direction for layouts. Only &#039;&#039;&#039;Tree&#039;&#039;&#039; and L&#039;&#039;&#039;ayered Digraph&#039;&#039;&#039; layout methods support this setting.&lt;br /&gt;
:: &#039;&#039;&#039;Radial Layers&#039;&#039;&#039;: Number of layers to display when &#039;&#039;&#039;Radial&#039;&#039;&#039; layout is used.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[QPR_ProcessAnalyzer_Presentation_Object (PAPO)|QPR ProcessAnalyzer Presentation Object (PAPO)]]&lt;br /&gt;
* [[Case_Analysis (PAPO)|Case Analysis]]&lt;br /&gt;
* [[Duration_Analysis (PAPO)|Duration Analysis]]&lt;br /&gt;
* [[Event_Analysis (PAPO)|Event Analysis]]&lt;br /&gt;
* [[Profiling_Analysis (PAPO)|Profiling Analysis]]&lt;br /&gt;
* [[Flowchart_Influence_Analysis (PAPO)|Flowchart Influence Analysis]]&lt;br /&gt;
* [[Influence_Analysis_for_Case_Attributes (PAPO)|Influence Analysis for Case Attributes]]&lt;br /&gt;
* [[Variation_Analysis (PAPO)|Variation Analysis]]&lt;br /&gt;
&lt;br /&gt;
[[Category: QPR UI]]&lt;/div&gt;</summary>
		<author><name>VesKivi</name></author>
	</entry>
</feed>