After you develop custom policies, you can test and debug
the policies.
Procedure
- In your development environment, open the debugger window
by clicking .
- Create a configuration for a remote Java application.
- Select your policy project.
- Enter the host name and debug port number of your server.
The default port is 7777.
- Click Apply.
- To debug, set a breakpoint in your class where you want
to debug. Most of the methods in a policy are called when
the policy is added to a process. The test() method is called when
the policy is run for operations such as submit, update, state entrance,
and timer.
- During debugging, you might need
to change your governor policy. To do so, export your Java project as a JAR file again, and on the
Extensions page, update your existing extension. You do not need to
restart your server for these changes to take effect.
Note: Instead
of deleting your governor policy and adding a new one, update the
policy. When you delete an existing extension, it is removed from
lifecycles and policy processes, even if the extension is recreated,
and you must reconfigure your processes.