From zero to_j_bpm_hero_tomek_bujok

872 views
758 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
872
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

From zero to_j_bpm_hero_tomek_bujok

  1. 1. 2010 From zero to jBPM hero! Tomasz Bujok
  2. 2. 2010 Agenda • Trochę teorii - idee fix BPM • jBPM – „let’s make your work flow” • Frontendowe aplikacje typu workflow • Solidne demo! • Wzorce projektowe / dobre praktyki • Wersjonowanie procesów
  3. 3. 2010 Cel prezentacji vs.
  4. 4. 2010 Proces biznesowy • Seria powiązanych ze sobą działań lub zadań, które rozwiązują określony problem lub prowadzą do osiągnięcia określonego efektu. • Zaplanowany przebieg działań mający na celu uzyskiwanie określonych rezultatów.
  5. 5. 2010 Business Process Management • Dziedzina zarządzania • Niezwiązana z IT • Wprowadza poziom abstrakcji • Cykl życia składa się z 5 faz – Zaprojektuj - BPML – Zaimplementuj – BPEL – Uruchom – BPMS – Zbadaj wydajność - BPMS – Zoptymalizuj - BPR
  6. 6. 2010 Business Process Modeling Lang. • Business Process Modeling Notation (BPMN) • Cognition enhanced Natural language Information Analysis Method (CogNIAM) • Extended Business Modeling Language (xBML) • Event-driven process chain (EPC) • ICAM DEFinition (IDEF0) • Unified Modeling Language (UML)
  7. 7. 2010 Business Process Execution Lang. • Event-driven Process Chains (EPC) by ARIS, • Business Process Execution Language (BPEL), • Web Services Choreography Description Language (WS-CDL), • XML Process Definition Lang. (XPDL), • Java Process Definition Lang. (JPDL) by jBPM <task name="Accept offer"> <transition to="charge customer"/> <transition name="timeout" to="cancel"> <timer duedate="1 day"/> </transition> </task>
  8. 8. 2010 BPMS oraz BPR
  9. 9. 2010 BPMS – do wszystkiego czy do…?
  10. 10. 2010 „Standalone BPM is dead” • High cost of setup. This implies getting the software up and running and also get all people up to speed with the technology. • High cost of integrating the BPM system with the outside world. Integration results in a significant threshold. http://processdevelopments.blogspot.com/2010/05/standalone-bpm-is-dead.html
  11. 11. 2010 Magic quadrant for BPMS
  12. 12. 2010 jBPM4 Execution Mode Processes Executions History JVM (1) Persistent Dynamic
  13. 13. 2010 jBPM4 Architecture PVM InternalsPVM Interface ProcessEngine Process Service Execution Service Management Service Task Service Command Service Interceptor Interceptor Commands Event Listener API ServicesClient Diagram downloaded from: http://www.slideshare.net/camunda/jboss-jbpm-4 (later modified)
  14. 14. 2010 Human Task <process name="TaskProcess"> <start> <transition to="AcceptOffer" name="Start"/> </start> <task name="AcceptOffer"> <transition to="OfferAccepted" name="AcceptOffer" /> </task> <end name="OfferAccepted"/> </process>
  15. 15. 2010 Membership / Assignment <process name="MembershipProcess"> ... <swimlane candidate-groups="ROLE_ANALITYK" name="LOAN"> <task name="Task1" candidate-groups="ROLE_DORADCA"> <transition ... /> </task> <task name="Task2" swimlane="LOAN"> <transition ... /> </task> <task name="Task3"> <assignment-handler class="pl.javarsovia.Assigner"> <transition ... /> </task> ... </process>
  16. 16. 2010 State <process name="StateProcess"> <start> <transition to="wait"/> </start> <state name="wait"> <transition to="end"/> </state> <end name="end"/> </process>
  17. 17. 2010 Decision <process name="DecisionProcess"> ... <decision name="decide"> <handler expr="pl.javarsovia.Decider"/> <transition to="success"/> <transition to="failure"/> </decision> <decision name="evaluate document" expr="#{content}"> <transition name="OK" to="success" /> <transition name="NOK" to="failure" /> </decision> ... </process>
  18. 18. 2010 Java <process name="JavaProcess"> ... <java name="service" method="notify" class="pl.javarsovia.Notificator"> <field name="retryCount" > <int value="100" /> </field > <arg> <string value="Hello Javarsovia!"/> </arg> <transition to="end"/> </java> ... </process>
  19. 19. 2010 Fork-Join <process name="ForkJoinProcess"> ... <fork name="fork"> <transition to="notify"/> <transition to="execute"/> </fork> <task name="notify"> ... </task> <task name="execute"> ... </task> <join name="join"> <transition to="end"/> </join> ... </process>
  20. 20. 2010 Event-listener <process name="EventListenerProcess"> ... <task name="AcceptOffer"> <on event="start|end"> <event-listener class="pl.javarsovia.Listener"> </event-listener> </on> <transition to="notify"> <event-listener class="pl.javarsovia.Listener"> </event-listener> </transition> </task> ... </process>
  21. 21. 2010 Timer <task name="AcceptOffer"> <transition to="Accept" /> <transition to="Escalate" > <timer duedate="10 minutes" > </transition> </task> <state name="GuardedWait"> <transition to="Accept" /> <on event="timeout"> <timer duedate="2 business days" > <event-listener class="pl.javarsovia.Listener"/> </on> </state >
  22. 22. 2010 jBPM4 API Process engine RepositoryService Managing deployments Deployment createDeployment() deployment.addResourceFromClasspath("") ProcessDefinitionQuery createProcessDefinitionQuery(); Diagram downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  23. 23. 2010 jBPM4 API Process engine RepositoryService ExecutionService Managing runtime executions startProcessInstanceById(pd_id) signalExecutionByXXX Get/setVariable(s) Diagram downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  24. 24. 2010 jBPM4 API Process engine RepositoryService ExecutionService TaskService Managing tasks takeTask(actor) completeTask(outcom) cancelTask(task) AssignTask(actor) findTaskXXX Diagram downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  25. 25. 2010 jBPM4 API Process engine RepositoryService ExecutionService TaskService HistoryService Managing past runtime data HistoryActivityInstanceQuery query= historyService.createXXXQuery() .activityName("Wait") .executionId(“123"); query.execute Diagram downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  26. 26. 2010 jBPM4 API Process engine RepositoryService ExecutionService TaskService HistoryService ManagementService Process engine maintenance executeJob(long jobDbid) Diagram downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  27. 27. 2010 jBPM4 API Process engine RepositoryService ExecutionService TaskService HistoryService ManagementService Aplikacja Komunikacja tylko przez interfejsy Diagram downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  28. 28. 2010 Transakcyjność • Continue: – sync – async – exclusive Transaction 1 Transaction 2 Job Executor
  29. 29. 2010 Demo Picture downloaded from: http://www.slideshare.net/camunda/jboss-jbpm-4
  30. 30. 2010 Workflow use-case
  31. 31. 2010 Workflow use-case
  32. 32. 2010 Workflow use-case
  33. 33. 2010 Workflow use-case
  34. 34. 2010 Workflow use-case
  35. 35. 2010 Workflow use-case
  36. 36. 2010 Workflow use-case
  37. 37. 2010 Workflow use-case
  38. 38. 2010 Workflow use-case
  39. 39. 2010 Workflow use-case
  40. 40. 2010 Workflow use-case
  41. 41. 2010 Workflow use-case
  42. 42. 2010 Workflow z BPM • Występują human-tasks • Występuje podział na role procesowe • Dekompozycja logiki jest możliwa • Potrzebujemy maszyny stanów • Równoległa praca na sprawie/procesie • Wymagane wersjonowanie „na zakładkę”
  43. 43. 2010 Co wybrać? • Java – Trwa dłużej – Proces niewidoczny – Wait state’y – Eskalacje / timeout’y • BPM – Same plusy 
  44. 44. 2010 Demo Picture downloaded from: http://www.slideshare.net/camunda/jboss-jbpm-4
  45. 45. 2010 Korzyści • „Czysta” architektura • Eksternalizacja logiki biznesowej • Podział ról • Łatwość wprowadzania zmian • Prostota wyrażania konstrukcji • NIH – „plumbing code”
  46. 46. 2010 Patterns and Practices Picture downloaded from: http://www.slideshare.net/jorambarrez/presentation-jbpm-community-day-2009-first-steps-with-jbpm4
  47. 47. 2010 1. Design procesów • Wizard? • Entry-point?
  48. 48. 2010 2. Ziarnistość procesów ACTION ACTION ACTION COMPOSITE ACTION service.invokeA() service.invokeB() service.invokeC() service.invokeABC()
  49. 49. 2010 3. Event-driven architecture!!! public boolean isValidationRequired(String transition) { if ( transition.equalsIgnoreCase(STEP_TO_INITIALCREDITABILITY) || transition.equalsIgnoreCase(STEP_TO_ASSESSMENT) || transition.equalsIgnoreCase(STEP_ACCEPTED_CHANGED_DATA) || transition.equalsIgnoreCase(STEP_TO_REGISTER_APPLICATION) || transition.equalsIgnoreCase(STEP_TO_AGREEMENT) || transition.equalsIgnoreCase(STEP_RUN_CREDIT) || transition.equals(STEP_VERIFY_DOCS_BY_STARTUP) ) { return true; } else { return false; }
  50. 50. 2010 4. Lokalizacja logiki (1/3) TASK TASK EVENT EVENT
  51. 51. 2010 TASK 4. Lokalizacja logiki (2/3) EVENT TASK EVENT TASK
  52. 52. 2010 4. Lokalizacja logiki (3/3) TASK TASK EVENT EVENT TASK TASK
  53. 53. 2010 5. Wersjonowanie (1/3) Interfejs użytkownika Warstwa aplikacyjna Świat zewnętrzny (ESB) Procesy biznesowe Arty fakt
  54. 54. 2010 5. Wersjonowanie (2/3) <process name="DecisionProcess"> ... <decision name="decide"> <handler class="pl.javarsovia.Decider"> <field name="argument"> <object class="pl.javarsovia.DecisionArgument"> ... </object> </field> </handler> </decision> ... </process>
  55. 55. 2010 5. Wersjonowanie (3/3) <process name="DecisionProcess"> ... <decision name="decide"> <handler expr="${decider}"> <field name="argument"> <object expr ="${decisionArgument}"> ... </object> </field> </handler> </decision> ... </process>
  56. 56. 2010 6. Flow context - wersjonowanie PROCESS FLOW CONTEXT class FlowContext { String username; Integer nodeCount; Date activityDate; } <flowContext> <username></username> <nodeCount></nodeCount> <activityDate></activityDate> </flowContext>
  57. 57. 2010 7. Walidacje TASK1 TASK3TASK2
  58. 58. 2010 7. Walidacje TASK1 TASK3TASK2 V1 1.W trakcie trwania zadania – np. zapis.
  59. 59. 2010 7. Walidacje TASK1 TASK3TASK2 V1 V2 2. W trakcie wyjścia z zadania
  60. 60. 2010 7. Walidacje TASK1 TASK3TASK2 V1 V2 V3 V4 3 i 4. W trakcie próby przejście wybraną ścieżką
  61. 61. 2010 jBPM - Status projektu Sep Oct Dec Jan Feb Mar Apr May Jun Jul Aug Sep 20102009 Nov 4.1 4.2 4.3 4.4 4.5 jBPM 5 BPMN 2.0 jPDL
  62. 62. 2010 jBPM - Status projektu Sep Oct Dec Jan Feb Mar Apr May Jun Jul Aug Sep 20102009 Nov 4.1 4.2 4.3 4.4 4.5 jBPM 5 BPMN 2.0 jPDL
  63. 63. 2010 Dziękuję  Picture downloaded from: http://www.slideshare.net/camunda/jboss-jbpm-4
  64. 64. 2010 Q&A

×