Timeout¶
Executes a callback with a server-side time limit.
myScript.Timeout(fn: () => ( T | Promise"null" )
Parameters¶
() => ( T | Promise
The callback to execute. Server workflow scripts may return a value or a promise.
number milliseconds
The positive time limit in milliseconds.
Returns¶
The callback result on success; otherwise null.
Remarks¶
Server workflow scripts only. null represents both a timeout and a callback failure because the server captures either outcome. Use a result value that can be distinguished from null when that distinction matters. This method does not provide transaction isolation; combine it with Isolated() only when an independent transaction is intentionally required.
Example¶
1 2 3 4 5 6 7 | |