Skip to content

Commit

Permalink
docs(reference): describe restrictions of a variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
saig0 committed Apr 30, 2020
1 parent df2927a commit 7563f21
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/src/reference/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

Variables are part of a workflow instance and represent the data of the instance. A variable has a name and a JSON value. The visibility of a variable is defined by its variable scope.

## Variable Names

The name of a variable can be any alphanumeric string including the `_` symbol. For a combination of words, it is recommended to use the `camelCase` or the `snake_case` format. The `kebab-case` format is not allowed because it contains the operator `-`.

When accessing a variable in an expression, keep in mind that the variable name is case-sensitive.

Restrictions of a variable name:
* it may not start with a number
* it may not contain whitespaces
* it may not contain an operator (e.g. `+`, `-`, `*`, `/`, `=`, `>`, `?`, `.`)
* it may not be a literal (e.g. `null`, `true`, `false`) or a keyword (e.g. `function`, `if`, `then`, `else`, `for`, `between`, `instance`, `of`, `not`)

## Variable Values

The value of a variable is stored as a **JSON** value. It must have one of the following types:
Expand Down

0 comments on commit 7563f21

Please sign in to comment.