Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Script Tasks in FrameworkX FrameworX allows the automation of various tasks through scripting. They support code written in C#, VB.NET, and Python. These tasks can be configured to run in response to specific events or on a scheduled basis, enhancing the application's efficiency and functionality. 

Script tasks can be self-contained lines of code, call Script Classes or use external DLLs.

On this page:

Table of Contents
maxLevel3


Configuring Tasks

Tasks are program units, written in VB.Net,C# or Python, that execute either when a trigger event occurs or periodocally at specified intervals. FactoryStudio includes the following built-in tasks:

  • ServerStartup—Executed when the project starts running. Runs on the server (computer running TServer.exe).
  • ServerShutdown—Executed when the project shuts down. Runs on the server.
  • ClientStartup—Executed on each client when the Displays module (TVisualizer.exe) starts running.
  • ClientShutdown—Executed on each client when the Displays module closes.


To configure tasks:

  • Go to Scripts > Tasks.
  • Select a task name, or select the insert row (first row) to create a new task.
  • Enter or select information, as needed.
  • Then you can double click in the row to go to Code Editor.


Column

Description

Name

Enter a name for the task. The system lets you know if the name is not valid.

Code

Read-only. This specifies the language used for the code for this task. By default, this is the language you selected when you created the project. From the Code Editor tab, you can change the code language. To change the project default, go to Info > Settings.

Trigger

Enter or select the event (tag or other object) that should trigger the task execution, if any. The task executes when the value of the object changes.

Period

Enter the time interval that should occur between executions of the task, if there is no trigger.

Domain

Select where the script executes:

  • Client—Task executes on each client system. These are tasks that apply locally (on the user's computer). For example, report generation.
  • Server—Task executes on the server system. These are tasks that apply across the application, that is, globally.

InitialState

Select the task's initial state:

  • Enabled—Task is ready to run.
  • Disabled—Task is not ready to run. You may enable the task under specific conditions.

BuildStatus

Read-only. Status of the task code from the continuous compiling process.

  • Green check mark—Task runs without errors.
  • Red X—Task has warnings or errors. Double-click to go to the warning or error. Warnings are information only. Errors will prevent the code from running for that specific task. The rest of the application will run.

BuildErrors

Read-only. Displays any errors encountered during the last build.

EditSecurity

Set the security to enable who can edit the tasks.

Description

Enter a description of this task.

[Other columns]For definitions of other columns that are available in this table, see Common Column Definitions.



In this section...

Page Tree
root@parent
spacesV10