Operation script API reference
In operation scripts, the definitions below are available through the kreya namespace.
Furthermore, depending on the operation type, kreya.rest, kreya.grpc or kreya.webSocket is available.
Additionally all general Kreya APIs and bundled modules are available, see general script API reference.
kreya.trace('Starting operation invocation of ' + kreya.operation.current.name);
// Wait until some other operation sets this variable
while (!kreya.variables.has('my_var')) {
kreya.sleep(10);
}
kreya.trace('Variable my_var has been set to ' + kreya.variables.get('my_var'));
Variables
operation
const operation: OperationContainerScriptApi;
OperationContainerScriptApi
Kreya scripting API for operations.
Type Aliases
OperationContainerScriptApi
type OperationContainerScriptApi = {
current: OperationCurrentScriptApi;
};
Kreya scripting API for operations.
Properties
current
readonly current: OperationCurrentScriptApi;
The current operation.
OperationCurrentScriptApi
type OperationCurrentScriptApi = {
name: string;
};
APIs to access an operation.
Properties
name
readonly name: string;
The name of the operation.