Integrating Red Hat CodeReady Studio with Red Hat Process Automation Manager
Abstract
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 run time 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
Download Red Hat CodeReady Studio:
- Log in to the Red Hat Customer Portal.
- Click DOWNLOADS at the top of the page.
- On the Product Downloads page, navigate to the JBOSS DEVELOPMENT AND MANAGEMENT section, and click Red Hat Developer Studio.
-
On the Software Downloads page, download Red Hat CodeReady Studio 12.13.0 Stand-alone Installer (
devstudio-12.13.0.GA-installer-standalone.jar
).
In a terminal window, navigate to the directory where you downloaded the installer JAR file and enter the following command:
java -jar devstudio-12.13.0.GA-installer-standalone.jar
Follow the instructions in the installer to complete the installation.
For more information, see the Red Hat CodeReady Studio Installation Guide.
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
Download the Red Hat Process Automation Manager plug-ins for Red Hat CodeReady Studio:
- Log in to the Red Hat Customer Portal.
- Click DOWNLOADS at the top of the page.
- On the Product Downloads page that opens, navigate to the JBOSS DEVELOPMENT AND MANAGEMENT section, and click Red Hat Developer Studio.
-
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
).
- To start Red Hat CodeReady Studio, select Red Hat CodeReady Studio from the Start menu.
- Click Help → Install New Software.
- Click Add to display the Add Repository window.
-
Enter a name in the Name field, for example,
devstudio-12.11.0.GA
. -
Click Archive, navigate to the
devstudio-integration-stack-12.11.0.GA-updatesite.zip
file, select the file, and then click OK. - Click Add.
- In the Install window, select JBoss Business Process and Rule Development from the Available Software list, click Next, and click Next again.
- Read the license agreements, click I accept the terms of the license agreements to accept the license agreements, and then click Finish.
- 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.2 server instance.
Procedure
- Start Red Hat CodeReady Studio.
- Click Window → Show View → Other, select Server → Servers, and then click Open to add the server view.
- Right-click on the Servers pane and select New → Server to open the server menu.
- Click Red Hat JBoss Middleware → JBoss Enterprise Application Platform 7.x and then click Next to define the server.
- In the Create a new Server Adapter window, select Create new runtime (next page) from the list, and then click Next.
- 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.
- 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
Download the process engine:
- Log in to the Red Hat Customer Portal.
- Click DOWNLOADS at the top of the page.
- On the Product Downloads page that opens, navigate to the JBOSS DEVELOPMENT AND MANAGEMENT section, and click Red Hat Process Automation Manager.
-
On the Software Downloads page, download Red Hat Process Automation Manager 7.6.0 Add-Ons (
rhpam-7.6.0-add-ons.zip
). -
Extract
rhpam-7.6.0-add-ons.zip
and then extract the Drools runtime environment JAR files located in`rhpam-7.6.0-add-ons/rhpam-7.6.0-process-engine.zip`
- From the {CODEREADY_STUDIO} menu, click Window → Preferences.
- Click Drools → Installed Drools Runtimes, and then click Add.
- In the name field, enter a name for the new runtime environment.
- Click Browse and navigate to the directory where you extracted the runtime environment files.
- Click OK to register the selected runtime environment in Red Hat CodeReady Studio.
- To set the runtime environment as the default Drools run time, select the check box beside the runtime environment name.
- 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
- In Red Hat CodeReady Studio, from the main menu, click File → New → Project.
-
In the search field, enter
Drools Project
, select Drools Project, and then click Next. - Select the second option to create a project with a Red Hat Process Automation Manager example, and then click Next.
- In the Project name field, enter a name for the project.
- Click Finish.
Complete the following steps to test the project:
-
Navigate to the
src/main/java
directory and expand thecom.sample
package. Right click a Java class and select Run As → Java Application.
The output is displayed on the console tab.
-
Navigate to the
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
- In Red Hat CodeReady Studio, select the server from the Server tab and click the start icon to start the server.
Enter the following command in a terminal to start the secure shell server, if it is not running already.
/sbin/service sshd start
NoteThis 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.- In Red Hat CodeReady Studio , select File → Import… and navigate to the Git folder.
- Open the Git folder, select Projects from Git, and click Next.
- Select the repository source as Clone URI and click Next.
- Enter the details of the Git repository and click Next.
- Select the branch you want to import and click Next.
- To define the local storage for this project, enter or select a non-empty directory, make any configuration changes, and click Next.
- Import the project as a general project in the following window and click Next.
- 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
- In Red Hat CodeReady Studio, select the server from the Server tab and click the start icon to start the server.
- Select File → Import and navigate to the Git folder.
- Open the Git folder to select Projects from Git and click Next.
- Select Existing local repository as the repository source and click Next.
- Select the repository that is to be configured from the list of available repositories and click Next.
- In the window that opens, select Import as general project and click Next.
- Name the project and click Finish.
Chapter 7. Additional Resources
Appendix A. Versioning information
Documentation last updated on Friday, May 22, 2020.