Common Scripting Properties

Behaviour

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
Enabled
Action.Enabled = false;
true, falsetrueOn save

Whether the action is enabled or disabled. Disabled actions are not considered part of a script. When the script is run they are ignore completely.

Has to be set prior to the action being selected to run. This means the latest this can be set is in the actions parent.

IgnoreFailure
Action.IgnoreFailure = true;
true, falsefalseOn save

When set to true, the action will always report as having successfully completed. The actions run result is ignored. Even if the action run result is failure, the build will continue.

Has to be set before the action is run to have any affect.

PauseInterval
Action.PauseInterval = 2;
0 to 18000000 (5 hours)0On save

The number of milliseconds to pause after the completion of an action. The IDE allows users to skip pause intervals if required. The command line runner does not allow for the skipping of this interval.

Setting this is preferable to sleeping in a script as the action continues to be responsive, and handles termination requests.

Has to be set prior to the action run to have any affect.

MaxRetryAttempts
Action.MaxRetryAttempts = 3;
any positive 32-bit integer 0On save

The number of times to retry an action when it fails. Each failed run of the action is counted as a retry attempt. Once all the retry attempts are exhausted the action will return the result of the last retry attempt.

On a successful run this counter is reset for the next time the action is called. This is important for loops which contain actions with retry attempts set.

Has to be set prior to the run of the action to have any affect.

RetryPauseInterval
Action.RetryPauseInterval = 500;
any positive 32-bit integer 1000On save

The number of milliseconds to wait before running a retry of an action. This starts counting directly after the action fails and is not able to be skipped. Useful for waiting resources to become available, or locks to be released.

Has to be set before to the run of the action to have any affect.

Description

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
Comment
Action.Comment = 'Loads config for build';
any text (single line shown)[blank]On saveAllows you to add documentation to the action instance.
Description
Action.Description = 'Upload [ Installer ]';
any text (single line shown)[action dependent]On saveThe text shown in the IDE for the action. Describes the purpose of the action. Clear this property to revert to an automatically generated description.

Identity

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
ActionName
Action.SendLogMessage(Action.ActionName, stInformation);
any text (read only)[action dependant]NoThe name of the action which is shown in the action types list. This is defined by the action and is not able to be changed. All actions of the same type will have the same name.
Package
Action.SendLogMessage(Action.Package, stInformation);
any text (read only)[action dependant]NoThe filename of the package from which the action was loaded. All actions from the same package will have the same package filename.

Logging

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
ActionLogTitle
Action.ActionLogTitle = 'Upload [ Installer ]';
any text (single line shown)Action.DescriptionOn saveSets a different description for the action for logging purposes. This description is only ever used in the log.
ExpandActionLogTitle
Action.ExpandActionLogTitle = false;
true, falsetrueOn saveEnables variables in the ActionLogTitle to be expanded. The expansion occurs at the time of logging.
HideActionFromLog
Action.HideActionFromLog = true;
true, falsefalseOn saveHides the action from the log. If the action execution results in an error the action is logged, effectively ignoring this setting.
LogActionProperties
Action.LogActionProperties = true;
true, falsefalseOn saveRecords the properties of the action to the log before the action is run.
LogToVariable
Action.LogToVariable = 'MyVariable';
text name of variable[blank]On saveSpecifies which variable should have the output of the action written to it. The selected variable is required to be available to the action, otherwise an error will be raised. The variable will contain the actions output after the action has run.
SuppressStatusMessages
Action.SuppressStatusMessages = true;
true, falsefalseOn saveStops the logging of all the actions status messages. This stops the action status messages from being generated, so OnStatusMessage events will not fire when this options is turned on.

Other

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
ErrorCount
if (Action.ErrorCount > 0)
   Action.SendLogMessage('There were errors', stError);
