LinkedIn
Copied!

Table of Contents

Preassembling rules in an application by using the Static Assembler utility in PRPC 6.x and Pega 7.1

The Static Assembler utility enables the preassembly and caching of rules that belong to an application. These actions improve the response time for interactive users after a system startup or when new ruleset versions are imported into the system. You can run this utility at any time, for example, after you import an application that contains a large number of new rules, after an application upgrade, or after any significant change was made in the application development cycle.

The instructions in this article apply to PRPC v6.x and Pega Platform 7.1.x. For Pega 7.2.x and later, run the static assembler from Designer Studio: Designer Studio > System > Assembly> Static Assembler.

You can run the Static Assembler utility in one of the following modes, depending on your work context:

  • Utility mode (best practice) - Run the Static Assembler from the /scripts/utils directory within the extracted application installation directory. This is the best practice because the Static Assembler uses information that is in the application installation directory.
  • Stand-alone mode - Use the stand-alone mode when running the utility from a command prompt and when passing connection details through the setupDatabase.properties file. Run the Static Assembler outside of the context of the application installation folder. When you run the Static Assembler from a location other than the /scripts/utils directory in the application installation directory, you need to specify additional information to configure the Static Assembler.

Running the Static Assembler in utility mode

To run the Static Assembler in utility mode, complete the following steps.

  1. On your application server, extract the StaticAssembler.zip file from the /scripts/utils/ folder on the application distribution media to the same directory.
  2. Create the <pega.app.root>/WEB-INF/lib directory.
  3. In the WEB-INF/lib directory of the prweb.war file or in the APP-INF/lib directory of the prpc_j2ee*.ear file, locate the following JAR files:
    • jsr94-1.0.jar
    • prbootstrap.jar
    • prdbcp.jar
  4. Copy the three JAR files to the <pega.app.root>/WEB-INF/lib directory.
  5. Open the scripts/utils/staticAssemblerResources/config/prstaticassembly.properties file.
  6. Specify the following properties:
    • pega.app.root - Enter the full path to the <pega.app.root> directory of your environment.

      Example for Windows: D:\\prpcmedia\\scripts\\utils\\
      After each backslash (\), include a backslash escape character (\).

      Example for Linux: /opt/prpcmedia/scripts/utils/pegaapproot

    • application.name - Enter the name of the application rule that is the starting point of the assembly process. Rules that belong to any built-on applications are also assembled.
    • application.version - Enter the version number of the application.
    • accessgroup - Enter the access group that provides access to the application version.
  7. Edit the scripts/utils/prpcUtils.properties file to define the connection to your database.
  8. Specify the following variables specific for your database vendor:
    • pega.jdbc.driver.jar - The full path to the JDBC driver JAR file.
    • pega.jdbc.driver.class - The Java class name of the JDBC driver.
    • pega.database.type - Select the database vendor from the list of supported vendors.
    • pega.jdbc.url - The URL connection for your database. Refer to the examples in the prpcUtils.properties file.
    • pega.jdbc.username - The user name allowed to connect to the database.
    • pega.jdbc.password - The password for the user name allowed to connect to the database.
  9. Stop the application server.
    You must stop the application server because the Static Assembler starts three JVM instances and an instance of the application engine by default.
  10. Run the scripts/utils/smartStaticAssembly.bat (or .sh) script to start the static assembly process. The Static Assembler analyzes the rule in the specific application and in the built-on application or applications and assembles any rules that have not yet been assembled. Processing can take from one to several hours.
  11. When the assembly process is complete, you can view the result log in the scripts/utils/staticAssemblerResources/logs/ directory.

Running the Static Assembler in stand-alone mode

To run the Static Assembler in stand-alone mode, complete the following steps.

  1. Extract the StaticAssembler.zip file to a folder on the server.
  2. Edit the staticAssembler/staticAssemblerResources/Config/setupDatabase.properties file to define the connection to your database.
  3. Specify the following variables specific to your database vendor:
    • pega.jdbc.driver.jar - The full path to the JDBC driver JAR file.
    • pega.jdbc.driver.class - The Java class name of the JDBC driver.
    • pega.database.type - Select the database vendor from the list of supported vendors.
    • pega.jdbc.url - The URL connection for your database. Refer to the examples in the prpcUtils.properties file.
    • pega.jdbc.username - The user name allowed to connect to the database.
    • pega.jdbc.password - The password for the user name allowed to connect to the database.
    • rules.schema.name - Schema name where rule tables reside.
    • data.schema.name - Applicable for Pega with split-schema installation. Refers to the schema name where data and work tables are located. If not specified, the value given for rules.schema.name is considered.
    • udb.schema.name - The UDB data base type used to specify the name of the schema used by the application database. (In most cases, leave blank to accept the default value pega.jdbc.username.)
  4. Specify the following properties in the staticAssembler/staticAssemblerResources/config/prstaticassembly.properties file:
    • pega.app.root - Enter the full path to the prweb directory of your environment.

      Example for Windows: D:\\tomcat6\\apache-tomcat-6.0.20\\webapps\\prweb

      After each backslash (\), include a backslash escape character (\).

      Example for Linux: /opt/tomcat/webapps/prweb

    • pega.database.config - Enter the absolute location of the setupDatabase.properties file that you edited in step 2.
    • ANT_HOME - Specify the location of the Apache Ant directory on the server.
    • application.name - Enter the name of the application that serves as the starting point of the assembly process. Rules that belong to any built-on applications are also assembled.
    • application.version - Enter the version number of the application.
    • accessgroup - Enter the access group that provides access to the application version.
  5. Stop the application server.
    You must stop the application server because the Static Assembler starts three JVM instances and an instance of the application engine by default.
  6. Run the staticAssmbler/smartStaticAssembly.bat (or .sh) script to start the static assembly process. The Static Assembler analyzes the rule in the specific application and in the built-on application or applications and assembles any rules that have not yet been assembled. Processing can take from one to several hours.
  7. When the assembly process is complete, you can view the result log in the staticAssmbler/staticAssemblerResources/logs/ directory.
Suggest Edit
Did you find this content helpful?

100% found this useful


Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.