Skip to main content

Automations reference


Where everything is kept​

WhatServiceNotes
AutomationsautomationShared by all companies on the platform, so every record holds its company and environment, and you only see your own. Each automation has a target, a template (the sentence), conditions (the triggers: source, service, id, action, and did for derived items), properties (the settings), enabled and owner
RunsautomationlogYour company's private data, one record per run, see The automation log
TargetsautomationtargetOpenDataDSL's public targets and your company's private ones; a private target replaces a public one with the same id

The REST services are described in the REST API guide: automation, automationlog and automationtarget.


Ownership​

An automation runs as its owner: it can only read the items and use the scripts its owner can, and sends what its owner is allowed to see.

The platform sets the owner every time an automation is saved: it becomes the person who saved it. In this extension that happens when you:

  • select Save in the editor,
  • turn an automation on or off, with its switch or with Enable and Disable,
  • create an automation.
caution

Before changing someone else's automation, check that you have access to everything it uses. Otherwise it may stop working once you are its owner. The editor warns you when the owner is someone else.

Saving also sets the automation's environment to the one you are signed in to.


Test runs​

Run now in the editor runs the saved automation straight away:

  • It uses the automation's first trigger. The platform reads its item as it is now. For a curve, that is the latest curve, or the curve for the Ondate you chose. For an automation on an event curve or event timeseries, the curve or timeseries itself is read, not the event list it is built from.
  • It runs even when the automation is disabled.
  • It runs as you, not as the owner, and it does not change the owner.
  • It is recorded in the automation log with the reason Test Run, and shown as Test run in the Activity tab and test in the editor's recent runs.
  • It cannot run for an automation on any item (*).
  • It fails with "Unable to run" when the item does not exist.

The automation log​

FieldWhat it holds
timestampWhen the automation ran (UTC)
statussuccess, failed, or another status the target returned
messageThe target's message
automationThe automation's id
targetThe target's id
keyThe item that triggered the run (for an automation on any item, the actual item)
source, service, action, propertyThe trigger
ondateThe curve's ondate, for curves
methodProcess (the platform's automation process) or Direct (in the request that changed the item, with the application)
reasonWhat caused it, such as Update from: priya.shah@northgate-energy.com, or Test Run
invocationId, rootInvocationIdThe request ids, to find the run in the platform's logs

What the extension installs​

KindIdWhat it is
Feature policyextension.odsl.automationsGives everyone the odsl.automations.manage feature. Change its members to limit who sees the screen
Menu itemOperations, AutomationsThe screen with the Overview, Automations, Activity, Targets and New tabs
Insight reportsodsl.automations.by_target, odsl.automations.by_service, odsl.automations.failures, odsl.automations.busiestCategory Automations

The feature only decides who sees the screen. What each person can read and change is decided by the platform's security policies, as everywhere else.


Troubleshooting​

What you seeWhy, and what to do
An automation never runsCheck it is enabled, that its item is the right one (the source matters: an item in common data is not the same as a private one), and that the action is the one that really happens (a curve loaded by a process is updated, not created)
It runs but every run failsRead the message in the Activity tab. Common causes: the target no longer exists (the editor says so), a setting is wrong (a queue name, an email address), the transformer script was renamed, or the owner no longer has access to the item or script
A message such as Request failed: 403 Forbidden - ...The platform refused the change. The text after the dash is the platform's reason, usually a missing permission
Last run says Never for an automation that runsRuns are only counted for the environment you are signed in to
The New tab does not find an itemCheck the Service and Source. You can also type the full id and select Show what it can do
A target is missing from the New tabThe target does not work with the item's service or with the action you filtered on. See its Works with on the Targets tab
An automation keeps coming back after it is deletedAnother extension keeps it, such as Validation or Composer. Change it there