Installer automations

Version 1.254+

It’s possible to trigger automations when an application is installed or updated. This allows the automations to set up some application specific configurations (example: cafa configurations or base kvs data).

For this create an automation and set its name in the application edit screen.

Install automation Install automation

Note

Installation will not fail if the automations fail or do not exist, so make sure the given automation exists and is linked to the application.

Install automation special data

There are 2 special fields available when the automation is triggered from the installation.

  • fromVersion - the version number the user had before, value will be 0 if this is a fresh install
  • toVersion - the version that is being installed

These values can be used to produce certain conditions for the automations.

{{ $fromVersion := .Data.Automation.Request.Get "fromVersion" }}
{{ $toVersion := .Data.Automation.Request.Get "toVersion" }}

{
    "postOperations": [
        {
            "CustomApi.Api.Post.myRequest1": "some-api-call"
        }
    ],
    "enabled": true
}