Deploying the Application
The Distributor Application solution incorporates several Liferay features, such as Objects, Picklists, and Workflows. It also utilizes page builder features to build dynamic and responsive user interfaces, design forms, display object data, and more.
For the purpose of this course, we will deploy the application using Client Extensions, which are stored in Clarity’s prebuilt Liferay Workspace. Some portions of the application are already configured in the prebuilt solution; you will complete other parts yourself as you progress through this module.
In this article, you’ll learn how to:
- Install and use Clarity’s preconfigured Liferay Workspace.
- Build and deploy Client Extensions.
- Configure the solution in Liferay’s UI.
Downloading the Solution’s Materials
Follow these steps to install the prebuilt Clarity workspace:
-
Download and unzip the workspace in a folder of your choice using these commands:
curl <!-- TODO: Insert Nexus Clarity Workspace link for download -->
unzip <!-- TODO: Insert zip file name -->
-
After extracting the workspace, go into the
client-extensions
folder.cd [workspace-root]/client-extensions/
-
Build the Client Extensions projects:
../gradlew clean build
The compiled .zip
files are created in each project’s dist/
folder.
[project-name]
├── batch
├── build
├── dist
│ └── [project-name].zip
└── client-extension.yaml
Client Extensions are deployed by placing these archives in the correct location of your running Liferay instance.
Deploying the Picklists
Picklists are predefined lists of string values that determine options in single-select and multiple-select fields. Clarity uses Picklists to collect information by making the distributor applicants select from predefined options.
The following steps assume you’re using Liferay SaaS. See Deploying to Your Liferay Instance if you’re PaaS or Self-Hosted user.
In order to deploy Client Extensions to your SaaS environment, you’ll use the Liferay Cloud CLI tool you installed in Module 2.
The predefined picklists for Clarity’s solution can be implemented and deployed by following these steps:
-
Go to the
liferay-clarity-picklists-batch
folder.cd liferay-clarity-picklists-batch/
-
Deploy the compiled Client Extension file in the project’s
dist/
folder with this command:lcp deploy --ext [path-to-zip-file]
-
When prompted, choose the project environment where the extension will be deployed.
-
After the deployment finishes, open the Cloud Console and go into the chosen project environment’s Services menu. Make sure the
liferayclaritypicklistsbatch
’s service status showsready
. -
Finally, go into your Liferay instance, go to Global Menu () → Control Panel → Picklists. Once the menu opens, confirm that all picklists display.
Deploying the Objects
Exercise 1
The prebuilt solution uses two Liferay objects, the Distributor Application object and the Application Evaluation object. You will learn more about these objects and how they are configured in the following sections. For now, we’ll just deploy them to your Liferay instance with the same method you used to deploy the picklists.
Go to the liferay-clarity-objects-batch/
directory and repeat the steps from the previous section.
Bonus Exercise
If you completed Exercise 1 successfully, you can now interact with the deployed objects. Let’s create and review a Distributor Application entry.
-
Navigate to Global Menu () → Control Panel. Notice that two new options appear under Object: Application Evaluations and Distributor Applications.
-
Open Distributor Applications.
-
Click Add () to create a new Distributor Application entry.
-
Fill out the form with any information, then click Save.
-
Return to the Distributor Applications menu and check your created entry.
Now that you’ve created an entry for the Distributor Applications object, you can check how the review process works.
-
Go to Global Menu () → Control Panel → Application Evaluations.
-
Click Add () to create a new Application Evaluation entry.
-
In the Application to Evaluations field, select the application entry’s Business Name to relate this evaluation to it.
-
Fill out the review form as you prefer, then click Save.
-
Return to the Application Evaluations menu and check the created review entry.
An evaluation entry is automatically assigned to the application. You can confirm this relationship between them by navigating to Global Menu () → Control Panel → Distributor Applications, selecting an entry, and going to the Evaluation Notes tab.
Now that you’ve deployed the main parts of the solution, let’s move on. The following sections will guide you through the features of the solution and some of the decisions Clarity had to make in designing it.
Up Next: Modeling Data Structures