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 29, 2020
1 parent df2927a commit f03b1ce
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.

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

Restrictions of a variable name:
* it must not start with a number
* it must not contain whitespaces
* it must not contain an operator (e.g. `+`, `-`, `*`, `/`, `=`, `>`, `?`, `.`)
* it must not be a literal (`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 f03b1ce

Please sign in to comment.