Red Hat CodeReady Studio と Red Hat Process Automation Manager の統合

Red Hat Process Automation Manager 7.8

Red Hat Customer Content Services

概要

本書では、Red Hat CodeReady Studio を Red Hat Process Automation Manager と統合する方法を説明します。

前書き

開発者は、Red Hat CodeReady Studio と Red Hat Process Automation Manager を統合して複雑なアプリケーションを作成し、コードの自動補完を活用できます。

第1章 Red Hat CodeReady Studio のインストール

Red Hat CodeReady Studio は Eclipse をベースにした統合開発環境 (IDE) です。Eclipse、Eclipse Tooling、および Red Hat JBoss Enterprise Application Platform を組み合わせることで、ツールとランタイムコンポーネントを統合します。Red Hat CodeReady Studio は、Red Hat Process Automation Manager 用のツールおよびインターフェースが含まれるプラグインを提供します。

手順

  1. Red Hat CodeReady Studio をダウンロードします。

    1. Red Hat カスタマーポータル にログインします。
    2. ページ上部の ダウンロード をクリックします。
    3. 製品のダウンロード ページで、RUNTIMES セクションに移動して、Red Hat Developer Studio をクリックします。
    4. Software Downloads ページで、Red Hat JBoss CodeReady Studio 12.15.0 Stand-alone Installer (codereadystudio-12.15.0.GA-installer-standalone.jar) をダウンロードします。
  2. ターミナルウィンドウで、インストーラー JAR ファイルをダウンロードしたディレクトリーに移動し、以下のコマンドを入力します。

    java -jar codereadystudio-12.15.0.GA-installer-standalone.jar
  3. インストーラーの指示に従って、インストールを完了します。

    詳細は『Red Hat CodeReady Studio Installation Guide』を参照してください。

重要

複数バイトのルール名を処理する方法に問題があるため、Red Hat CodeReady Studio のインスタンスは、ファイルエンコーディングを UTF-8 に設定して起動する必要があります。そのためには、$DS_HOME/studio/codeready.ini ファイルを編集し、"-Dfile.encoding=UTF-8" プロパティーを追加します。

第2章 Red Hat CodeReady Studio プラグインのインストール

Red Hat Process Automation Manager への Red Hat CodeReady Studio プラグインは、コミュニティーバージョンのプラグインが基になっています。そのため、Red Hat Process Automation Manager プラグインは Drools プラグインと呼ばれています。

手順

  1. Red Hat CodeReady Studio の Red Hat Process Automation Manager プラグインをダウンロードします。

    1. Red Hat カスタマーポータル にログインします。
    2. ページ上部の ダウンロード をクリックします。
    3. 表示された 製品のダウンロード ページで、RUNTIMES セクションに移動し、Red Hat Developer Studio をクリックします。
    4. Software Downloads ページで Version リストから 12.11.0 を選択し、Red Hat CodeReady Studio Integration Stack 12.11.0 Update Site Zip (devstudio-integration-stack-12.11.0.GA-updatesite.zip) をダウンロードします。
  2. Red Hat CodeReady Studio を起動するには、Start メニューから Red Hat CodeReady Studio を選択します。
  3. HelpInstall New Software をクリックします。
  4. Add をクリックして Add Repository ウィンドウを表示します。
  5. Name フィールド名に名前 (例: devstudio-12.11.0.GA) を入力します。
  6. Archive をクリックして、devstudio-integration-stack-12.11.0.GA-updatesite.zip ファイルに移動し、このファイルを選択してから OK をクリックします。
  7. 追加 をクリックします。
  8. Install ウィンドウで、Available Software 一覧から JBoss Business Process and Rule Development を選択して Next をクリックし、再度 Next をクリックします。
  9. 使用許諾契約書を読み、I accept the terms of the license agreements をクリックして、内容に同意してから、Finish をクリックします。
  10. インストールプロセスが完了したら、Software Updates ウィンドウで Restart Now をクリックして、Red Hat CodeReady Studio を再起動します。

第3章 Red Hat Process Automation Manager サーバーの設定

Red Hat Process Automation Manager サーバーを実行するように Red Hat CodeReady Studio を設定します。

前提条件

  • Red Hat CodeReady Studio と Red Hat Process Automation Manager プラグインがインストールされている。
  • Red Hat JBoss EAP 7.3 サーバーインスタンスに Red Hat Process Automation Manager がインストールされている。

手順

  1. Red Hat CodeReady Studio を起動します。
  2. WindowShow ViewOther の順をクリックし、ServerServers を選択して Open をクリックし、サーバービューを追加します。
  3. Servers ペインを右クリックし、NewServer の順に選択してサーバーメニューを開きます。
  4. Red Hat JBoss MiddlewareJBoss Enterprise Application Platform 7.x の順にクリックし、Next をクリックしてサーバーを定義します。
  5. Create a new Server Adapter ウィンドウで、一覧から Create new runtime (next page) を選択して Next をクリックします。
  6. JBoss Runtime ウィンドウにホームディレクトリーを設定するには、ホームディレクトリーBrowse ボタンをクリックし、Red Hat Process Automation Manager がインストールされている Red Hat JBoss EAP ディレクトリーに移動します。
  7. Name フィールドにサーバー名を入力し、設定ファイルが設定されているのを確認してから Finish をクリックします。

第4章 Red Hat Process Automation Manager ランタイム環境のインストール

Red Hat CodeReady Studio で Red Hat Process Automation Manager プロジェクトを作成するには、Red Hat Process Automation Manager ランタイム環境をインストールする必要があります。

ランタイム環境は、ソフトウェアの特定のリリースを表す JAR ファイルを集めたもので、ビジネスアセットのコンパイルや実行に必要なライブラリーが含まれています。

