More about Service Java rules

Benefits

Java service rules provide a plain Java (POJO) interface to the PRService EJBs. External Java client applications can communicate with the Pega Platform either directly through the PRService beans or through a delegate proxy Java archive, generated by the service package.

Implementation

The service package for a group of Java service rules generates one or more proxy Java archives. The external client application communicates with the Pega Platform through the proxy Java archive, which forwards the messages from the client to the Pega Platform and returns to the client the response.

Dynamic System Settings

Two Dynamic System Settings data instances identify the directories that Java services use. Review these settings and update them as appropriate:

  • Pega-RULES.compiler/DefaultClasses
  • Pega-RULES.compiler/DefaultPaths

Performance statistics

Through changes to the prlog4j2.xml file, you can obtain performance statistics on the execution of services. See Performance tool — Statistics for services.

Through changes to the prconfig.xml file, you can be alerted to unusually long service operations. See How to detect lengthy service operations.

As an alternative to updating the prconfig.xml file, you can use Dynamic System Settings to configure your application. See Dynamic System Settings data instances.

Return types

When using Service Java rules, do not return BigDecimal values unless the calling system also supports this class. Return a String value, or use a transform (identified in a Registry Java Property Transform data instance).