Integrating Red Hat CodeReady Studio with Red Hat Process Automation Manager

Red Hat Process Automation Manager 7.8

Red Hat Customer Content Services

Abstract

This document describes how to integrate Red Hat CodeReady Studio with Red Hat Process Automation Manager.

Preface

As a developer, you can integrate Red Hat CodeReady Studio with Red Hat Process Automation Manager to write complex applications and leverage code auto-completion.

Chapter 1. Installing Red Hat CodeReady Studio

Red Hat CodeReady Studio is an integrated development environment (IDE) based on Eclipse. It integrates tooling and runtime components by combining Eclipse, Eclipse Tooling, and Red Hat JBoss Enterprise Application Platform. Red Hat CodeReady Studio provides plug-ins with tools and interfaces for Red Hat Process Automation Manager.

Procedure

  1. Download Red Hat CodeReady Studio:

    1. Log in to the Red Hat Customer Portal.
    2. Click DOWNLOADS at the top of the page.
    3. On the Product Downloads page, navigate to the RUNTIMES section, and click Red Hat Developer Studio.
    4. On the Software Downloads page, download Red Hat CodeReady Studio 12.15.0 Stand-alone Installer (codereadystudio-12.15.0.GA-installer-standalone.jar).
  2. In a terminal window, navigate to the directory where you downloaded the installer JAR file and enter the following command:

    java -jar codereadystudio-12.15.0.GA-installer-standalone.jar
  3. Follow the instructions in the installer to complete the installation.

    For more information, see the Red Hat CodeReady Studio Installation Guide.

Important

Because of an issue in the way multi-byte rule names are handled, you must ensure that the instance of Red Hat CodeReady Studio is started with the file encoding set to UTF-8. You can do this by editing the $DS_HOME/studio/codereadystudio.ini file and adding the following property: "-Dfile.encoding=UTF-8".

Chapter 2. Installing Red Hat CodeReady Studio plug-ins

The Red Hat CodeReady Studio plug-ins for Red Hat Process Automation Manager are based on the community version of the plug-ins. For this reason, the Red Hat Process Automation Manager plug-in is called the Drools plug-in.

Procedure

  1. Download the Red Hat Process Automation Manager plug-ins for Red Hat CodeReady Studio:

    1. Log in to the Red Hat Customer Portal.
    2. Click DOWNLOADS at the top of the page.
    3. On the Product Downloads page that opens, navigate to the RUNTIMES section, and click Red Hat Developer Studio.
    4. On the Software Downloads page, from the Version list select 12.11.0, and then download Red Hat CodeReady Studio Integration Stack 12.11.0 Update Site Zip (devstudio-integration-stack-12.11.0.GA-updatesite.zip).
  2. To start Red Hat CodeReady Studio, select Red Hat CodeReady Studio from the Start menu.
  3. Click HelpInstall New Software.
  4. Click Add to display the Add Repository window.
  5. Enter a name in the Name field, for example, devstudio-12.11.0.GA.
  6. Click Archive, navigate to the devstudio-integration-stack-12.11.0.GA-updatesite.zip file, select the file, and then click OK.
  7. Click Add.
  8. In the Install window, select JBoss Business Process and Rule Development from the Available Software list, click Next, and click Next again.
  9. Read the license agreements, click I accept the terms of the license agreements to accept the license agreements, and then click Finish.
  10. After the installation process has been completed, click Restart Now in the Software Updates window to restart Red Hat CodeReady Studio.

Chapter 3. Configuring the Red Hat Process Automation Manager server

You can configure Red Hat CodeReady Studio to run the Red Hat Process Automation Manager server.

Prerequisites

  • Red Hat CodeReady Studio is installed with the Red Hat Process Automation Manager plug-ins.
  • Red Hat Process Automation Manager is installed in a Red Hat JBoss EAP 7.3 server instance.

Procedure

  1. Start Red Hat CodeReady Studio.
  2. Click WindowShow ViewOther, select ServerServers, and then click Open to add the server view.
  3. Right-click on the Servers pane and select NewServer to open the server menu.
  4. Click Red Hat JBoss MiddlewareJBoss Enterprise Application Platform 7.x and then click Next to define the server.
  5. In the Create a new Server Adapter window, select Create new runtime (next page) from the list, and then click Next.
  6. To set the home directory in the JBoss Runtime window, click the Browse button under Home Directory and navigate to the Red Hat JBoss EAP directory where Red Hat Process Automation Manager is installed.
  7. Enter a name for the server in the Name field, ensure that the configuration file is set, and then click Finish.

Chapter 4. Installing Red Hat Process Automation Manager runtime environments

