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:

  1. 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 -->
    
  2. After extracting the workspace, go into the client-extensions folder.

    cd [workspace-root]/client-extensions/
    
  3. 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.

Note

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:

  1. Go to the liferay-clarity-picklists-batch folder.

    cd liferay-clarity-picklists-batch/
    
  2. Deploy the compiled Client Extension file in the project’s dist/ folder with this command:

    lcp deploy --ext [path-to-zip-file]
    
  3. When prompted, choose the project environment where the extension will be deployed.

    The command returns a list of available projects to deploy the extension.

  4. 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 shows ready.

  5. Finally, go into your Liferay instance, go to Global Menu (Global Menu) → Control PanelPicklists. Once the menu opens, confirm that all picklists display.

    All picklists appear after deploying the Client Extension.

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.

  1. Navigate to Global Menu (Global Menu) → Control Panel. Notice that two new options appear under Object: Application Evaluations and Distributor Applications.

    The Control Panel now shows the Application Evaluations and Distributor Applications menus.

  2. Open Distributor Applications.

  3. Click Add (Add Button) to create a new Distributor Application entry.

  4. Fill out the form with any information, then click Save.

  5. Return to the Distributor Applications menu and check your created entry.

    The created application entry is displayed in the Distributor Application menu.

Now that you’ve created an entry for the Distributor Applications object, you can check how the review process works.

  1. Go to Global Menu (Global Menu) → Control PanelApplication Evaluations.

  2. Click Add (Add Button) to create a new Application Evaluation entry.

  3. In the Application to Evaluations field, select the application entry’s Business Name to relate this evaluation to it.

  4. Fill out the review form as you prefer, then click Save.

  5. Return to the Application Evaluations menu and check the created review entry.

    The evaluation entry is shown in the Application Evaluations menu.

An evaluation entry is automatically assigned to the application. You can confirm this relationship between them by navigating to Global Menu (Global Menu) → Control PanelDistributor Applications, selecting an entry, and going to the Evaluation Notes tab.

The Evaluation Notes displays the assigned evaluations related to the application entry

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

Additional Resources

Ask

Capabilities

Product

DXP

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy