Scala in our BRMS~BRMS開発でのScala利用事例~                                                        BRMS: Business Rule Management...
Agenda1.   About MUFG, MUIT2.   About BRMS3.   About our original BRMS, “BIWARD”4.   How we have used Scala’s features in ...
About MUFG                                                                                       出典:MUFG Corporate Review ...
About MUIT(Mitsubishi UFJ Information Technology, Ltd.) Started on July 1st, 2009 when these three companies merged       ...
About BRMS(Business Rule Management System)アプリケーションから、ビジネスルール(業務判断ロジック)を切出して実行・設計・管理を行うためのフレームワークBRMS is a framework that ...
All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd.   6
The Reason for Creating an Original BRMS金融関連のBRMS事例は保険のバックオフィス業務への適用が多いが、銀行では対面型業務での適用ニーズがあり、市場製品では「前進判断」機能のみのため、これに応えることが...
The Reason for Creating an Original BRMS金融関連のBRMS事例は保険のバックオフィス業務への適用が多いが、銀行では対面型業務での適用ニーズがあり、市場製品では「前進判断」機能のみのため、これに応えることが...
Algorithm for BIWARDLogic operating in a TREE form                All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Info...
Algorithm for BIWARDLogic operating in a TREE form  Forward Execution                      All Rights Reserved,Copyright ©...
Algorithm for BIWARDLogic operating in a TREE form                                        Logic operating as a NETWORK  Fo...
Algorithm for BIWARDLogic operating in a TREE form                                        Logic operating as a NETWORK  Fo...
Algorithm for BIWARDLogic operating in a TREE form                                        Logic operating as a NETWORK  Fo...
Algorithm for BIWARDLogic operating in a TREE form                                        Logic operating as a NETWORK  Fo...
Example: Logic for Authentication                             Conditions                                                  ...
Internal Structure of Logic                                                   Root                                        ...
BIWARD walks on nodes recursively.  BIWARDはRootNodeからスタートして、RootNodeまでを辿る  辿ったNodeを記録しながら、「walk」関数を再帰的に処理していき、  最終的に記録したNo...
Steps of Creating Rules                                                                        Compiles                   ...
Using Scala’s ParserBIWARD parses these conditional expressions with Scala’s DSL function.<rule id=“rule1” … >  <parameter...
Thoughts on Scala 高生産性を確かに実感 Javaとの親和性メリットは大きい  ScalaプログラムがJavaリソースを利用するという観点はもちろん、  Javaに対してScalaリソースを提供するという観点でもメリット大きい。...
Our Goal for ScalaDSLやJavaAPIを通した機能提供を前提に、より汎用的な機能の開発にScalaを活用To develop universal features with Scala andsupply them usin...
御静聴ありがとうございましたThank you for listening      All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. ...
Upcoming SlideShare
Loading in …5
×

Scala in our BRMS

2,572 views

Published on

Scala Conference in Japan 2013

