JBUG.Jbpm.2009

819 views
742 views

Published on

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

No Downloads
Views
Total views
819
On SlideShare
0
From Embeds
0
Number of Embeds
71
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • This shows the client API Indicate the transactions
  • This shows the client API Indicate the transactions
  • This shows the client API Indicate the transactions
  • JBUG.Jbpm.2009

    1. 1. jBPM 4 Tom Baeyens JBoss, Red Hat
    2. 2. Agenda <ul><li>What is jBPM </li></ul><ul><li>jBPM 4 Goals </li></ul><ul><li>jBPM 4 Use Cases </li></ul>
    3. 3. Tom Baeyens <ul><li>Lead and founder of JBoss jBPM </li></ul><ul><li>Consulting for numerous BPM projects </li></ul><ul><li>Bringing BPM mainstream </li></ul><ul><li>Articles </li></ul><ul><ul><li>InfoQ, TSS, Dzone, OnJava,… </li></ul></ul><ul><li>Blogs </li></ul><ul><ul><li>http://processdevelopments.blogspot.com/ </li></ul></ul><ul><li>Talks </li></ul><ul><ul><li>JavaOne, JBossWorld, JAOO, TSS,… </li></ul></ul>
    4. 4. What is jBPM <ul><li>Business Process Management </li></ul><ul><ul><li>BPM as a discipline </li></ul></ul><ul><ul><li>BPM as software engineering </li></ul></ul><ul><li>jBPM </li></ul><ul><ul><li>BPM for Java Developer </li></ul></ul><ul><ul><li>Manage task lists for people </li></ul></ul><ul><ul><li>Orchestrate POJO code </li></ul></ul><ul><ul><li>Transactional state machine library </li></ul></ul><ul><ul><li>Graphical </li></ul></ul>
    5. 5. What is jBPM Your App Your Architecture jBPM
    6. 6. What is jBPM <ul><li>Model process </li></ul><ul><ul><li>Declare tasks </li></ul></ul><ul><ul><li>Bind to your POJO Java code </li></ul></ul><ul><li>Decorate </li></ul><ul><ul><li>Asynchronous continuations </li></ul></ul><ul><ul><li>Timers </li></ul></ul>
    7. 7. jBPM 4 Goals <ul><li>Improve supportability </li></ul><ul><li>Grow to next level of adoption </li></ul><ul><li>Raise 'ability to execute' </li></ul><ul><li>Implementation improvements </li></ul>
    8. 8. Improve Supportability <ul><li>Separation between normal usage from bleeding edge usage </li></ul><ul><ul><li>public API vs internal packages </li></ul></ul><ul><ul><li>Userguide vs devguide </li></ul></ul><ul><li>More stable database / process definition caching </li></ul><ul><ul><li>Migration between 4.x releases (plan) </li></ul></ul><ul><li>Automatic JBoss installation </li></ul><ul><ul><li>No messing with configs and libs </li></ul></ul><ul><ul><li>Tested configurations </li></ul></ul>
    9. 9. Improve Supportability <ul><li>Continuous integration </li></ul><ul><ul><li>Ability to reproduce bugs </li></ul></ul><ul><ul><li>Collect community knowledge in test suite </li></ul></ul><ul><ul><ul><li>Ability to keep improving over longer time </li></ul></ul></ul><ul><ul><ul><li>Longer lifespan of jBPM 4 </li></ul></ul></ul><ul><li>Config import system </li></ul><ul><ul><li>Less error prone </li></ul></ul><ul><ul><li>Imports for hibernate tx, jta tx, spring tx </li></ul></ul><ul><ul><li>Allows for default updates in default imports </li></ul></ul>
    10. 10. Grow to Next Level of Adoption <ul><li>Lowering the treshold to get started </li></ul><ul><ul><li>Simpler API </li></ul></ul><ul><ul><ul><li>Split normal usage from bleeding edge </li></ul></ul></ul><ul><ul><ul><li>API based queries </li></ul></ul></ul><ul><ul><li>Better container and app pluggability </li></ul></ul><ul><li>Much! improved docs </li></ul><ul><li>Examples </li></ul><ul><li>Automatic installations </li></ul><ul><ul><li>Remove need for messing on your own </li></ul></ul><ul><li>Easier configuration abstraction through imports </li></ul>
    11. 11. Increase ‘Ability to Execute' <ul><li>Historical data separated from runtime data </li></ul><ul><ul><li>Queryable history information </li></ul></ul><ul><ul><li>Keeps runtime data healthy </li></ul></ul><ul><li>Improved transaction mappings </li></ul><ul><li>Proper handling of timers and external triggers </li></ul><ul><li>More stable database </li></ul><ul><ul><li>DB data migration becomes possible </li></ul></ul><ul><li>Improved job executor </li></ul>
    12. 12. Implementation Improvements <ul><li>Improved pluggable architecture </li></ul><ul><ul><li>Changed composition to inheritence.  </li></ul></ul><ul><ul><li>Direct variable access </li></ul></ul><ul><li>Interfaces for activity implementations  </li></ul><ul><ul><li>Only exposing the methods that can be invoked. </li></ul></ul><ul><li>Changed recursion with iteration </li></ul><ul><ul><li>Dealing with automatic long loops. </li></ul></ul>
    13. 13. Use Case 1: Rapid Prototyping <ul><li>Model the process </li></ul><ul><li>Include tasks </li></ul><ul><li>Generate forms </li></ul><ul><li>Deploy </li></ul><ul><li>Show live demo </li></ul>
    14. 14. Use Cases 2: Transactional Script <ul><li>Model the script process </li></ul><ul><li>Delegate activities </li></ul><ul><ul><li>To POJO user code </li></ul></ul><ul><ul><li>EJBeans </li></ul></ul><ul><ul><li>SEAM beans </li></ul></ul><ul><li>Demarcate </li></ul><ul><ul><li>Asynchonous continuations </li></ul></ul><ul><ul><li>Timers </li></ul></ul><ul><li>Update control flow </li></ul><ul><ul><li>Hot redeploy </li></ul></ul><ul><ul><li>Changed logic </li></ul></ul>
    15. 15. Use Cases 3: Pageflow <ul><li>Pages are activities </li></ul><ul><li>Navigations are transitions </li></ul><ul><li>Persistence in HTTP session </li></ul><ul><li>SEAM </li></ul>
    16. 16. jPDL Activities <ul><li>Control flow </li></ul><ul><ul><li>transition </li></ul></ul><ul><ul><li>start </li></ul></ul><ul><ul><li>end </li></ul></ul><ul><ul><li>end-cancel </li></ul></ul><ul><ul><li>end-error </li></ul></ul><ul><ul><li>decision </li></ul></ul><ul><ul><li>fork </li></ul></ul><ul><ul><li>join </li></ul></ul><ul><ul><li>super-state </li></ul></ul><ul><ul><li>sub-process </li></ul></ul><ul><li>Functional </li></ul><ul><ul><li>state </li></ul></ul><ul><ul><li>sub-process </li></ul></ul><ul><ul><li>task </li></ul></ul><ul><ul><li>java </li></ul></ul><ul><ul><li>script </li></ul></ul><ul><ul><li>esb </li></ul></ul><ul><ul><li>hql </li></ul></ul><ul><ul><li>sql </li></ul></ul>
    17. 17. jPDL Features <ul><li>Lots of functional activities </li></ul><ul><ul><li>mail, java, esb, task,… </li></ul></ul><ul><li>Concurrency </li></ul><ul><li>Event listeners </li></ul><ul><li>Timers </li></ul><ul><li>Asynchronous continuations </li></ul><ul><li>Transactional exception handlers </li></ul>
    18. 18. State Choice
    19. 19. State Choice <ul><li>< process name = &quot;StateChoice&quot; > </li></ul><ul><li>< start > </li></ul><ul><li>< transition to = &quot;wait for response&quot; /> </li></ul><ul><li></ start > </li></ul><ul><li>< state name = &quot;wait for response&quot; > </li></ul><ul><li>< transition name = &quot;accept&quot; to = &quot;submit document&quot; /> </li></ul><ul><li>< transition name = &quot;reject&quot; to = &quot;try again&quot; /> </li></ul><ul><li></ state > </li></ul><ul><li>< state name = &quot;submit document&quot; /> </li></ul><ul><li>< state name = &quot;try again&quot; /> </li></ul><ul><li></ process > </li></ul>
    20. 20. State Choice <ul><li>// create a configuration </li></ul><ul><li>Configuration configuration = new Configuration(); </li></ul><ul><li>// build a process engine from a configuration </li></ul><ul><li>ProcessEngine processEngine = configuration.buildProcessEngine(); </li></ul><ul><li>// Obtain the services from the process engine </li></ul><ul><li>// ProcessEngine and Services are to be used as singletons. </li></ul><ul><li>// ( ie they are threadsafe ) </li></ul><ul><li>RepositoryService repositoryService = processEngine.getRepositoryService(); </li></ul><ul><li>ExecutionService executionService = processEngine.getExecutionService(); </li></ul><ul><li>TaskService taskService = processEngine.getTaskService(); </li></ul>
    21. 21. State Choice <ul><li>repositoryService .createDeployment() </li></ul><ul><li>.addResourceFromClasspath( </li></ul><ul><li>&quot;org/jbpm/examples/state/choice/process.jpdl.xml“ ) </li></ul><ul><li>.deploy(); </li></ul>
    22. 22. State Choice <ul><li>ProcessInstance processInstance = executionService </li></ul><ul><li>.startProcessInstanceByKey( &quot;StateChoice&quot; ); </li></ul><ul><li>String executionId = processInstance </li></ul><ul><li>.findActiveExecutionIn( &quot;wait for response&quot; ) </li></ul><ul><li>.getId(); </li></ul><ul><li>processInstance = executionService </li></ul><ul><li>.signalExecutionById(executionId, &quot;accept&quot; ); </li></ul><ul><li>assertEquals( &quot;submit document&quot; , </li></ul><ul><li>processInstance.getActivityName()); </li></ul>
    23. 23. Designer
    24. 24. Console
    25. 25. Conclusion <ul><li>jBPM provides overview of application </li></ul><ul><ul><li>External triggers </li></ul></ul><ul><ul><li>Wait states </li></ul></ul><ul><ul><li>Business view </li></ul></ul><ul><li>jBPM adds a layer on top of TX basics </li></ul><ul><ul><li>Transactional timers </li></ul></ul><ul><ul><li>Asynchronous messages </li></ul></ul><ul><li>Integrates with </li></ul><ul><ul><li>Standard & Enterprise Java </li></ul></ul><ul><ul><li>JBoss and other app servers </li></ul></ul><ul><ul><li>SEAM </li></ul></ul><ul><ul><li>Spring </li></ul></ul>
    26. 26. Q&A
    27. 27. Process Concurrency

    ×