'contains' functionality in decision table

Hi everyone,

In my decision table I want to check if a user has a specific role. The problem is, users have a number of roles.

For the sake of simplicity, let’s say there are three roles:

  • creator
  • participant
  • supervisor

A supervisor might also be a participant. In one specific rule I am only interested in the information whether the person is a participant. The only information I have is the set of roles the user has. Is there any way for me to

a) feed a set of Strings into the VariableMap of the decision table and
b) implement a contains(“participant”) functionality?

Any other workaround might also be helpful! The only thing I don’t really want is to put the evaluation in my Java code.

Kind regards,

Hi Markus,

You can use the expression language in your dmn file

For example: You can use groovy in your dmn file and use contains functionality of groovy.

Hope this helps.


Related discussion: https://groups.google.com/d/msg/camunda-bpm-users/AXiYdBAWOKU/MvCTQXjJDAAJ

Note that the workaround provided by Bernd uses internal API, i.e. this is not a supported feature of Camunda BPM at the moment.


1 Like

I thought in input entries I can only use FEEL. The decision table modeler also only supports groovy/javascript in input expressions, not entries… I need them in entries, though. Also, this seems to become rather unclear when looking at the table in the modeler.

Hi Thorben, thank you for the suggestion. That does work quite well! Only thing is, that I have a set of roles now, which the modeler is showing as a “string”. I can’t seem to set the type to java.util.Set in the XML without breaking bits of the functionality. But this solution is quite a simple one and still readable.