JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View...
Transcript of JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View...
![Page 1: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/1.jpg)
© 2007 Hewlett-Packard Development Company, L.P.The information contained herein is subject to change without notice
JBoss jBPM 3.1概要
水野浩典
コアテクノロジー部
コンサルティング・インテグレーション統括本部
日本ヒューレットパッカード株式会社
2007年7月6日
![Page 2: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/2.jpg)
2 平成19年10月1日
内容
•JBoss jBPM概要•システム概要
•プロセス
![Page 3: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/3.jpg)
JBoss jBPM概要
![Page 4: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/4.jpg)
4 平成19年10月1日
JBossとJBoss jBPM• JBoss
− 業界をリードしているオープンソースプロダクト− 企業向けSOAプラットフォーム
• JBoss jBPM− JBoss Enterprise Frameworksの中の1プロダクト− 単体でも使用可能
![Page 5: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/5.jpg)
5 平成19年10月1日
JBoss jBPM とは?
•ビジネスプロセス管理用エンジン
•プロセスの開発ツールも提供−プロセス作成用GUI−プロセスデプロイツール
•ライセンスはLGPLなので無償で使用可能−保守は有料
![Page 6: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/6.jpg)
6 平成19年10月1日
ビジネスプロセスとは?
• ビジネスに関連する処理フローを表現したもの
• 人間による承認などの外部からのイベントを待つことが可能
• プロセスが処理できること− 人間が関与する業務処理
• 例)承認処理
− システムが関連した処理− Webサービスの連携処理
Start
End
Input
account
no
申請・承認プロセス
申請したい品目の入力
承認
経理処理
approval
ここで、承認を待ちます
yes
![Page 7: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/7.jpg)
7 平成19年10月1日
ビジネスプロセス管理用エンジン
•ビジネスプロセスの管理
−プロセスの状態を保存• プロセスの進行度合いを記録•例外処理への対応
−プロセスの遷移を管理する•遷移の指示はユーザプログラムで実行
−プロセスが保持する変数の管理
•業務処理の開発は必要
ProcessStart
End
Input
account
yes
noapproval
ProcessStart
End
Input
account
yes
noapproval
ProcessStart
End
Input
account
yes
noapproval
管理
jBPM engine
![Page 8: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/8.jpg)
8 平成19年10月1日
プロセス定義言語
<process-definition name=“pay raise process">
<start-state name=“Start”><transition to=“input” /></start-state>
<task-node name=“input”><transition to=“approval” /></task-node>
<task-node name=“approval” ><transition name=“yes“ to=”account” /><transition name=“no“ to=“End” /></task-node>
<task-node name=“account” ><transition to=“End” /></task-node>
<end-state name=“End” />
</process-definition>
Start
End
Input
account
yes no
approval
•2つのプロセス定義言語をサポート−JPDL
•JBoss jBPM独自の仕様•人間が関与するプロセスを表現
−BPEL•Webサービス連携用言語
![Page 9: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/9.jpg)
9 平成19年10月1日
開発環境
• GUIによるプロセスの開発・デプロイが可能− EclipseのGPD(Graphical Process Designer)プラグインで実現− プロセスのグラフ表現とJPDL間の相互変換が瞬時に可能
• Ant, JUnit等の汎用ツールによる開発・デプロイ・テスト可能
グラフ指向プログラミング
図によるプロセスの作成
処理内容の開発
業務分析担当者システム開発者
![Page 10: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/10.jpg)
システム概要
![Page 11: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/11.jpg)
11 平成19年10月1日
ソフトウェアスタックとシステム用件
J2SE
Database
jBPM engine
開発環境
~/src/config/~/src/process/~/src/java/~/target/classes/~/target/par/
jBPM デプロイツールjBPM 開発ツール(GUI)
Process定義Start
End
Input
account
yes
noapproval
Hibernate
User Program
•実装−100%Java
•システム要件− JDBC対応の任意のデータベースサーバ− J2SE環境
![Page 12: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/12.jpg)
12 平成19年10月1日
JBoss jBPM使用例
HTTP
Server
Business logic
framework
O/R Mapping
framework
Container
J2SE
PresentationEntity(Model)Business logic
View Controller
Presentation
framework
RDBMS
JBoss Application Server
Struts Hibernate
Apach
e
mod_jk
jBPM
User Application
![Page 13: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/13.jpg)
13 平成19年10月1日
jBPMシステム全体図作成・デプロイ
Hibernate
Log
Exe
Def
Process定義
Action定義
Process Instance
Token
Variable
JVM開発環境
~/src/config/~/src/process/~/src/java/~/target/classes/~/target/par/
デプロイ
ツール
deploy
ProcessArchive(*.par)
Process定義
Action定義
Start
End
Input
account
yes
noapproval
作成ツール (GUI)
作成
環境構築ツール
jBPM engine
User Program
itemStart
End
Input
account
yes
noapproval
itemStart
End
Input
account
yes
noapproval
![Page 14: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/14.jpg)
14 平成19年10月1日
プロセスの生成と動作
JVM
Hibernate
Log
Exe
Def
Process定義
Action定義
Process Instance
Token
Variable
jBPM engine
itemStart
End
Input
account
yes
noapproval
12
3 78
9 4,5
,6
Userprogram
Userprogram
1.ユーザプログラムがjBPMエンジンにプロセスの生成を依頼
2. jBPMエンジンがプロセス定義を参照しプロセスを生成
3.ユーザプログラムがエンジンにプロセスの実行を依頼
4. jBPMエンジンがプロセスの実行を開始
5.プロセスを順次実行
6.人間の介入が必要な処理では、プロセスを待ち状態にして特定のユーザからのアクセスを待つ
7.ユーザは、自分に割り当てられた待ち状態のプロセスを取得
8.取得したプロセスに対して処理を行う
9.プロセスの続行をエンジンに依頼
![Page 15: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/15.jpg)
15 平成19年10月1日
プロセスとクライアントプログラム
クライアントプログラム1
Start
Input
item
approval
プロセスの生成
プロセスの開始
承認する商品を入力
商品を“item”変数に設定
承認者を指定
次に進む
承認者である上司が自分自身に関連するプロセスを取得
“item”変数から商品を取得
承認するかしないかを判断
次に進む
クライアントプログラム2
![Page 16: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/16.jpg)
プロセス
![Page 17: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/17.jpg)
17 平成19年10月1日
プロセスで表現できるフロー
• start-state• end-state• state• node• task-node• decision• forkとjoin
start
end
task-node
yes
nodecision
task-node
fork
join
task-node
node state
![Page 18: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/18.jpg)
18 平成19年10月1日
Token (トークン)• プロセスの遷移を表現する
• プロセスの現在の位置を保持するオブジェクト
•以下の情報を保持− プロセスインスタンスへのリンク情報
− ノード(位置)情報
Start
End
Input
account
yes no
approval
Log
Exe
DefProcess定義
Action定義
Process Instance
Token
Variable
item
![Page 19: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/19.jpg)
19 平成19年10月1日
タスク
•承認処理などの人間が関与する処理
• 1つのノードに複数登録可能
• タスクを登録できるノード− start-state− task-node
• タスクが登録されたノードでは、プロセスが待ち状態になる。
•全てのタスクが完了すると、プロセスが先に進む。
start
end
Input
account
approval
Log
Exe
DefProcess定義
Action定義
Process Instance
Token
Variable
item
Task InstanceTaskTaskTask
TaskTaskTask
![Page 20: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/20.jpg)
20 平成19年10月1日
変数(Variable)•プロセスで扱える変数−プロセス変数−タスク変数
•プロセス変数−プロセスインスタンスが保持する変数−データベースに保持される−ユーザー定義のデータも使用可能
•タスク変数−タスク内部で使用される変数−プロセス変数に対応付けて使用−アクセスコントロールが可能
Start
End
Input
account
approval
Log
Exe
DefProcess定義
Action定義
Process Instance
Token
Variable
item
Task T-item
参照・更新
参照・更新
![Page 21: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/21.jpg)
21 平成19年10月1日
アクション
承認
•プロセスのステートが遷移するときに自動的に呼び出されるユーザ処理
•実装−ActionHandler イ ン タ ー フ ェ ー ス の
execute()メソッド
•アクションを設定できる場所−プロセスの開始と終了−ステートに入ったとき(ENTER)−ステートから出る時(LEAVE)−ステートが変わる時(TRANSITION)
ActionHandler
Start
End
入力
経理処理
yes
no
state-enter
state-leave
transition
decision-enter
decision-leave transition
transition
process-start
transition
transition
state-enter
state-leave
process-end
呼び出し
![Page 22: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/22.jpg)
22 平成19年10月1日
ノードの機能比較ActionHandlerの登録
ノード種別
Task登録(※1)
waitするか
node-enter action node-
leaveDecisionHandler
start-state ● ● ● プロセスの開始
end-state ● プロセスの終了
state ● ● ●他システムとの非同期な連携処理などに使用(※2)
node ● ● ● Javaプログラムによる処理で使用
task-node ● ● ● ● 人間が介在する処理に使用
decision ● ● ● 判断を行うノード
fork ● ● プロセスの分岐
join ● ● 分岐したプロセスの合流
備考
※1 Task登録が可能なノードは、ユーザの割り当ても可能
※2 node-enterアクション実行後に、プロセスはwait状態になるので明示的にプロセスを再開させる必要あり。
![Page 23: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/23.jpg)
23 平成19年10月1日
まとめ
•JBoss jBPM概要−ビジネスプロセス管理用エンジン−JPDL/BPEL、EclipseのGPDプラグイン
•システム概要
−システムスタック、プロセス概要
•プロセス
−トークン、タスク、変数、アクション−ノードの機能比較
![Page 24: JBoss jBPM 3.1概要 - Hewlett Packard Enterprise...Presentation Business logic Entity(Model) View Controller Presentation framework RDBMS JBoss Application Server Apache Struts Hibernate](https://reader030.fdocument.pub/reader030/viewer/2022011905/5f2705c5fcc1e405e03c179c/html5/thumbnails/24.jpg)
24 平成19年10月1日