Action Functions - bettyblocks/cli Wiki

Introduction

Functions are snippets of code that can be published to the Actions IDE so that they can be used as ActionSteps in Actions. We currently only support functions written in Javascript.

Action Functions can be initialised, validated and published using the bb functions namespace of the CLI.

Each Action Function consists of two parts.

  1. The implementation of the function itself, written in Javascript.
  2. The function definition, describing the workings in a JSON format following a predefined JSON Schema.

This wiki contains information on how to create new functions and then validate and publish them.

Getting started

  1. To get started with Action Functions, make sure you first install the CLI.

  2. After you've installed the CLI, hop over to the documentation to find out how to create a new Functions project. Check out these examples on how to define your Function.

  3. Once you're done defining and implementing your function, you're ready to publish.

Quickstart

For an application called my-own-app

$ npm install -g @betty-blocks/cli
$ bb functions init my-own-app --app
$ cd my-own-app
$ bb functions new hello-world
$ bb functions publish

FAQ

If you have any questions, be sure to check out our FAQ

Additional links

  • JSON Schema This is the schema that functions should adhere to
  • Native Functions All of the functions that come prepackaged with each Application. Use these as examples to build your own functions.