Scripts Integration

This section provides background information relating to the integration of scripting into Desigo CC. For instructions, see Integrating Scripting.

Scripts Risks and Threats

Be aware that there are inherent security risks in executing scripts because it is impossible to safeguard completely against scripts not provided by authorized suppliers. Nevertheless, security measures are provided to safeguard Desigo CC.

For cyber security risks:

- Use external DLLs only if strictly necessary. In any case, be careful in handling the files included in the scriptingLibraries folder and protect it against any unauthorized use.

- Be careful when any upgrade of the Scripts extension is released because it may contain security patches that can improve Desigo CC security. For the same reason, also be careful when upgrades are released for other extension modules that use scripts.

Scripts License

Scripts are covered by license. Check that the required licenses are available, otherwise you may not be able to execute and/or configure scripts. Depending on what licenses are installed, one of the following situations may occur:

  • Only the license for running scripts is installed. You can start any script already configured. If this license becomes unavailable for any reason:
    • Any scripts already configured are disabled (Operational Status = Disabled due to missing license), and you cannot enable them. Also, an event is generated to inform the user.
    • If a script was already running and then the license is lost, the script execution ends with Last Execution Status = Stopped due to missing license. When the license is restored, the last operational status is restored as well, and any automatic script will start.
  • Only the license to edit scripts is installed. You can execute library scripts and view, edit, or delete your own scripts. If this license becomes unavailable for any reason, you can only save the changes and import scripts.
  • Both licenses for running and editing scripts are installed. You can view, edit, delete, import, enable/disable, and run scripts.

Even when the license is installed, the availability of the scripting feature depends on your user group rights. If you do not have appropriate application rights you may be able to view but not configure scripts, or you may not have access to this feature at all. See details below.

Application Rights for Script Editor

Script Editor rights define the access permission for using the application to create and handle scripts.

Script Editor Rights

Application Rights

Scope Rights

Action

Show

Config.

Change script credentials

Create

Delete

  • Access the application and view existing data.

  • Modify existing data and save the changes.

  • Create a new script folder.
  • Create a new script.
  • Create a script from existing configuration.

  • Modify the user’s execution credentials.

  • Delete any script folder or script.

Application Rights for the Scripts Library

Library rights define the access permission for using the Script Editor to handle the scripts library. (In Application Rights, see Library.)

 

History Logging

When the scripts content has changed:

  • For objects with Validation profile = Disabled, no specific log for the modification is recorded.
  • For objects with Validation profile = Enabled, Supervised, or Monitored, the following data is recorded: the name of the operator who made the changes, and date and time when the modifications occurred.

The execution result of a script is recorded as follows:

  • When the script ends without errors, the Action Details field contains: No errors.
  • In case of error, the Action Details field contains the error message, indicates the script line where it occurred, and the last time the script was modified.
  • If the Script Manager stops unexpectedly during the script execution, the script Activity Status is reset Idle and the Action Details field contains: Unexpected script status found at startup. Resetting to Idle.

Log data is available when running the Activity Log.

Maximum Number of Running Scripts

There is an upper limit of 500 on the number of scripts that can execute at the same time. When this limit is reached, the execution of any additional scripts is not allowed (the script execution fails with Last Execution Error = The maximum number of running scripts has been reached).

CPU Usage of Scripts

To further contain resource usage, it is possible to monitor the CPU usage of scripts and to configure limits on the percentage of CPU resources that scripts are allowed to consume. See Monitoring the CPU Usage of Scripts.

Validation for Scripts

If the target object of a script is subject to validation, any commands on a target object with Validation Profile=Enabled or Monitored and the Four Eyes check box cleared will be executed.