Combining or multipliying inputs/outputs to one output columns

How can I combine several inputs or outputs from different columns in the decision table to a single output column? I made a simplified example in the screenshot where e.g the price or hour per row is important.

camunda question

Hi @Haminou_M,

your example should work. If “price” and “hour” are variables then you can use them in the output entry.

Do you need something else?
Feel free to share other examples.

Best regards,
Philipp

Hi @Philipp_Ossler,
I assume that the input expression is saved in a sort of array or something. I would like to know how to access or retrieve a single item within this “array” for a different column. In the example above to multiply the first rows of the inputs (e.g. 12*30). Thank you advance!

Hi @Haminou_M,

an input expression is evaluated only once and is only a single value.

Are you sure that you want to make a decision based on a decision table?
If you want to calculate multiple values (like in a Exel sheet) then a decision table may be not the best solution.
A decision table works in a way that it returns the output value(s) when the rule’s input entries are satisfied.

Best regards,
Philipp

The multiplication was just an example on accessing the value. I saw this example on the internet where someone was checking the value of the email column.

image

When the second rule is satisfied then you can use the variable email in the output entry. It will have a value like ...@holisticon.de.

I’m still not sure that you try to achieve. Can describe your specific use case?

In general what I want to know is the data structure behind “email” (for e.g array, list, map etc.) and how to exactly access the elements within this data. There must be a data structure behind it in order to use a method like “endsWith” on the variable.

The variable “email” is just a usual String. No array, list, map or anything else.

Why do you think it must be collection?