Wednesday, May 31, 2017

How to quickly test/debug MVEL code ?

If you're working in WFA, you'll most likely have used a function.  And maybe you wrote one as well (or tried at least).  Functions in WFA written in MVEL.  In fact, MVEL can almost be used every where in WFA.  And mvel is pretty neat as well.  It's expression language based on java.  And you can use java objects as well.

If you tried to create a function, you might have already bumped into some issues and had to jump back and forth from the code to the test button to figure out what is going wrong in your code.

Here's a neat trick I learned from Mr. David Korns.

If you want to test a little piece of code of MVEL, just hit the test button (can be any test button of any function actually).


Any of those 2 buttons will bring you in the test window.
And in that windows, you hava an expression pane where you can now test as many as you want, you can type single and multiple lines of code to test, check for typos, bugs and results.


  1. You can also run MVEL interactively on your PC by invoking Java and the MVEL .jar file. You can copy the MVEL .jar from the WFA server to your PC, and then running something like this (on a Windows PC):
    java -jar "c:\wfa\mvel2-2.0.17.jar"

  2. Sorry for the late reply and thanks for the tip. I always assumed there was a way to have an MVEL-CLI somewhere. I'll try it out and update the post !