Cloud Action Runner Overview

This reference guide provides in-depth information about the Action Runner scripting language (aka Octave.js) used for implementing scripts in Cloud Actions that run logic in the cloud.

JavaScript Environment

Action Runner is built around Octave.js, our server-side JavaScript processing environment. It gives you a library under the Octave namespace. It also executes your code on our servers, ensuring that your code executes safely–both for you and for everyone else on our platform.

Octave.js provides methods for CRUD operations on select Octave domain objects from within Actions. These methods are available in the global namespace Octave.

The Octave namespace provides find() and get() under the sub namespaces: Stream, Event, and Action (see Cloud JavaScript Library for more information). Event also includes aggregate(), findOne(), and findHash() methods.

ECMAScript 5

The environment that executes your code is in strict mode, a restricted subset of JavaScript 5.1. For more information, read the documentation.

With this version you should avoid declaring global variables (use var x = 1; instead of just simply x = 1;). For more information about strict mode, read the Mozilla Developer Network article.

We do not support most features of ECMAScript 6 and we also disallow the use of eval. If you are not familiar with JavaScript, get started in a few minutes with the following resources:

Cloud JavaScript APIs

Octave's Cloud JavaScript Library provides an API that can be invoked in Cloud Actions, Tasks, and Cloud Connectors.

Cloud JavaScript API Limitations

All of the APIs in the Cloud JavaScript Library can be invoked in Cloud Actions, Tasks, and Cloud connectors, with the exception of the following:

ContextAPIs Which Can't be Invoked in this Context
Cloud ActionOctave.Device.get()
Octave.Device.find()
Octave.Device.update()
TasksOctave.Device.getName()

📘

Note

Octave.Device.getName() can only be used for device-originated Events.