Debugging jBPM workflows
Posted on January 30th, 2009 | by Eric |If you’re using Advanced Workflows / jBPM within Alfresco you probably already know about the Alfresco workflow console (/alfresco/faces/jsp/admin/workflow-console.jsp, for a full list of “hidden” consoles check out Jeff’s great post Trouble with Alfresco? Console yourself). However, very quickly I realized that the Eclipse / deploy / workflow console cycle to create and tweak my workflow definitions wouldn’t work. Instead we can use junit tests to develop and debug the workflow definitions.
First make sure you’ve installed the Graphical Process Designer (GPD), while I haven’t found the graphical part very helpful it does setup a nice way to build and test workflows. One problem I did encounter was that the 3.3 version of jBPM and GPD have a required library defiition that shouldn’t be there, one quick trip to google and here’s the solution. Just restart Eclipse and you’re on your way.
Next take a look at the sample unit test that the GPD creates for you when you start a new jBPM project. From here you have full access to parse the definition, start a workflow, and traverse nodes. Have fun.
NOTE: Forgot to mention that you need to put a log4j.properties in the /src/main/config to see anything useful on the console.





