debug connector code

1
0
-1

Hi what is the suggested way to debug connector code to minimize roundtrip times ? I see 3 scenarios - use engine api and deploy connector code via the BusinessArchiveBuilder Q: Will the so deployed connector code be debuggable when you start the Engine in debug mode from an IDE ? - launch the portal through tomcat or openEJB within the IDE in debug mode - remote debugging with application server

Of course I have unit tests for the business logic, but during integration and while exploring Bonita a debug facility save a lot of time Thanks for any suggestions Donat

1 answer

1
0
-1

You may create an eclipse maven project and open the connector code in Eclipse by importing the code with virtual links. Add references to bonita jar, like this :

                 <dependency>
                    <groupId>org.bonitasoft.engine</groupId>
                    <artifactId>bonita-client</artifactId>
                    <version>${bonita.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.bonitasoft.engine</groupId>
                    <artifactId>bonita-server</artifactId>
                    <version>${bonita.version}</version>
                </dependency>

Next step is to start the server in debug mode by going in preferences > java > and select the same Jvm as in eclipse (ideally) and add the following as Default vm argument : -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n Make this jvm the default one

Restart the Bonita server to apply the changes

Create a Remote Java Application in Eclipse listening to localhost on port 8000 and start Eclipse.

You should be able to debug bonita connector.

Similar informations : http://community.bonitasoft.com/answers/create-api-accessible-scripts

Notifications