How do we invoke custom functions from dmn files?

Hi Everyone,

I am trying to execute a functions in dmn file in input columns which returns a boolean. We are currently using
camunda version - 7.20
springboot - 3.1.9

I did find a document where it gave example on how to use custom functions.
Document - FEEL Engine Custom Functions | docs.camunda.org
But it fails with the below error,
Caused by: org.camunda.bpm.dmn.feel.impl.FeelException: FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression ‘myFunction(“test”)’: no function found with name ‘myFunction’ and 1 parameters

Here is my dmn file and CamundaCustomFunctionsMethod

import org.springframework.stereotype.Component;
@Component
public class CamundaCustomFunctionsMethod {
    public boolean myFunction(String input) {
        // Your custom logic here
        return (input.equals("test"));
    }
}

dmn_dile.dmn (2.1 KB)

Dependency imported

org.camunda.bpm.dmn
camunda-engine-feel-scala
7.20.0

Question,
Is there some type of configuration we need to set so that the Camunda knows where to find my method?
How do we set those configurations? Can you please share an example.

Thank you,
Aviraj

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