How to write a Expression in microflows

0
Caused by: com.mendix.modules.microflowengine.MicroflowException: Failed to evaluate expression, error occurred on line 1, character 160$Entity/Balancing_Grade*1000*60*(($Entity/Spacer div 2)+$Entity/Membrane_Driver+$Entity/Hub_Driver+($Entity/Transmission_Unit div 2))*((1 div 2)*(1 div 3.14)*(1 div $Entity/Coupling_Speed))
asked
2 answers
0

Char 160 is the 1 before div $Entity/Coupling_Speed

Did you check the value of $Entity/Coupling_Speed. If empty or 0 the expression will fail.

answered
0

As Tim says, this could well be a division by 0 error. When you get his error, check the Coupling_Speed attribute is not 0 or empty. It's also worth checking the Entity object, and the Balancing_Grade, Spacer, Membrane_Driver, Hub_Driver, and Transmission_Unit attributes are also not empty.

 

I would suggest adding a breakpoint just before where you carry out this calculation so you can check all the input values before it is executed.

 

Good luck!

answered