Managing Scripts: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
A script can only run once simultaneously, so there cannot be multiple simultaneous script runs for the same script. Scripts can call other scripts and as a called script, a code in a script can run multiple times at the same time.
Scrips are in either of the following statuses:
* '''Ready''': Script is not running can be started.
* '''Running''': Script is currently running. The script can be stopped.
* ''' Stopped''': Script is currently being stopped. When a script is in this status, the script cannot be started nor stopped, so you need to wait for the script to stop. There may be a delay in stopping the script, depending on the operation currently performed by the script.
=== Running Script ===
# On the left side projects hierarchy, select the project where the script is located.
# Open the '''Scripts''' tab.
# Select the script and from the right-click context menu select '''Run'''. Alternatively, you can hover the script and click the ''Run'' button in the end of the row.
=== Stopping Script ===
# On the left side projects hierarchy, select the project where the script is located.
# Open the '''Scripts''' tab.
# Select the script and from the right-click context menu select '''Stop'''. Alternatively, you can hover the script and click the ''Stop'' button in the end of the row.
# Click the '''Refresh''' button to see whether the script run as been stopped.
=== Viewing Script Log ===
It's possible to see the script log for the last completed run and for the current run as follows:
# On the left side projects hierarchy, select the project where the script is located.
# Open the '''Scripts''' tab.
# Select the script and from the right-click context menu select either '''View last run log''' or '''View current run log'''. Note that the script needs to be running to see the current run log.
# If viewing the current run log, you can click the '''Refresh''' button to see the latest log entries.
=== Opening Script Editor ===
It's possible to see the script log for the last completed run and for the current run as follows:
# On the left side projects hierarchy, select the project where the script is located.
# Open the '''Scripts''' tab.
# Select the script and from the right-click context menu select either '''Edit'''. Alternatively, you can hover the script and click the ''Edit'' button in the end of the row.
In the script editor, you can:
* Run the script by clicking the '''Run''' button.
* Stop a running script by clicking the '''Stop''' button.
* Save a script with unsaved changes by clicking the '''Save''' button.
* To run a script with unsaved changes, click the '''Save and Run''' button. Note that the script only runs in the saved state.
* To get the current script status, click the '''Refresh''' button.
* To go back to the list of project's script, click the '''Go back''' button. If there are unsaved changes in any of the opened script, you can either save or cancel changes.
* To close a script, click the ''Close'' button for the tab showing the script. If there are unsaved changes, you can either save or cancel changes.
The script editor can show several scripts in tabs, the editor remembers all scripts that have been opened during the same session.
=== Creating Script ===
=== Creating Script ===
# On the left side projects hierarchy, select the project where you want to create a script.
# On the left side projects hierarchy, select the project where you want to create a script.

Revision as of 19:16, 12 April 2021

A script can only run once simultaneously, so there cannot be multiple simultaneous script runs for the same script. Scripts can call other scripts and as a called script, a code in a script can run multiple times at the same time.

Scrips are in either of the following statuses:

  • Ready: Script is not running can be started.
  • Running: Script is currently running. The script can be stopped.
  • Stopped: Script is currently being stopped. When a script is in this status, the script cannot be started nor stopped, so you need to wait for the script to stop. There may be a delay in stopping the script, depending on the operation currently performed by the script.

Running Script

  1. On the left side projects hierarchy, select the project where the script is located.
  2. Open the Scripts tab.
  3. Select the script and from the right-click context menu select Run. Alternatively, you can hover the script and click the Run button in the end of the row.

Stopping Script

  1. On the left side projects hierarchy, select the project where the script is located.
  2. Open the Scripts tab.
  3. Select the script and from the right-click context menu select Stop. Alternatively, you can hover the script and click the Stop button in the end of the row.
  4. Click the Refresh button to see whether the script run as been stopped.

Viewing Script Log

It's possible to see the script log for the last completed run and for the current run as follows:

  1. On the left side projects hierarchy, select the project where the script is located.
  2. Open the Scripts tab.
  3. Select the script and from the right-click context menu select either View last run log or View current run log. Note that the script needs to be running to see the current run log.
  4. If viewing the current run log, you can click the Refresh button to see the latest log entries.

Opening Script Editor

It's possible to see the script log for the last completed run and for the current run as follows:

  1. On the left side projects hierarchy, select the project where the script is located.
  2. Open the Scripts tab.
  3. Select the script and from the right-click context menu select either Edit. Alternatively, you can hover the script and click the Edit button in the end of the row.

In the script editor, you can:

  • Run the script by clicking the Run button.
  • Stop a running script by clicking the Stop button.
  • Save a script with unsaved changes by clicking the Save button.
  • To run a script with unsaved changes, click the Save and Run button. Note that the script only runs in the saved state.
  • To get the current script status, click the Refresh button.
  • To go back to the list of project's script, click the Go back button. If there are unsaved changes in any of the opened script, you can either save or cancel changes.
  • To close a script, click the Close button for the tab showing the script. If there are unsaved changes, you can either save or cancel changes.

The script editor can show several scripts in tabs, the editor remembers all scripts that have been opened during the same session.

Creating Script

  1. On the left side projects hierarchy, select the project where you want to create a script.
  2. Open the Scripts tab.
  3. Click the New button and click Script. Define a name for the script and click OK. Note that script names must be unique within a project.

Deleting Script

  1. Select the project where the script(s) to be deleted are located.
  2. Open the Scripts tab.
  3. Select one or several scripts to be deleted.
  4. Click the Delete button and click Delete to the confirmation message.

Renaming Script

  1. Select the project where the script to be renamed is located.
  2. Open the Scripts tab.
  3. Select the script to be renamed.
  4. Click the Rename button.
  5. Change the script name in the opening dialog and click OK.

Moving Script

Scripts can be moved by dragging them with a mouse from the right side list to the target project in the left side hierarchy. Alternatively, you can first select the scripts, then from the right-click context menu select Move to and finally select the target project.

Duplicating Script

  1. Select the project where the script to be duplicated is located.
  2. Open the Scripts tab.
  3. Select the script to be duplicated.
  4. Click the Duplicate button. A duplicate of the script is created.