1
votes

Here is what I come across in process definition examples:

<conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Approve'}</conditionExpression>

It's obvious what the code does, but I want to learn more about FormalExpression, like, where it comes from and what else can be done with it beyond comparing two values.

1

1 Answers

2
votes

FormalExpression is declared as part of the BPMN 2.0 specification.

From the spec:

The FormalExpression class is used to specify an executable Expression using a specified Expression language. 

What can be achieved by the expression is going to be different based on the engine you are using, in the case of Activiti, the expression language is JUEL.

Typically expressions are used primarily for conditional gateways and so simple comparisons to strings such as approved/rejected etc are all that is needed, however you can make the expression script as complex as you deem fit (keep in mind maintainability).

Hope this helps, Greg