Here's a very quick how-to on debugging custom methods in the Process Builder debug mode.
Most of the time, when designing a business process in process builder, there will be some sort of customization regarding methods. Java methods attached to activities in process builder were, frankly, terrible to debug within the whole process. Of course it was easy to write JUnit tests for those methods, but that still wouldn't mimic your whole process.
With the new Process Builder and it's great debugging functionalities you can now even not only debug the process, but also the custom Java methods that will be called. To do this, here's what you do:
1. Add the following java arguments to the startup line of your process builder:
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
In my case this results in the full startup command being:
C:\Documentum\java\1.5.0_12\jre\bin\javaw.exe -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -Xms128m -Xmx256m -Dswing.aatext=true -cp ".;lib\bpm.jar;..\..\dctm.jar;C:\Documentum\config" WorkflowEditor -locale en_US
Now, whenever you start Process Builder, port 8000 will be open for debugging (you canof course choose any other port).
2. From within Composer or any other Eclipse environment add a new Debug application pointing to your localhost on port 8000 (see attached screenshot).
3. Now you can start debugging your process and whenever a breakpoint is hit, your Composer will start to blink like crazy!
Kees van Bemmel
www.vlc.nl