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"

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

Arrays

Is an ordered list of elements (numbers, texts, booleans, objects, ...) separated by commas (,)

Array of numbers

[1, 2, 3, 4]

Array of strings

["engineering", "marketing"]

Objects

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

Access to object properties

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

For example:

account.number

account.type

account.balance

Object representation

{number:"23423422918", type:"Checking", balance: 102929000.00}

Boolean

A boolean expresses a truth value (true or false)

For true: true

For false: false

Boolean Operations:

And operator: approved and signed

Or operator: approved or signed

Negation operator: not approved

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

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

Clone this wiki locally