Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(reference): describe restrictions of a variable name #4411

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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