Camunda Extension

Could you please explain how the Camunda Extension works? Here is the link where I found it:
Link Camunda Extension

Thank you for your help!

The flag “Camunda Extension” on the FEEL functions indicates that Camunda added something that is not in the default FEEL language definition.

The particular function you linked to is the to base64 function, which includes a usage example. Are you asking how converting to Base 64 works?

“This ‘Camunda Extension’ did not work for me. Can you explain how I can activate this ‘Camunda Extension’?”

Can you explain what you tried, and where?

I have a variable named data_katm_yatt. This variable contains a JSON array. I want to send this variable to an API. However, this API only accepts a string. So, I need to convert this JSON array into a string. I’m doing it as follows:

FEEL code:

{
  "dealId": crm_application_id,
  "log": string(data_katm_yatt),
  "type": "type",
  "comment": "data_katm_yatt"
}

Here, an error occurs. In the log variable, the data is a string, but the JSON array loses its keys in their original format.

Before:

{"dev":"N", "credit_exemption":"", "phone":"123456798", "gender":"1"}

After:

{dev:"N", credit_exemption:"", phone:"123456798", gender:"1"}

Because of this, I want to encode the JSON array into Base64 format.

FEEL code:

{
  "dealId": crm_application_id,
  "log": to base64(data_katm_yatt),
  "type": "type",
  "comment": "data_katm_yatt"
}

The to base64 function doesn’t work. The question is: how can I make it work?

Where / how are you testing this?

That still needs to be uploaded to a Camunda server somewhere to be run.

Are you running that on SAAS or Self-Hosted?
What version of Camunda is your cluster?

if data_katm_yatt is not a string, then to base64(string) will return null
You can see this at the FEEL Playground
putting an expression of to base64(string(x)) from the initial load returns "NQ=="

Please provide a full basis so that we can try to figure out why it’s not working for you.

Self-Hosted

As previously asked, what version?

Please understand that this is not an official Camunda support channel – failing to provide a complete picture of what is going on won’t help you get to an answer.

I’ve been able to show you (via the FEEL Playground) that in at least one place, Camunda’s extensions do work.

1 Like



My FEEL code

You STILL haven’t provided the version of Camunda that you are using for self-hosted.

It appears from the documentation that the “to base64()” extension was added in 8.6, so if you are running in 8.5, then it won’t work (though I would have expected an error).

The documents you linked to are for Camunda Next (ie. A version that hasn’t been released yet) – reading this documentation while you are trying to learn will cause you frustration, since it is about what is coming, not what is available.

2 Likes

Working. Thanks!

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