Skip to content

I can fail an evaluation #888

@saig0

Description

@saig0

Is your feature request related to a problem? Please describe.
In the context of BPMN, I want to write a FEEL expression that contains some form of validation logic. Similar to throwing a BPMN error in a connector's expression: example.

If the validation fails then I want to fail the expression evaluation and create an incident in BPMN. Currently, I could use the assert() function. However, the function feels cumbersome and could lead to nested expressions.

if x < 0
then error("should be positive")
else x + y

Describe the solution you'd like
Add a new function that fails the evaluation.

// function signature
error(failureMessage: string): Failure

// example
error("should be positive")

Related issues

  • Camunda Autormation Platform 7:
  • Zeebe broker:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions