Defining and invoking a user defined function in a process context

Is it possible to define a user defined function in the context of a process and then invoke that function? I can see that it is possible in a DMN literal expression (and have tested it and it works), but I cannot get it working inside a process context. Here is what I am doing.

In my start event I have defined the following variable with the function defined:

I am then calling the function from a Script Task:

But when I run the process, the scriptResult variable is null. So it looks like functions are not evaluated when in a process context?

Thanks in advance.

Currently, this is not possible. Zeebe doesn’t allow to store a function in a process variable.

Here is the related feature request: Ability to create user functions in process variables and pass between process contexts · Issue #20141 · camunda/camunda · GitHub

1 Like

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