0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,572
On SlideShare
0
From Embeds
0
Number of Embeds
54
Actions
Shares
0
Downloads
24
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Scala in our BRMS

  1. 1. Scala in our BRMS~BRMS開発でのScala利用事例~ BRMS: Business Rule Management System 三菱UFJインフォメーションテクノロジー株式会社 ITプロデュース部 土佐鉄平 Mitsubishi UFJ Information Technology, Ltd. IT Production Dept. Teppei Tosa All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 1
  2. 2. Agenda1. About MUFG, MUIT2. About BRMS3. About our original BRMS, “BIWARD”4. How we have used Scala’s features in BIWARD Using the Recursive Call function Using DSL5. Our thoughts on Scala in developing Enterprise Applications All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 2
  3. 3. About MUFG 出典:MUFG Corporate Review http://www.mufg.jp/english/ir/annualreport/2012mufg/pdf/mar/cr1202.pdf All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 3
  4. 4. About MUIT(Mitsubishi UFJ Information Technology, Ltd.) Started on July 1st, 2009 when these three companies merged Tokyo Mitsubishi Information Technology, Ltd. UFJ Hitachi Systems, Ltd. UFJIS, Ltd. For Bank Systems Amount of Capital: 181 million yen Capital from Bank of For Securities’ system For Credit Cards Tokyo Mitsubishi UFJ: 85% Capital from MUFG: 15% Currently over 1500 employees For Lease Systems For MUFG’s Members For outside financial institutions All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 4
  5. 5. About BRMS(Business Rule Management System)アプリケーションから、ビジネスルール(業務判断ロジック)を切出して実行・設計・管理を行うためのフレームワークBRMS is a framework that separates business logic from softwareapplications and executes, designs and manages that logic. WEB/AP Server Executes Executes Business Application Rule Engine DB Framework (ex. JavaEE) ServerClient WEB/AP Server (ex. Cosminexus、Websphere、GlassFish) OS (ex. RedhatLinux、AIX) Designs Designs Rule Base Manages Manages All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 5
  6. 6. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 6
  7. 7. The Reason for Creating an Original BRMS金融関連のBRMS事例は保険のバックオフィス業務への適用が多いが、銀行では対面型業務での適用ニーズがあり、市場製品では「前進判断」機能のみのため、これに応えることができない。In the financial industry, there are some back-offices at insurance companies that use BRMSs. However, all bankshave to use BRMS for their teller-window type operations. Other BRMS products cannot fulfill our needs becausethey have only “forward execution” functions. Back-office Type Input operations are fixed. Papers The system calculates how Rule Engine payments need to be made based on accident and contract information. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 7
  8. 8. The Reason for Creating an Original BRMS金融関連のBRMS事例は保険のバックオフィス業務への適用が多いが、銀行では対面型業務での適用ニーズがあり、市場製品では「前進判断」機能のみのため、これに応えることができない。In the financial industry, there are some back-offices at insurance companies that use BRMSs. However, all bankshave to use BRMS for their teller-window type operations. Other BRMS products cannot fulfill our needs becausethey have only “forward execution” functions. Back-office Type Teller-window Type Input operations are fixed. At teller-windows, we interact directly with customers, so we require a BRMS with not only “forward execution” but also “backward execution”. Papers Sorry, we can’t authenticate you with this kind of ID. 【forward execution】 】 So, what should I do? If you have a driver’s license or a health insurance ID card… The system calculates how Rule Engine payments need to be made 【backward execution】 】 based on accident and I have a health contract information. insurance ID card. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 8
  9. 9. Algorithm for BIWARDLogic operating in a TREE form All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 9
  10. 10. Algorithm for BIWARDLogic operating in a TREE form Forward Execution All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 10
  11. 11. Algorithm for BIWARDLogic operating in a TREE form Logic operating as a NETWORK Forward Execution All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 11
  12. 12. Algorithm for BIWARDLogic operating in a TREE form Logic operating as a NETWORK Forward Execution Forward Exec. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 12
  13. 13. Algorithm for BIWARDLogic operating in a TREE form Logic operating as a NETWORK Forward Execution Forward Exec. Backward Exec. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 13
  14. 14. Algorithm for BIWARDLogic operating in a TREE form Logic operating as a NETWORK Forward Execution Forward Exec. Backward Exec. Biward Exec. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 14
  15. 15. Example: Logic for Authentication Conditions Result Bring a Have a Bring a Can authenticatedriver’s license home loan resident card YES YES YES YES NO NO NO YES NO NO All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 15
  16. 16. Internal Structure of Logic Root :Node Conditions Result Bring a Have a Bring a Can authenticate driver’s license home loan resident card Y Y Y Y N N N N All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 16
  17. 17. BIWARD walks on nodes recursively. BIWARDはRootNodeからスタートして、RootNodeまでを辿る 辿ったNodeを記録しながら、「walk」関数を再帰的に処理していき、 最終的に記録したNodeを結果として応答 Scalaによって、こういった処理を非常にシンプルに構築 BIWARD can “walk” on the network in both directions from the Root Node and back to the Root Node. The nodes use the “walk” function to call one another recursively. BIWARD records the nodes that have been “walked” through, then returns the results by displaying the recorded nodes. Thanks to Scala, we were able to create this program very elegantly. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 17
  18. 18. Steps of Creating Rules Compiles Compiles XML register register Scala and and packages packages JAR Exported from WEB-UI or input by the user All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 18
  19. 19. Using Scala’s ParserBIWARD parses these conditional expressions with Scala’s DSL function.<rule id=“rule1” … > <parameters> 運転免許証持参有無” 運転免許証持参有無 <booleanParameter id=“hasDriversLicence” label=“運転免許証持参有無 … /> … </parameters> <results> Not only boolean, but <booleanResult id=“canAuthenticate” label=“本人確認可否本人確認可否”/> 本人確認可否 also strings, numbers </results> and date types in <patterns> conditional expressions. <pattern> <conditions> <condition … ><![CDATA[ param(“hasDriversLicense”)==true ]]></condition> </conditions> <results> <booleanResult id=“canAuthenticate”>true</booleanResult> </results> </pattern> … Exported Scala Code Condition(Equal( </patterns> BooleanParameter(“”“9”“”, “”“bringDriversLicense”“”,</rule> List(BooleanValue(true, """Yes"""), BooleanValue(false, """No"""))), BooleanValue(true, """Yes""") )), All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 19
  20. 20. Thoughts on Scala 高生産性を確かに実感 Javaとの親和性メリットは大きい ScalaプログラムがJavaリソースを利用するという観点はもちろん、 Javaに対してScalaリソースを提供するという観点でもメリット大きい。 言語仕様が強力で、標準言語とするにはまだまだハードル高い Javaの置き換えではなく、ポイントを抑えた部分的な活用が有効 Achieve a higher level of productivity Compatibility with Java is a strong merit Scala can use Java as a library, and Java can use Scala the same way. As a result of its elaborate syntax, it will still be difficult to adopt Scala as the standard. All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 20
  21. 21. Our Goal for ScalaDSLやJavaAPIを通した機能提供を前提に、より汎用的な機能の開発にScalaを活用To develop universal features with Scala andsupply them using DSL or Java API DSL Business Application Common Parts (Scala) (Java) Java API Common Parts (Java)Specific features for business Universal features All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 21
  22. 22. 御静聴ありがとうございましたThank you for listening All Rights Reserved,Copyright © 2013 Mitsubishi UFJ Information Tecnology,Ltd. 22

×