In order to create Red Hat Process Automation Manager projects in Red Hat CodeReady Studio, it is necessary to install the Red Hat Process Automation Manager runtime environment.

A runtime environment is a collection of JAR files that represent a specific release of the software and includes the required libraries for compiling and running your business asset.

Prerequisites

  • Red Hat CodeReady Studio is installed.

Procedure

  1. Download the process engine:

    1. Log in to the Red Hat Customer Portal.
    2. Click DOWNLOADS at the top of the page.
    3. On the Product Downloads page that opens, navigate to the INTEGRATION AND AUTOMATION section, and click Red Hat Process Automation Manager.
    4. On the Software Downloads page, download Red Hat Process Automation Manager 7.8.0 Add-Ons (rhpam-7.8.0-add-ons.zip).
    5. Extract rhpam-7.8.0-add-ons.zip and then extract the Drools runtime environment JAR files located in`rhpam-7.8.0-add-ons/rhpam-7.8.0-process-engine.zip`
  2. From the Red Hat CodeReady Studio menu, click WindowPreferences.
  3. Click DroolsInstalled Drools Runtimes, and then click Add.
  4. In the name field, enter a name for the new runtime environment.
  5. Click Browse and navigate to the directory where you extracted the runtime environment files.
  6. Click OK to register the selected runtime environment in Red Hat CodeReady Studio.
  7. To set the runtime environment as the default Drools runtime, select the check box beside the runtime environment name.
  8. Click Apply and Close. If you have existing projects, you are prompted to restart Red Hat CodeReady Studio to update the runtime environment.

Chapter 5. Creating a Red Hat Process Automation Manager project

You can create and manage a Red Hat Process Automation Manager project in Red Hat CodeReady Studio.

Prerequisites

  • Red Hat CodeReady Studio is installed with the Red Hat Process Automation Manager plug-ins.
  • Red Hat Process Automation Manager runtime environment is installed.

Procedure

  1. In Red Hat CodeReady Studio, from the main menu, click FileNewProject.
  2. In the search field, enter Drools Project, select Drools Project, and then click Next.
  3. Select the second option to create a project with a Red Hat Process Automation Manager example, and then click Next.
  4. In the Project name field, enter a name for the project.
  5. Click Finish.
  6. Complete the following steps to test the project:

    1. Navigate to the src/main/java directory and expand the com.sample package.
    2. Right click a Java class and select Run AsJava Application.

      The output is displayed on the console tab.

Chapter 6. Importing projects from a Git repository into Red Hat CodeReady Studio

You can configure Red Hat CodeReady Studio to connect to a central Git asset repository. The repository stores rules, models, functions, and processes. You can either clone a remote Git repository or import a local Git repository.

6.1. Cloning a remote Git repository

You can clone a Git repository to use with Red Hat CodeReady Studio.

Prerequisites

  • Red Hat CodeReady Studio is installed with the Red Hat Process Automation Manager plug-ins.
  • You have access permission for the remote Git repository that you want to clone.

Procedure

  1. In Red Hat CodeReady Studio, select the server from the Server tab and click the start icon to start the server.
  2. Enter the following command in a terminal to start the secure shell server, if it is not running already.

    /sbin/service sshd start
    Note

    This command is specific to Linux and Apple Macintosh. On these platforms, if sshd has already been started, this command fails. If this happens, you may safely ignore this step.

  3. In Red Hat CodeReady Studio , select FileImport…​ and navigate to the Git folder.
  4. Open the Git folder, select Projects from Git, and click Next.
  5. Select the repository source as Clone URI and click Next.
  6. Enter the details of the Git repository and click Next.
  7. Select the branch you want to import and click Next.
  8. To define the local storage for this project, enter or select a non-empty directory, make any configuration changes, and click Next.
  9. Import the project as a general project in the following window and click Next.
  10. Name the project and click Finish.

6.2. Importing a local Git repository

You can import a local Git repository to use with Red Hat CodeReady Studio.

Prerequisites

  • Red Hat CodeReady Studio is installed.

Procedure

  1. In Red Hat CodeReady Studio, select the server from the Server tab and click the start icon to start the server.
  2. Select FileImport and navigate to the Git folder.
  3. Open the Git folder to select Projects from Git and click Next.
  4. Select Existing local repository as the repository source and click Next.
  5. Select the repository that is to be configured from the list of available repositories and click Next.
  6. In the window that opens, select Import as general project and click Next.
  7. Name the project and click Finish.

Chapter 7. Additional Resources

Appendix A. Versioning information

Documentation last updated on Wednesday, July 29, 2020.

Legal Notice

Copyright © 2020 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.