前提条件

  • Red Hat CodeReady Studio がインストールされている。

手順

  1. プロセスエンジンをダウンロードします。

    1. Red Hat カスタマーポータル にログインします。
    2. ページ上部の ダウンロード をクリックします。
    3. 表示された製品のダウンロード ページで INTEGRATION AND AUTOMATION に移動し、Red Hat Process Automation Manager をクリックします。
    4. Software Downloads ページで Red Hat Process Automation Manager 7.8.0 Add-Ons (rhpam-7.8.0-add-ons.zip) をダウンロードします。
    5. rhpam-7.8.0-add-ons.zip を展開して、rhpam-7.8.0-add-ons/rhpam-7.8.0-process-engine.zip にある Drools ランタイム環境の JAR ファイルを展開します。
  2. Red Hat CodeReady Studio メニューから WindowPreferences をクリックします。
  3. DroolsInstalled Drools Runtimes をクリックしてから Add をクリックします。
  4. 名前のフィールドで、新しいランタイム環境の名前を入力します。
  5. Browse をクリックして、ランタイム環境ファイルを展開したディレクトリーに移動します。
  6. OK をクリックして、選択したランタイム環境を Red Hat CodeReady Studio に登録します。
  7. デフォルトの Drools ランタイムとしてランタイム環境を設定するには、対象のランタイム環境名の横にあるチェックボックスを選択します。
  8. Apply and Close をクリックします。既存のプロジェクトがある場合には、Red Hat CodeReady Studio を再起動してランタイム環境を更新するようにプロンプトが表示されます。

第5章 Red Hat Process Automation Manager プロジェクトの作成

Red Hat CodeReady Studio で Red Hat Process Automation Manager プロジェクトを作成して、管理できます。

前提条件

  • Red Hat CodeReady Studio と Red Hat Process Automation Manager プラグインがインストールされている。
  • Red Hat Process Automation Manager ランタイム環境をインストールします。

手順

  1. Red Hat CodeReady Studio のメインメニューから FileNewProject をクリックします。
  2. 検索フィールドに、Drools Project と入力して、Drools Project を選択してから Next をクリックします。
  3. 2 番目のオプションを選択して、Red Hat Process Automation Manager の例を使用してプロジェクトを作成し、Next をクリックします。
  4. Project name フィールドに、プロジェクトの名前を入力します。
  5. Finish をクリックします。
  6. 以下の手順を実行して、プロジェクトをテストします。

    1. src/main/java ディレクトリーに移動し、com.sample パッケージを展開します。
    2. Java クラスを右クリックして、Run AsJava Application を選択します。

      Console タブに出力が表示されます。

第6章 Git リポジトリーから Red Hat CodeReady Studio へのプロジェクトのインポート

Red Hat CodeReady Studio は、一元化された Git アセットリポジトリーに接続するように設定できます。リポジトリーにはルール、モデル、関数、およびプロセスが保存されます。リモート Git リポジトリーのクローンを作成するか、ローカル Git リポジトリーをインポートできます。

6.1. リモート Git リポジトリーのクローン作成

Git リポジトリーのクローンを作成して Red Hat CodeReady Studio で使用できます。

前提条件

  • Red Hat CodeReady Studio と Red Hat Process Automation Manager プラグインがインストールされている。
  • クローンの作成先のリモート Git リポジトリーに対するアクセスパーミッションが割り当てられている。

手順

  1. Red Hat CodeReady Studio の Server タブからサーバーを選択し、Start アイコンをクリックしてサーバーを起動します。
  2. セキュアシェルサーバーを実行していない場合は、端末に以下のコマンドを入力してサーバーを起動します。

    /sbin/service sshd start
    注記

    このコマンドは、Linux および Apple Macintosh 固有のものです。これらのプラットフォームで sshd がすでに起動していると、このコマンドに失敗しますが、その場合はこのステップを無視しても問題ありません。

  3. Red Hat CodeReady Studio で、FileImport…​ の順に選択し、Git リポジトリーに移動します。
  4. Git リポジトリーを開き、Projects from Git を選択して Next をクリックします。
  5. リポジトリーのソースに Clone URI を選択し、Next をクリックします。
  6. Git リポジトリーの詳細を入力し、Next をクリックします。
  7. インポートするブランチを選択し、Next をクリックします。
  8. このプロジェクトのローカルストレージを定義するために、空ではないディレクトリーを入力または選択して設定を変更し、Next をクリックします。
  9. 次のウィンドウでプロジェクトを一般プロジェクトとしてインポートし、Next をクリックします。
  10. このプロジェクトに名前を付け、Finish をクリックします。

6.2. ローカル Git リポジトリーのインポート

ローカルの Git リポジトリーをインポートして Red Hat CodeReady Studio で使用できます。

前提条件

  • Red Hat CodeReady Studio がインストールされている。

手順

  1. Red Hat CodeReady Studio の Server タブからサーバーを選択し、Start アイコンをクリックしてサーバーを起動します。
  2. FileImport…​ の順に選択し、Git フォルダーに移動します。
  3. Git フォルダーを開き、Projects from Git を選択して Next をクリックします。
  4. リポジトリーソースとして Existing local repository を選択して、Next をクリックします。
  5. 使用可能なリポジトリーの一覧から設定するリポジトリーを選択し、Next をクリックします。
  6. 開いたウィンドウで、Import as general project を選択し、Next をクリックします。
  7. このプロジェクトに名前を付け、Finish をクリックします。

第7章 関連資料

付録A バージョン情報

本書の最終更新日: 2020 年 9 月 8 日 (木)

法律上の通知

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.