Script¶
Provides general-purpose utility functions.
1 | |
Capabilities¶
Assertions¶
- ScriptType.Assert: Asserts that the specified condition is true. If the condition is false, an error is thrown.
- ScriptType.AssertEquals: Asserts that the expected value is equal to the actual value. If the values are not equal, an error is thrown.
- ScriptType.AssertNotEquals: Asserts that the expected value is not equal to the actual value. If the values are equal, an error is thrown.
Utilities¶
- ScriptType.FromBase64: Converts the given Base64 encoded string to a regular string.
- ScriptType.NewId: Returns a new GUID (Globally Unique Identifier) value.
- ScriptType.ToBase64: Converts the given string to a Base64 encoded string.
Execution Control¶
- ScriptType.Isolated: Executes the given callback function in an isolated transaction.
- ScriptType.ThrowIfCancelled: Throws an error if the current transaction is cancelled.
- ScriptType.Timeout: Executes the given callback function within a specified time limit (in milliseconds).