-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #614 from camunda/new-docs-version-1.16
docs: Create a new docs version for 1.17
- Loading branch information
Showing
48 changed files
with
5,452 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
docs/versioned_docs/version-1.16/changelog/changelog.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
--- | ||
id: changelog | ||
title: Changelog | ||
slug: /changelog/ | ||
--- | ||
|
||
import MarkerChangelogVersion from "@site/src/components/MarkerChangelogVersion"; | ||
|
||
This page contains an overview of the released versions and highlights the major changes from a user | ||
point of view (i.e. focus on features). The complete changelog, including the patch | ||
versions, can be found on the [GitHub release page](https://github.com/camunda/feel-scala/releases). | ||
|
||
# 1.16 | ||
|
||
<MarkerChangelogVersion versionZeebe="8.2.0" versionC7="not yet" /> | ||
|
||
|
||
**Built-in functions:** | ||
|
||
* New built-in function [get value()](../reference/builtin-functions/feel-built-in-functions-context#get-valuecontext-keys) to access a context with a dynamic path | ||
* New built-in function [context put()](../reference/builtin-functions/feel-built-in-functions-context#context-putcontext-keys-value) to insert a nested value in a context | ||
* New built-in function [last day of month()](../reference/builtin-functions/feel-built-in-functions-temporal#last-day-of-monthdate) to get the last day of a month | ||
* New built-in function [date and time()](../reference/builtin-functions/feel-built-in-functions-conversion#date-and-timedate-timezone) to get a date-time for a timezone | ||
* New built-in function [random number()](../reference/builtin-functions/feel-built-in-functions-numeric#random-number) to get a random number | ||
|
||
See the full changelog [here](https://github.com/camunda/feel-scala/releases/tag/1.16.0). | ||
|
||
## 1.15 | ||
|
||
<MarkerChangelogVersion versionZeebe="8.1.0" versionC7="7.19.0" /> | ||
|
||
**Expressions:** | ||
|
||
* New `@` notation for [temporal literals](../reference/language-guide/feel-temporal-expressions.md#literal) | ||
|
||
See the full changelog [here](https://github.com/camunda/feel-scala/releases/tag/1.15.0). | ||
|
||
## 1.14 | ||
|
||
<MarkerChangelogVersion versionZeebe="1.3.1" versionC7="7.18.0" /> | ||
|
||
**Built-in functions:** | ||
|
||
* New function [extract()](../reference/builtin-functions/feel-built-in-functions-string.md#extract) | ||
that applies a regular expression to a given a string | ||
* New | ||
function [string join()](../reference/builtin-functions/feel-built-in-functions-list.md#string-join) | ||
that merges a list of strings into a single string | ||
* New [range functions](../reference/builtin-functions/feel-built-in-functions-range.md) to compare | ||
ranges and scalar values | ||
* New functions to round numeric values: | ||
* [round up()](../reference/builtin-functions/feel-built-in-functions-numeric.md#round-up) | ||
* [round down()](../reference/builtin-functions/feel-built-in-functions-numeric.md#round-down) | ||
* [round half up()](../reference/builtin-functions/feel-built-in-functions-numeric.md#round-half-up) | ||
* [round half down()](../reference/builtin-functions/feel-built-in-functions-numeric.md#round-half-down) | ||
* Extend function [abs()](../reference/builtin-functions/feel-built-in-functions-temporal.md#abs) for | ||
duration values | ||
|
||
See the full changelog [here](https://github.com/camunda/feel-scala/releases/tag/1.14.0). | ||
|
||
## 1.13 | ||
|
||
<MarkerChangelogVersion versionZeebe="1.0.0" versionC7="7.15.0" /> | ||
|
||
**Expressions:** | ||
|
||
* Access the property [weekday](../reference/language-guide/feel-temporal-expressions.md#properties) | ||
of date and date-time values | ||
* Allow escape sequences in [string literals](../reference/language-guide/feel-data-types.md#string) | ||
|
||
**Built-in functions:** | ||
|
||
* New | ||
function [context()](../reference/builtin-functions/feel-built-in-functions-conversion.md#context) | ||
that creates a context from a given key-value list | ||
* New function [put()](../reference/builtin-functions/feel-built-in-functions-context.md#put) that | ||
extends a context by a given entry | ||
* New | ||
function [put all()](../reference/builtin-functions/feel-built-in-functions-context.md#put-all) | ||
that merges the given contexts | ||
|
||
See the full changelog [here](https://github.com/camunda/feel-scala/releases/tag/1.13.0). | ||
|
||
## 1.12 | ||
|
||
<MarkerChangelogVersion versionZeebe="0.25.0" versionC7="7.14.0" /> | ||
|
||
**Built-in functions:** | ||
|
||
* New function [now()](../reference/builtin-functions/feel-built-in-functions-temporal.md#now) that | ||
returns the current date-time | ||
* New function [today()](../reference/builtin-functions/feel-built-in-functions-temporal.md#today) | ||
that returns the current date | ||
* New | ||
function [week of year()](../reference/builtin-functions/feel-built-in-functions-temporal.md#week-of-year) | ||
that returns the number of the week within the year | ||
* New | ||
function [month of year()](../reference/builtin-functions/feel-built-in-functions-temporal.md#month-of-year) | ||
that returns the name of the month | ||
* New | ||
function [day of week()](../reference/builtin-functions/feel-built-in-functions-temporal.md#day-of-week) | ||
that returns name of the weekday | ||
* New | ||
function [day of year()](../reference/builtin-functions/feel-built-in-functions-temporal.md#day-of-year) | ||
that returns the number of the day within the year | ||
|
||
See the full changelog [here](https://github.com/camunda/feel-scala/releases/tag/1.12.0). | ||
|
||
|
||
## 1.11 | ||
|
||
<MarkerChangelogVersion versionZeebe="0.23.0" versionC7="7.13.0" /> | ||
|
||
**Expressions:** | ||
|
||
* Access the [element of a list](../reference/language-guide/feel-list-expressions.md#get-element) using a numeric variable | ||
* Disable [external functions](../reference/language-guide/feel-functions.md#external) by default for security reasons | ||
|
||
See the full changelog [here](https://github.com/camunda/feel-scala/releases/tag/1.11.0). |
23 changes: 23 additions & 0 deletions
23
docs/versioned_docs/version-1.16/playground/playground.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
id: playground | ||
title: Playground for FEEL expressions | ||
--- | ||
|
||
import LiveFeel from "@site/src/components/LiveFeel"; | ||
import dedent from "dedent"; | ||
|
||
:::danger Work in progress | ||
The playground is created as part of our Camunda Summer Hack Days project 2022. | ||
|
||
It may be broken. But stay tuned for updates! | ||
::: | ||
|
||
Use the interactive editor below to evaluate | ||
[FEEL expressions](/docs/reference/language-guide/feel-expressions-introduction.md). | ||
|
||
<LiveFeel | ||
defaultExpression={dedent` | ||
3 + x`} | ||
feelContext='{"x": 5}' | ||
metadata={{ page: "tutorial-playground" }} | ||
/> |
Binary file added
BIN
+71.3 KB
...d_docs/version-1.16/reference/assets/feel-built-in-functions-range-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions
57
...ocs/version-1.16/reference/builtin-functions/feel-built-in-functions-boolean.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
id: feel-built-in-functions-boolean | ||
title: Boolean functions | ||
description: "This document outlines current boolean functions and a few examples." | ||
--- | ||
|
||
import MarkerCamundaExtension from "@site/src/components/MarkerCamundaExtension"; | ||
|
||
## not(negand) | ||
|
||
Returns the logical negation of the given value. | ||
|
||
**Function signature** | ||
|
||
```js | ||
not(negand: boolean): boolean | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
not(true) | ||
// false | ||
|
||
not(null) | ||
// null | ||
``` | ||
|
||
## is defined(value) | ||
|
||
<MarkerCamundaExtension></MarkerCamundaExtension> | ||
|
||
Checks if a given value is defined. A value is defined if it exists, and it is an instance of one of the FEEL data types including `null`. | ||
|
||
The function can be used to check if a variable or a context entry (e.g. a property of a variable) exists. It allows differentiating between a `null` variable and a value that doesn't exist. | ||
|
||
**Function signature** | ||
|
||
```js | ||
is defined(value: Any): boolean | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
is defined(1) | ||
// true | ||
|
||
is defined(null) | ||
// true | ||
|
||
is defined(x) | ||
// false - if no variable "x" exists | ||
|
||
is defined(x.y) | ||
// false - if no variable "x" exists or it doesn't have a property "y" | ||
``` |
153 changes: 153 additions & 0 deletions
153
...ocs/version-1.16/reference/builtin-functions/feel-built-in-functions-context.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
--- | ||
id: feel-built-in-functions-context | ||
title: Context functions | ||
description: "This document outlines context functions and a few examples." | ||
--- | ||
|
||
import MarkerCamundaExtension from "@site/src/components/MarkerCamundaExtension"; | ||
|
||
## get value(context, key) | ||
|
||
Returns the value of the context entry with the given key. | ||
|
||
**Function signature** | ||
|
||
```js | ||
get value(context: context, key: string): Any | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
get value({foo: 123}, "foo") | ||
// 123 | ||
|
||
get value({a: 1}, "b") | ||
// null | ||
``` | ||
|
||
## get value(context, keys) | ||
|
||
Returns the value of the context entry for a context path defined by the given keys. | ||
|
||
If `keys` contains the keys `[k1, k2]` then it returns the value at the nested entry `k1.k2` of the context. | ||
|
||
If `keys` are empty or the nested entry defined by the keys doesn't exist in the context, it returns `null`. | ||
|
||
**Function signature** | ||
|
||
```js | ||
get value(context: context, keys: list<string>): Any | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
get value({x:1, y: {z:0}}, ["y", "z"]) | ||
// 0 | ||
|
||
get value({x: {y: {z:0}}}, ["x", "y"]) | ||
// {z:0} | ||
|
||
get value({a: {b: 3}}, ["b"]) | ||
// null | ||
``` | ||
|
||
## get entries(context) | ||
|
||
Returns the entries of the context as a list of key-value-pairs. | ||
|
||
**Function signature** | ||
|
||
```js | ||
get entries(context: context): list<context> | ||
``` | ||
|
||
The return value is a list of contexts. Each context contains two entries for "key" and "value". | ||
|
||
**Examples** | ||
|
||
```js | ||
get entries({foo: 123}) | ||
// [{key: "foo", value: 123}] | ||
``` | ||
|
||
## context put(context, key, value) | ||
|
||
Adds a new entry with the given key and value to the context. Returns a new context that includes the entry. | ||
|
||
If an entry for the same key already exists in the context, it overrides the value. | ||
|
||
**Function signature** | ||
|
||
```js | ||
context put(context: context, key: string, value: Any): context | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
context put({x:1}, "y", 2) | ||
// {x:1, y:2} | ||
``` | ||
|
||
:::info | ||
The function `context put()` replaced the previous function `put()` (Camunda Extension). The | ||
previous function is deprecated and should not be used anymore. | ||
::: | ||
|
||
## context put(context, keys, value) | ||
|
||
Adds a new entry with the given value to the context. The path of the entry is defined by the keys. Returns a new context that includes the entry. | ||
|
||
If `keys` contains the keys `[k1, k2]` then it adds the nested entry `k1.k2 = value` to the context. | ||
|
||
If an entry for the same keys already exists in the context, it overrides the value. | ||
|
||
If `keys` are empty, it returns `null`. | ||
|
||
**Function signature** | ||
|
||
```js | ||
context put(context: context, keys: list<string>, value: Any): context | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
context put({x:1}, ["y"], 2) | ||
// {x:1, y:2} | ||
|
||
context put({x:1, y: {z:0}}, ["y", "z"], 2) | ||
// {x:1, y: {z:2}} | ||
|
||
context put({x:1}, ["y", "z"], 2) | ||
// {x:1, y: {z:2}} | ||
``` | ||
|
||
## context merge(contexts) | ||
|
||
Union the given contexts. Returns a new context that includes all entries of the given contexts. | ||
|
||
If an entry for the same key already exists in a context, it overrides the value. The entries are overridden in the same order as in the list of contexts. | ||
|
||
**Function signature** | ||
|
||
```js | ||
context merge(contexts: list<context>): context | ||
``` | ||
|
||
**Examples** | ||
|
||
```js | ||
context merge([{x:1}, {y:2}]) | ||
// {x:1, y:2} | ||
|
||
context merge([{x:1, y: 0}, {y:2}]) | ||
// {x:1, y:2} | ||
``` | ||
|
||
:::info | ||
The function `context merge()` replaced the previous function `put all()` (Camunda Extension). The | ||
previous function is deprecated and should not be used anymore. | ||
::: |
Oops, something went wrong.