@camunda/feel-builtins
v1.0.0
Published
Collection of builtin Camunda extensions for FEEL
Maintainers
Keywords
Readme
Camunda FEEL Builtins
Collection of builtin Camunda extensions for FEEL (Friendly Enough Expression Language). These builtins get extracted from camunda-docs.
Installation
Install via npm:
npm install @camunda/feel-builtinsUsage
This package exports multiple collections of FEEL builtins:
camundaBuiltins: Collection of builtins of camunda scala FEEL.feelBuiltins: List of standard FEEL built-in functions (excluding Camunda-specific extensions).camundaExtensions: List of FEEL camunda extensions.camundaReservedNameBuiltins: Functions using reserved keywords in their name and need to be added to the parser context during parsing.
You can feed built-ins as context into your favorite FEEL editor or validator.
Feel Editor
In your FEEL editor you can use these builtins to establish the Camunda context:
import { camundaBuiltins } from '@camunda/feel-builtins';
import FeelEditor from '@bpmn-io/feel-editor';
const editor = new FeelEditor({
container,
builtins: camundaBuiltins,
parserDialect: 'camunda'
});If you only want standard FEEL functions, use feelBuiltins instead:
import { feelBuiltins } from '@camunda/feel-builtins';
const editor = new FeelEditor({
container,
builtins: feelBuiltins
});Feel Lint
With @bpmn-io/feel-lint you can also use the builtins to lint expressions in the Camunda world:
import { camundaBuiltins } from '@camunda/feel-builtins';
import { lintExpression } from '@bpmn-io/feel-lint';
lintExpression(expression, {
builtins: camundaBuiltins,
parserDialect: 'camunda'
});Resources
Build and Run
Prepare the project by installing dependencies:
npm installThen, depending on your use-case you may run any of the following commands:
# lint the library and run all tests
npm run all
# update the built-ins from latest camunda-docs
npm run update-builtinsRelated
- @bpmn-io/feel-editor: FEEL editor and playground
- @bpmn-io/feel-lint: A linter for FEEL expressions
