Modular deployment strategies
Dedicating a Ruleset to a single Case Type helps to promote reuse in your Pega Platform™ applications. Other reasons to dedicate a Ruleset to a single Case Type include:
- Achieving continuous integration (CI) Branch-based development.
- Encouraging Case-oriented user stories by using Agile Studio to manage project software releases.
- Managing Branches that contain Rules that originate from different Rulesets. The system generates a Branch Ruleset, and the generated Ruleset prepends the name of the original Ruleset to the name of the Branch.
- Accommodating multiple user stories in a Branch.
- Simplifying the ability to populate the Work item to associate field in Agile Workbench when checking a Rule into a Branch.
The following figure shows an example of mapping the Agile Workbench work item when you check in a Rule into a Branch:
The system also creates a backlog work item when you create a project in Agile Studio. The Agile Studio backlog can prepopulate with a user story for each foundation application Case Type when you develop an application built on a foundation application. You can then select Case Types that are appropriate for the minimal lovable product (MLP) release from that backlog.
Deployment Manager is the standard workspace in which to test and deploy Pega applications. It exposes all the features of Pega Platform that are necessary to automate your DevOps workflows, including Branch merging, application packaging, applying quality gates, and promoting an application to different environments. Deployment Manager leverages market-leading Case Management technology to build and run continuous integration and continuous delivery (CI/CD) pipelines with a familiar, model-driven experience.
Deployment Manager provides best practice-based application deployment pipelines out of the box. These pipelines are easy to configure and customize through a low-code model-driven experience. You can get started quickly with a standardized, automated, and repeatable process, which helps ensure predictable, high-quality releases.
When you create a Case Type class in a Case Type-specific Ruleset, the system adds the Rules that Dev Studio generates to that Ruleset despite supporting the development of multiple Case Types within the same application.
Branch-based development review
You manage application Branches by using the App Explorer in Dev Studio. The following figure shows an example of a Branch that a user sets up for an event booking application:
While it is not necessary to dedicate a Branch to a single Case Type, as shown in the following figure, doing so simplifies the Branch review process:
When users save a Case-related Rule in a Case-specific Ruleset to a Branch, the system generates a Case-specific Branch Ruleset if one does not already exist. Changes made in Dev Studio that affect that Rule occur in the Branch Ruleset's version of that Rule. On the creation of a Branch Ruleset, the system places it at the top of the Ruleset stack of the application, as shown in the following figure:
You initiate the merge of a single on the Branches tab of Application Explorer by right-clicking the Branch name, as shown in the following figure:
At the end of the merge process, the Branch is empty if users do not select the Keep all source Rules and Rulesets after merge option. As a result, the Branch is ready to use for the next sets of Tasks, issues, or bugs defined in Agile Studio.
Branch-based development in Deployment Manager
Consider a scenario where the Deployment Manager application, running on a separate orchestration server, is configured to automatically initiate a delivery when a single-Branch merge completes an application successfully. Also, suppose the development environment application, built on the same PegaDevOpsFoundation application, configures the RMURL (Release Manager URL) Dynamic System Setting (D-S-S) to point to the orchestration server’s PRRestService. When initiating a single-Branch merge, the development environment sends a request to the Deployment Manager application. The Deployment Manager application orchestrates the packaging of the application within the development environment, the publishing of that package to a mutual Dev/QA repository, and the import of that package into the QA environment.
Application packaging
The initial screen of the Application Packaging wizard prompts you for the built-on applications and the application that you want to package to include in the generated product Rule. Components are a separate concept in Pega Platform and refer to a type of Rule application where the value of pyMode property is Component. The system uses components to package reusable functionality that is sharable across multiple applications. When packaging an application with the Application Packaging wizard, you can include components as part of the package.
Multiple applications that reference the same Ruleset are highly discouraged. After you save an application Rule to a new name, warnings are displayed in both applications, one for each dual-referenced Ruleset.
The deployment strategy is different when the production application that you want to deploy depends on other multiple built-on component applications.
If the product file contains database schema changes as a part of the deployment and your organization policies do not support applying the Database schema changes automatically, you need to generate the SQL for schema changes. The database administrator manually runs the SQL before continuing with the deployment of the Rules.
In the following diagram, applications A1 and A2 undergo versioning. Application A3 is built on A1 and A2. Applications A1 and A2 are not production applications. However, applications A1 and A2 can be deployed to other development team environments, such as where application A3 is developed. It is the responsibility of application A3 responsibility to observe the version change made by applications A1 and A2. Application A3 must also decide when to change its versions to reflect the version changes under it.
Consider the example of the FSG Booking application. The packaging of the FSGEmail application occurs first; next is the Hotel application, and then the Booking application.
While it is possible to define a product Rule that packages only a component, it is unnecessary to do so. You can package the component by using the component Rule itself, as shown in the following figure:
Deployment Manager supports pipelines for Rule application instances where pyMode = Application and pyMode = Component. Include those components in the packaging when an application contains one or more components.
The following figure shows a component that is included in the Product Rule along with an application that uses the component. The component is EmailEditor, and the application is FSGEmail.
The Open-Closed principle applied to packaging and deployment
The goal of the Open-Closed principle is to eliminate ripple effects. A ripple effect occurs when an object changes its interface instead of defining a new interface and deprecating the existing interface. The primary interface for applications on which other applications are built, such as FSGEmail and Hotel, is the data required to construct the new interface using data propagation. If the EmailEditor component requires a new property, the FSGEmail application needs to change its interface to applications that are built on top of it, such as the Hotel application. The Hotel application must change its built-on interface so that the Booking application can supply the value for the new required property.
By deploying applications separately and increasing dependency order, the change to the EmailEditor component eventually becomes available to the Booking application without breaking that application or the applications that depend on it.
Note: Updating all three applications (FSGEmail, Hotel, and Booking) using a Branch associated with the Booking application is not a best practice.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?