In Version 4.1, you can extract Help files and Rule-Utility-Library instances and functions at startup, as well as manually performing an extraction using the System Console .
The following types of files can be extracted by the server at startup time:
- Help files
- Rule-Utility-Library instances and functions
During startup, the system checks to see if the following files exist:
If either of these files are missing, then all the libraries are regenerated; the system generates the Java class containing generated code for all the functions in each library.
Alternatively, if the
ExtractLibraries setting in the Initialization node of the
pegarules.xml file is set to true, then the system generates Java for all libraries upon each startup.
To force the server to extract the Help or library files at startup, delete either or both of the files listed above:
PegaRULES_Extract_Marker.txt file is located in the PegaRULES web application directory. This web application directory is stored in a different path, depending upon your web server:
- For Tomcat: under webapps \ contextroot directory
- For WebSphere: under installedApps \ enterprise application folder\servername \EnterpriseAppname \ contextroot
- For WebLogic: under user_projects\ domainname\servername \stage \ applicationname\contextroot
PegaRULES_default.java file is located in the PRGenJava subdirectory.
- For Tomcat: under work\standalone\localhost\ contextroot \temp\PRGenJava
- For WebSphere: under Temp\ enterprise application folder \ servername\EnterpriseAppname\contextroot \temp\PRGenJava
- For WebLogic: under .wlnotdelete\ applicationname_contextroot_random7digits\ public\temp\PRGenJava
When a Process Commander server starts, it looks for these files. If either of the files are missing, the server runs the extractions. After extraction completes, the marker file is recreated and the server is ready to accept requests.
Important note: Library generation fails if it references a Java class that is not a package-qualified name. Referencing a class in the unnamed package from a class contained in a package violates the Java Language Specification, and javac 1.4 marks this error. (Rule-Utility-Library functions are generated into the named package com.pega.pegarules.generated.)
Therefore, do not use third-party classes that are in an unnamed package, as Rule-Utility-Library and Rule-Utility-Function don't have visibility into these.
For further details, reference JavaBug #4361575 (on java.sun.com) and JikesBug #601 (on www.ibm.com).
You can also manually extract these files using the PRMonitorServlet. PRMonitorServlet is an administrative testing servlet which allows you to perform numerous maintenance or diagnostic tasks, such as clearing caches or monitoring requestors.
To start this servlet, enter the following URL into your Web browser:
http:// nameofserver / ContextRootname /PRMonitorServlet
You can also start this servlet from the desktop, where it is labeled System Console:
On the PRMonitorServlet window, the Extract Files menu choice (under Administration) displays the Help file extractor and the Rule-Utility-Library extractor:
Click ExtractHelp to extract the Help files from the ProComHelp.zip file.
Click ExtractLibraries to extract the libraries from the PegaRULES database and write them to disk on the server. If only one library is desired, specify the RuleSet and the Library Name of the library to extract in these fields.