Closed jphillips-bp3 closed 2 months ago
@jphillips-bp3 thank you for reporting. :+1:
I'm sorry for this confusion but Camunda doesn't support this feature. You can define a function and use it inside the same expression (e.g. in a script task expression or a variable mapping). See the example here. But, it is not possible to serialize/store the function, for example, in a process variable.
However, I see the value in providing common functions for BPMN. Since this is more related to Camunda itself, please open a feature request here as "Zeebe Feature request" and describe your use case in detail. :rocket:
Feature request created here: https://github.com/camunda/camunda/issues/20141
Describe the bug The documentation link below implies that user defined functions can be defined and executed in a process context, but this does not work.
https://docs.camunda.io/docs/components/modeler/feel/language-guide/feel-functions/#user-defined
I can define and execute functions inside a DMN literal decision, but not within a process context.
To Reproduce I created a simple BPMN to try this out. Here is how I can reproduce the issue:
scriptResult
variable wasnull
:Expected behavior Given the documentation, I would expect the function to be called and in this example,
scriptResult
to have the value of3
.Environment Tested on SaaS: