experiences with JBoss jBPM  camunda GmbH Bernd Rücker CEO camunda GmbH / Consultant [email_address]
Who we are <ul><li>camunda GmbH, near Stuttgart, Germany </li></ul><ul><li>small company (3 developer / consultants) </li>...
Agenda <ul><li>Projects examples with jBPM </li></ul><ul><ul><li>ERP-System for retail company  www.mad-moxx.de </li></ul>...
Project 1 <ul><li>customer: „mad-moxx“, the graphics cards specialist </li></ul><ul><ul><li>webshop (>3000 vistors and > 1...
Architecture mySQL ejb container Swing-GUI Session Bean Session Bean business logic jBPM JDO local interface remote interf...
Architecture - process is a facade! mySQL mySQL Swing-GUI Session Bean Session Bean business logic Hibernate JDO local int...
Association with process context
Architecture - transactions mySQL Swing-GUI Session Bean Session Bean business logic jBPM JDO local interface remote inter...
It‘s a SOA   Source: Sun presentation at the Java Forum Stuttgart, 2005
Environment <ul><li>JBoss 4 Cluster (2 Server for failover) </li></ul><ul><li>JDO for persistence of business objects </li...
Project 2 <ul><li>customer:  german telco  </li></ul><ul><li>handling of complicated order process </li></ul><ul><li>many ...
Architecture RMI /  Web-Services App-Server / RMI processes IF Subsystem: A UseCase: doSth Token: 0815 Data: … System A Us...
Architecture RMI /  Web-Services App-Server / RMI processes IF Subsystem: A UseCase: doSth Token: 0815 Data: … System A Us...
Environment <ul><li>JBoss 4 Cluster (2 Server) </li></ul><ul><li>EJB 3 Entity & Session Beans (JBoss preview) </li></ul><u...
Agenda <ul><li>Projects examples with jBPM </li></ul><ul><ul><li>ERP-System for retail company  www.mad-moxx.de </li></ul>...
node, task-nodes & states Keep in mind:  if you forget a task-assignment in a task-node it is a node!
Think about transactions!
So what to do? <ul><li>patterns can be arbitrary complex </li></ul><ul><li>typically can not be handled by a business guy ...
Sequence diagram  Application Server Client jBPM-Facade (SLSB) jBPM Action 1. Transaktion Businesslogik SLSB start process...
process / workflow / pageflow <ul><li>Sample webapp / Seam can mislead to mix them </li></ul><ul><li>pageflow: html-pages ...
More topics to think about <ul><li>process variables </li></ul><ul><ul><li>store objects? Serialization? </li></ul></ul><u...
long lasting transactions  processes action compensating action Business services Failed action Anwendung 1 commit begin T...
Agenda <ul><li>Projects examples with jBPM </li></ul><ul><ul><li>ERP-System for retail company  www.mad-moxx.de </li></ul>...
Java Swing GUI node-name token-id process data / variables possible transitions documentation website
Documentation website <ul><li>example </li></ul><ul><li>generated image map (simple xslt) </li></ul><ul><li>short document...
Admin-Client 1
Admin-Client 2 variables log <ul><li>tokens / tasks </li></ul><ul><li>Commands: </li></ul><ul><li>Signal tokens </li></ul>...
Admin Client 3 object inspector included
Testframework ProcessTestRunner testRunner = new ProcessTestRunner(&quot;Testprozess&quot;); testRunner.addInputVariable(P...
Testframework (continued) testRunner.startFork(); testRunner.useForkPath(1); testRunner.addExpectedNode(&quot;xy&quot;); t...
code-generation <ul><li>some ideas </li></ul><ul><li>Data-Binding for GUI </li></ul><ul><li>constants or enums for variabl...
upcoming book <ul><li>Including 3 chapters on integration: </li></ul><ul><li>Integration in Java EE </li></ul><ul><li>JBos...
Thank you for listening! Q & A
Upcoming SlideShare
Loading in...5
×

20061122 JBoss-World Experiences with JBoss jBPM

1,182

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,182
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "20061122 JBoss-World Experiences with JBoss jBPM"

  1. 1. experiences with JBoss jBPM camunda GmbH Bernd Rücker CEO camunda GmbH / Consultant [email_address]
  2. 2. Who we are <ul><li>camunda GmbH, near Stuttgart, Germany </li></ul><ul><li>small company (3 developer / consultants) </li></ul><ul><li>Main focus is consulting and developing in the fields of </li></ul><ul><ul><li>enterprise software with Java EE </li></ul></ul><ul><ul><li>business process engines </li></ul></ul><ul><ul><li>business rules </li></ul></ul><ul><li>Very good experiences with open source tools </li></ul><ul><ul><li>JBoss jBPM </li></ul></ul><ul><ul><li>Jboss Rules (aka Drools) </li></ul></ul><ul><ul><li>Hibernate </li></ul></ul><ul><ul><li>Jack-Rabbit (Java Content Repository / JCR) </li></ul></ul><ul><ul><li>Pentaho (Open Source BI-Suite) </li></ul></ul><ul><li>I am comitter in the JBoss jBPM project </li></ul><ul><li>contact: bernd.ruecker@camunda.com </li></ul>
  3. 3. Agenda <ul><li>Projects examples with jBPM </li></ul><ul><ul><li>ERP-System for retail company www.mad-moxx.de </li></ul></ul><ul><ul><li>Order Management System for german telco </li></ul></ul><ul><li>Typical problems </li></ul><ul><ul><li>Understanding of jPDL </li></ul></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>Pageflows in web-application / JBoss seam </li></ul></ul><ul><li>Good practices in our projects </li></ul><ul><ul><li>Generic Java Swing GUI </li></ul></ul><ul><ul><li>Java Swing Admin-Client </li></ul></ul><ul><ul><li>Generated documentation website </li></ul></ul><ul><ul><li>Test framework </li></ul></ul><ul><ul><li>Generate code to support development </li></ul></ul>
  4. 4. Project 1 <ul><li>customer: „mad-moxx“, the graphics cards specialist </li></ul><ul><ul><li>webshop (>3000 vistors and > 150 orders per day, 9 employees) </li></ul></ul><ul><ul><li>wholesale for graphics cards </li></ul></ul><ul><ul><li>service handling </li></ul></ul><ul><li>complicated serial number handling </li></ul><ul><li>used cards stock and sellings </li></ul><ul><li> special business processes </li></ul><ul><li>Our tasks </li></ul><ul><li>optimizing grown business processes </li></ul><ul><li>replace the not matching erp system </li></ul>
  5. 5. Architecture mySQL ejb container Swing-GUI Session Bean Session Bean business logic jBPM JDO local interface remote interface mySQL Hibernate other services
  6. 6. Architecture - process is a facade! mySQL mySQL Swing-GUI Session Bean Session Bean business logic Hibernate JDO local interface remote interface <ul><li>Accessing / changing business objects directly </li></ul><ul><li>Reports </li></ul><ul><li>… </li></ul><ul><li>starting processes </li></ul><ul><li>work on tasks </li></ul>jBPM other services
  7. 7. Association with process context
  8. 8. Architecture - transactions mySQL Swing-GUI Session Bean Session Bean business logic jBPM JDO local interface remote interface 1 XA transaction mySQL Hibernate other services
  9. 9. It‘s a SOA  Source: Sun presentation at the Java Forum Stuttgart, 2005
  10. 10. Environment <ul><li>JBoss 4 Cluster (2 Server for failover) </li></ul><ul><li>JDO for persistence of business objects </li></ul><ul><li>Hibernate as persistence mechanism of jBPM </li></ul><ul><li>mySQL 5 Cluster (2 Server), XA capable JDBC driver </li></ul><ul><li>Java 5 (client & server) </li></ul><ul><li>Java Swing and Java Webstart </li></ul>
  11. 11. Project 2 <ul><li>customer: german telco </li></ul><ul><li>handling of complicated order process </li></ul><ul><li>many dependencies to other systems </li></ul><ul><li>subsystems are controlled by the process </li></ul>
  12. 12. Architecture RMI / Web-Services App-Server / RMI processes IF Subsystem: A UseCase: doSth Token: 0815 Data: … System A UseCase: doSth Data: … ETR Subsystem: A UseCase: doSth Token: 0815 Result: … Order-System System … jbpm actions jbpm actions
  13. 13. Architecture RMI / Web-Services App-Server / RMI processes IF Subsystem: A UseCase: doSth Token: 0815 Data: … System A UseCase: doSth Daten: … ETR Subsystem: A UseCase: doSth Token: 0815 Result: … Order-System System … jbpm actions jbpm actions compare to Enterprise-Service-Bus
  14. 14. Environment <ul><li>JBoss 4 Cluster (2 Server) </li></ul><ul><li>EJB 3 Entity & Session Beans (JBoss preview) </li></ul><ul><li>jbpm 3.1 </li></ul><ul><li>Oracle 10g Cluster </li></ul><ul><li>Java 1.5 </li></ul><ul><li>Java Swing and Java Webstart </li></ul>
  15. 15. Agenda <ul><li>Projects examples with jBPM </li></ul><ul><ul><li>ERP-System for retail company www.mad-moxx.de </li></ul></ul><ul><ul><li>Order Management System for german telco </li></ul></ul><ul><li>Typical problems </li></ul><ul><ul><li>Understanding of jPDL </li></ul></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>Pageflows in web-application / JBoss seam </li></ul></ul><ul><li>Good practices in our projects </li></ul><ul><ul><li>Generic Java Swing GUI </li></ul></ul><ul><ul><li>Java Swing Admin-Client </li></ul></ul><ul><ul><li>Generated documentation website </li></ul></ul><ul><ul><li>Test framework </li></ul></ul><ul><ul><li>Generate code to support development </li></ul></ul>
  16. 16. node, task-nodes & states Keep in mind: if you forget a task-assignment in a task-node it is a node!
  17. 17. Think about transactions!
  18. 18. So what to do? <ul><li>patterns can be arbitrary complex </li></ul><ul><li>typically can not be handled by a business guy </li></ul><ul><li>asynchronism is the general solution </li></ul><ul><li> compare to BPEL </li></ul>commit transaction (since jbpm 3.1: async=„true“)
  19. 19. Sequence diagram Application Server Client jBPM-Facade (SLSB) jBPM Action 1. Transaktion Businesslogik SLSB start process get definition create process instance set variables signal execute do something end task get task end execute do something 2. Transaktion
  20. 20. process / workflow / pageflow <ul><li>Sample webapp / Seam can mislead to mix them </li></ul><ul><li>pageflow: html-pages to fullfill a certain use case </li></ul><ul><li>workflow: typically automated, maybe one step in a business process </li></ul><ul><li>business process: not focused on a application but on the business process as a whole, consider the context </li></ul><ul><li>A clear seperation is important </li></ul><ul><li>Maybe a solution with sub-processes and a naming schema is feasible </li></ul>
  21. 21. More topics to think about <ul><li>process variables </li></ul><ul><ul><li>store objects? Serialization? </li></ul></ul><ul><ul><li>store keys only? </li></ul></ul><ul><ul><li>task controller misleads to use only primary types </li></ul></ul><ul><li>compensation actions </li></ul><ul><li>… </li></ul>state 1 state 2 state 3 action compensating action equivalent states
  22. 22. long lasting transactions processes action compensating action Business services Failed action Anwendung 1 commit begin T1 Anwendung 1 commit begin T1
  23. 23. Agenda <ul><li>Projects examples with jBPM </li></ul><ul><ul><li>ERP-System for retail company www.mad-moxx.de </li></ul></ul><ul><ul><li>Order Management System for german telco </li></ul></ul><ul><li>Typical problems </li></ul><ul><ul><li>Understanding of jPDL </li></ul></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>Pageflows in web-application / JBoss seam </li></ul></ul><ul><li>Good practices in our projects </li></ul><ul><ul><li>Generic Java Swing GUI </li></ul></ul><ul><ul><li>Java Swing Admin-Client </li></ul></ul><ul><ul><li>Generated documentation website </li></ul></ul><ul><ul><li>Test framework </li></ul></ul><ul><ul><li>Generate code to support development </li></ul></ul>
  24. 24. Java Swing GUI node-name token-id process data / variables possible transitions documentation website
  25. 25. Documentation website <ul><li>example </li></ul><ul><li>generated image map (simple xslt) </li></ul><ul><li>short documentation html-page </li></ul><ul><li>links to wiki </li></ul>
  26. 26. Admin-Client 1
  27. 27. Admin-Client 2 variables log <ul><li>tokens / tasks </li></ul><ul><li>Commands: </li></ul><ul><li>Signal tokens </li></ul><ul><li>end tasks </li></ul><ul><li>cancel processes </li></ul><ul><li>… </li></ul>
  28. 28. Admin Client 3 object inspector included
  29. 29. Testframework ProcessTestRunner testRunner = new ProcessTestRunner(&quot;Testprozess&quot;); testRunner.addInputVariable(ProzessVariablesEnum.CustomerAddress, address); //////////////// // confiugure Path to the next task node / end ProcessTestRunner subTestRunner = testRunner.addExpectedSubprocesses( &quot;CustomerCreation&quot; ); subTestRunner.addExpectedState(&quot;Node1&quot;); subTestRunner.addExpectedState(&quot;Node2&quot;); subTestRunner.addExpectedOutputVariable(ProzessVariables.ResultCustomerCreation, Boolean.valueOf(true)); //.... subTestRunner.subprocessFinished(); //////////////// // confiugure Path to the next task node / end testRunner.addExpectedNode(&quot;xy&quot;); testRunner.addInputVariable(&quot;xy&quot;, new Integer(0));
  30. 30. Testframework (continued) testRunner.startFork(); testRunner.useForkPath(1); testRunner.addExpectedNode(&quot;xy&quot;); testRunner.addJoin(); testRunner.useForkPath(2); testRunner.addJoin(); testRunner.addExpectedTask(&quot;XXX&quot;); long taskId = testRunner.runToNextTaskNode(5); services.continueAdresseKorrigieren(taskId, new Address()); testRunner.taskEnded(); testRunner.useForkPath(3); testRunner.addExpectedNode(&quot;xy&quot;); testRunner.addExpectedTask(&quot;XXX&quot;); long taskId = testRunner.runToNextTaskNode(5); testRunner.finishFork(); // run until end of process testRunner.runToEnd(7); testRunner.assertFinished(); testRunner.assertPath();
  31. 31. code-generation <ul><li>some ideas </li></ul><ul><li>Data-Binding for GUI </li></ul><ul><li>constants or enums for variables, process-, state- and transition-names (at least for unit tests) </li></ul><ul><li>superclass for actions or decisions </li></ul><ul><li>… </li></ul>public abstract static class GeneratedDecideIdentifiedGoodsHandler implements DecisionHandler { public String decide(ExecutionContext executionContext) { try { return decide(new ProcurementProcessModel(executionContext)); } catch (BusinessException ex) { throw new ProcessDefinitionException(&quot;BusinessException during decision&quot;, ex); } } public abstract String decide(ProcurementProcessModel model) throws BusinessException; protected static final transient String RESULT_identified = &quot;identified&quot;; protected static final transient String RESULT_unidentified = &quot;unidentified&quot;; }
  32. 32. upcoming book <ul><li>Including 3 chapters on integration: </li></ul><ul><li>Integration in Java EE </li></ul><ul><li>JBoss jBPM </li></ul><ul><li>BPEL with Oracle </li></ul><ul><li>available in december 2006 </li></ul>
  33. 33. Thank you for listening! Q & A

×