Skip to content

PM4 Expression Language

Caleeli edited this page Jan 3, 2019 · 5 revisions

Processmaker FEEL component uses a specific syntax which is based on the Symphony Expression Language. In this document, you can find all supported syntaxes:

Texts

A text is a series of characters, that can be specified in two different ways:

Single quoted:

This way to specify a text is to enclose it in single quotes (the character ').

'text'

To specify a literal single quote, escape it with a backslash ().

'I\'ll be back'

To specify a literal backslash, double it (\)

'File path C:\\ProcessMaker'

Double quoted:

You could also specify a text enclosing it in double quotes (the character ").

"text"

Comparison Operators

Equiality

progress == 100

Less than

progress < 100

Greater than

progress > 50

Less than or equal to

progress <= 75

Greater than or equal to

progress >= 25

Compare a field to a string:

color == "lightblue"

String match to expression:

color matches "/light/"

Concat two strings:

firstname ~ " " ~ lastname

Numbers

Numbers integers or decimals can be specified in decimal base (10)

1000

Decimal or floating number 100.01

Negative number:

-10

Arithmetic Operations:

Sum: Liabilities + Equity

Subtraction: Revenues – Expenses

Multiplication: Sales * Profit

Division: Costs / Price – VCPU

Check if a number is in a range

age in 18..45

Boolean

A boolean expresses a truth value (true or false)

For true: true

For false: false

Boolean Operations:

approved and signed

not approved

not (approved or signed)

Arrays

Array of numbers

[1, 2, 3, 4]

Array of strings

["engineering", "marketing"]

Check if a value is contained by an array

group in ["engineering", "marketing"]

Check if an array contains a value

group in allowed_groups

Check if an array does not contains a value

group not in restricted_groups

Objects

An object is a composed data type which stores information organized by properties.

For example:

Access to object properties

Properties of an object can be accessed by using the dot (.)

account.number

account.type

account.balance

Clone this wiki locally