How to write the expression for the Implementation of a Business Rule Task of Type Expression

How to write the expression for the Implementation of a Business Rule Task of Type Expression. For example, what I want is somethin like the following:

if inputVar = “male” then "Sir. " or "Madam. "

And the result will be assign to the Result Variable “title”.

Ref: Expressions | Camunda 8 Docs

[quote]
Expressions always start with an equals sign (= ). For example, = order.amount > 100 . The text following the equal sign is the actual expression…[/quote]

Thanks

Hi @linforestzhang
Unfortunately, it looks like you’re mixing Camunda7 with Documentation from Camunda8.

The C7 Documentation on Expression Language doesn’t make it really clear how to use Expression as a business rule. Personally I’d probably just call out to a very simple DMN since that’s much more straightforward.

1 Like

Hi @linforestzhang,

I’ve tried it with
grafik

as documented here Jakarta Expression Language

It works:

Hope this helps, Ingo

2 Likes

Indeed, DMN is a pretty simple solution. Yes, it is because of lack of docs of Camunda 7. Thanks.

Wow, it’s working now!
Thanks, Ingo_Richtsmeier :smiley:

image

Nested Jakarta expression also works:

Similar to Excel IF formula…

There is a complete set of Camunda 7 documents, and they are updated… The trick is to watch carefully to see if you are looking at Camunda 7 docs or Camunda 8 docs. The link I posted is a link to Camunda 7 documentation

Right, as a beginner, there are much more I need to read. Sorry for my inappropriate comment.

Your comment is not inappropriate at all!

I was only meaning to point out that it does exist, and is kept up to date. But also at the same time difficult to find.

I have found that often things pull back into the Camunda 8 documentation, when I started in C7 documentation… I’ve made the mistake of mixing C7 and C8 concepts together, and I want to help others avoid that error… Try to help you learn from my mistakes instead of letting you repeat them.

1 Like

Got it. You’re very kind!

BPMN/DMN… Modeling involves some other languages/specifications, which often complicates the learning process of a beginner.

Many thanks again.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.