any positive 32-bit integer (read only)0NoReturns the number of errors the action has encountered during its run. Some actions can encounter more than one error before failing.
Errors
Action.SendLogMessage('Errors encountered' + Action.Errors, stError);
any text (read only)[blank]NoReturns the description of all the errors encounter by the action during it run. The error descriptions are concatenated with new lines between each entry.
Locked
Action.Locked = true;
true, falsefalseOn saveLocks the properties on the action so that they can not be changed through the action dialog. When turned on, the only property which can be altered is the locked property itself. Turning this off again means all other properties can be altered through the actions edit dialog.
TimedOut
if (Action.TimedOut)
   Action.SendLogMessage('Action timed out', stWarning);
true, false (read only)falseNoSet to true when the action has timed out waiting for the underlying tool to complete.

Execute Action Scripting Properties

Extra Command Line

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
ExtraCmdLineParamsAtEnd
Action.ExtraCmdLineParamsAtEnd = '\s \p Text.txt';
any text (validated by underlying tool)[blank]On saveSpecifies additional command line parameters for the underlying tool. These are added after all command line parameters added by the action.
ExtraCmdLineParamsAtStart
Action.ExtraCmdLineParamsAtStart = '\q \ignore:3';
any text (validated by underlying tool)[blank]On saveSpecifies additional command line parameters for the underlying tool. These are added before all command line parameters added by the action.

Process

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
UseErrorDialogMonitor
Action.UseErrorDialogMonitor = true;
true, falsefalseOn saveSpecifies whether to automatically watch for an error dialog which has stalled the underlying tool. The dialog will be closed, and if this is not possible the process will be terminated. This option does not work with all underlying tools.
ProcessPriority
Action.ProcessPriority = tpBelowNormal;
tpIdle, tpBelowNormal, tpNormal, tpAboveNormaltpNormalOn saveSpecifies at what priority processes spawned by the action will have. Note that setting an idle priority will most likely mean the action will not progress. tpIdle is only included for completeness, typically it should not be used.
ProcessorAffinity
Action.ProcessorAffinity = 243;
0 (unset), 1 to 255 (bit mask)0On save

Specifies which processors spawned processes of the action will be allowed to run on. The value is in the form of a bit mask. The mask depends on the number of processors available on the running machine.

A bit mask of 1101 1111 ( = 223 ) for a six processor machine would mean spawned processes could run all but the 6th processor.

Run As User

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
ImpersonateUserName
Action.ImpersonateUserName = 'domain/username';
[domain]/[username][blank]On save

Specifies the user credentials with which to run processes spawned by the action. The user that FinalBuilder is running under, will require the permissions to elevate their rights and impersonate other users for this to be allowed.

ImpersonateUser needs to be set to true for this to be used.

ImpersonateUseNetCredOnly
ActionImpersonateUseNetCredOnly = true;
true, falsefalseOn save

Specifies whether the impersonation should only use the network component of the supplied users credentials. This allows for simpler access to network resources which have restricted access.

ImpersonateUser needs to be set to true for this to be used.

ImpersonateUser
Action.ImpersonateUser = true;
true, falsefalseOn saveSpecifies whether processes spawned by the action should be run under a different set of user credentials.
ExpandImpersonateToken
Action.ExpandImpersonateToken = true;
true, falsefalseOn saveSpecifies whether to expand variables found within the impersonate user password. This is handy for setting the password to a variable and then loading from a secure file, or using a passed in variable when the script is run.
ImpersonateUserPassword
Action.ImpersonateUserPassword = '8as0dk9JLa!df';
any text[blank]On saveSpecifies the password to use for the user who is being impersonated. Once set the value is encrypted for saving into the project (if its saved after this script is called).

Timeout

Script PropertyExample (Javascript)Valid ValuesDefaultPersistedDescription
EnableTimeout
Action.EnableTimeout = true;
true, falsefalseOn saveSpecifies whether the action should fail if the TimeoutLength expires. The TimeoutLength is counted from the start of the action running.
TimeoutLength
Action.TimeoutLength = 2;
any positive 32-bit integer
1On saveSpecifies the number of minutes to wait after the start of an action to complete. If the action does not complete before the timeout length has expired the action is given a failure result, and the TimedOut property is set to true.

  • No labels