Thomas I think pointed out the error you are seeing but I see some other errors.
Are you seeing any warnings in the logs or in VSCode about the <int, int, Boolean>? I didn’t think you could use primitives in the < >.
timer_repeat is not declared inside the lambda. Global vals have no access and no visibility to each other so you would have to pass timer_repeat_alarm into the lambda. But what I don’t know is whether passing that variable and then reassigning it inside the lambda will cause the created Timer to be saved. You’d have to experiment.
t_msg is not passed to the lambda either.
Finally, this isn’t a problem but there is a cleaner way to define the lambda.
val repeatAlarm = [ int st, int dly |
timer_repeat_alarm = null
It is just a way to define a lambda without the import of Functions and the need for all the awkward stuff one needs to use to define a lambda. The Rules DSL is smart enough to figure out what the lambda is (Function or Procedure) and what the types of the arguments and return value is on its own when defining a lambda like this.
Same as any other lambda. The lambda definition I provided is identical to Alexandre’s (with a couple of minor changes to the body).