Share this page

# TCA.done

Finishes an asynchronous operation and returns the result.

Note: The execution engine waits for completion notification after asynchronous APIs are called. It waits until TCA.done(result) is called if the execution succeeds, or until TCA.doneWithError(error) is called if the execution fails; the call should be at the end of the execution path of the JavaScript block. If neither are called, the current step fails with “Evaluate JavaScript code timeout” error.

    TCA.done(result);

## Arguments

result. (Optional, any) The result of the JavaScript block execution.

## Return value

None

## Example

Copy code

    IOA.read(TC.scriptDir + "mylog.txt").then(function(data){
      TCA.done(data);
    }).catch(function (error) {
      TCA.doneWithError(error);
    });

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: