In a rule I got a <eval> Expected error when trying to do a getAction for a Telegram Thing

Dear all,

On a Raspberry PI 4B 4GB and openHAB3 environment the Telegram Action binding was installed and configured. When I want to use it in a script when a rule is triggered I got the following error.

2021-01-04 18:55:00.884 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘c5782f93ec’ failed: :1:7 Expected ; but found telegramAction

val telegramAction = getActions(“telegram”,“telegram:telegramBot:f677bd2051”)

   ^ in <eval> at line number 1 at column number 7

This suprised me becuase that is exactly the way done as explained in the documentation of the binding describes here:

So what I’m doing wrong?

Is it a global variable or defined inside a rule?

Sorry for the late response, I had to less time.

It was in the rule and so not a global variabel. But I know what the reason was. I had selected as type of script for the rule jave/block and that was not the language I was using. When changing that to DSL rule, it was working.

Thanks for looking at it!