Skip to content

Commit

Permalink
Merge #4411
Browse files Browse the repository at this point in the history
4411: docs(reference): describe restrictions of a variable name r=saig0 a=saig0

## Description

* avoid that users use an invalid name for a variable by describing how a variable name should look like

## Related issues

none

#

Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
  • Loading branch information
zeebe-bors[bot] and saig0 committed Apr 30, 2020
2 parents 0ebc1dc + 7563f21 commit 48b876e
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 48b876e

Please sign in to comment.