Your SlideShare is downloading. ×
0
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

jBPM5 in action - a quickstart for developers

9,791

Published on

jBPM5 presentation at JUDCon

jBPM5 presentation at JUDCon

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

No Downloads
Views
Total Views
9,791
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
384
Comments
0
Likes
7
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1.  
  • 2. jBPM5 in Action: A Quickstart for Developers Kris Verlaenen jBPM5 Lead Engineer
  • 3. Overview <ul><li>What is (j)BPM?
  • 4. Why BPM?
  • 5. Getting started with jBPM5
  • 6. Testing, debugging, deploying
  • 7. Integrating in your architecture
  • 8. Persistence and transactions
  • 9. Console </li></ul>
  • 10. What is BPM? A business process is a process that describes the order in which a series of steps need to be executed, using a flow chart. Business Process Management
  • 11. Why BPM? <ul><li>Visibility
  • 12. Monitoring
  • 13. Higher-level </li></ul><ul><li>Continuous improvement
  • 14. Speed of development
  • 15. Increased agility </li></ul>
  • 16. Getting started with jBPM5 !
  • 17. Key Characteristics of jBPM5 <ul><li>Open-source business process management project offering: </li></ul><ul><ul><li>generic process engine supporting native BPMN 2.0 execution
  • 18. targeting developers and business users
  • 19. collaboration, management and monitoring using web-based consoles
  • 20. powerful rules and event integration </li></ul></ul>
  • 21. From Workflow to BPM <ul><li>Core engine is a workflow engine in pure Java </li></ul><ul><ul><li>state transitions
  • 22. lightweight
  • 23. embeddable
  • 24. generic, extensible </li></ul></ul>Core Engine
  • 25. Core Engine Knowledge Base Stateful Knowledge Session Process Definition Process Instance
  • 26. BPMN 2.0 Example &lt; definitions ... &gt; &lt; process id=&amp;quot;com.sample.bpmn.hello&amp;quot; name=&amp;quot;Hello World&amp;quot; &gt; &lt; startEvent id=&amp;quot;_1&amp;quot; name=&amp;quot;StartProcess&amp;quot; /&gt; &lt; sequenceFlow sourceRef=&amp;quot;_1&amp;quot; targetRef=&amp;quot;_2&amp;quot; /&gt; &lt; scriptTask id=&amp;quot;_2&amp;quot; name=&amp;quot;Hello&amp;quot; &gt; &lt; script &gt;System.out.println(&amp;quot;Hello World&amp;quot;);&lt;/ script &gt; &lt;/ scriptTask &gt; &lt; sequenceFlow sourceRef=&amp;quot;_2&amp;quot; targetRef=&amp;quot;_3&amp;quot; /&gt; &lt; endEvent id=&amp;quot;_3&amp;quot; name=&amp;quot;EndProcess&amp;quot; /&gt; &lt;/ process &gt; &lt;/ definitions &gt; &lt; definitions ... &gt; &lt; process id=&amp;quot;com.sample.bpmn.hello&amp;quot; name=&amp;quot;Hello World&amp;quot; &gt; &lt; startEvent id=&amp;quot;_1&amp;quot; name=&amp;quot;StartProcess&amp;quot; /&gt; &lt; sequenceFlow sourceRef=&amp;quot;_1&amp;quot; targetRef=&amp;quot;_2&amp;quot; /&gt; &lt; scriptTask id=&amp;quot;_2&amp;quot; name=&amp;quot;Hello&amp;quot; &gt; &lt; script &gt;System.out.println(&amp;quot;Hello World&amp;quot;);&lt;/ script &gt; &lt;/ scriptTask &gt; &lt; sequenceFlow sourceRef=&amp;quot;_2&amp;quot; targetRef=&amp;quot;_3&amp;quot; /&gt; &lt; endEvent id=&amp;quot;_3&amp;quot; name=&amp;quot;EndProcess&amp;quot; /&gt; &lt;/ process &gt; &lt;/ definitions &gt;
  • 27. Java Interface ProcessRuntime interface <ul><li>startProcess(processId)
  • 28. startProcess(processId, parameters)
  • 29. signalEvent(type, event)
  • 30. signalEvent(type, event, instanceId)
  • 31. abortProcessInstance(instanceId)
  • 32. getProcessInstance(instanceId)
  • 33. … </li></ul>
  • 34. Java Example // (1) Create knowledge base and add process definition KnowledgeBuilder kbuilder = ... kbuilder.add( ..., &amp;quot;sample.bpmn&amp;quot;, ResourceType.BPMN2); KnowledgeBase kbase = kbuilder.newKnowledgeBase(); // (2) Create new stateful knowledge session StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); // (3) Start a new process instance ksession.startProcess(“com.sample.bpmn.hello”);
  • 35. TITLE SLIDE: HEADLINE Presenter name Title, Red Hat Date Demo
  • 36. Domain-specific Processes <ul><li>Extend palette with domain-specific, declarative service nodes </li></ul><ul><ul><li>define input / output parameters
  • 37. runtime binding </li></ul></ul>
  • 38. Example: Notification [ [ &amp;quot; name &amp;quot; : &amp;quot;Notification&amp;quot;, &amp;quot; parameters &amp;quot; : [ &amp;quot;Message&amp;quot; : new StringDataType(), &amp;quot;From&amp;quot; : new StringDataType(), &amp;quot;To&amp;quot; : new StringDataType(), &amp;quot;Priority&amp;quot; : new StringDataType(), ], &amp;quot; displayName &amp;quot; : &amp;quot;Notification&amp;quot;, &amp;quot; icon &amp;quot; : &amp;quot;icons/notification.gif&amp;quot; ] ]
  • 39. Example: Notification class NotificationHandler implements WorkItemHandler { public void executeWorkItem(WorkItem wI, WorkItemManager manager) { String from = (String) wI. getParameter (&amp;quot;From&amp;quot;); String to = (String) wI. getParameter (&amp;quot;To&amp;quot;); String m = (String) wI. getParameter (&amp;quot;Message&amp;quot;); // send email EmailService service = ...; service.sendEmail(from, to, &amp;quot;Notification&amp;quot;, m); manager. completeWorkItem (wI.getId(), null); } }
  • 40. Human task service <ul><li>User task
  • 41. Human task service (WS-HT) </li></ul><ul><ul><li>Task lists
  • 42. Task life cycle </li></ul></ul><ul><li>Task clients </li></ul><ul><ul><li>Task forms </li></ul></ul>
  • 43. Human Task Service public void start( long taskId, String userId, .. ) public void stop( long taskId, String userId, .. ) public void release( long taskId, String userId, .. ) public void suspend( long taskId, String userId, .. ) public void resume( long taskId, String userId, .. ) public void skip( long taskId, String userId, .. ) public void delegate( long taskId, String userId,  String targetUserId, .. ) public void complete( long taskId, String userId,  ContentData outputData, .. )
  • 44. Testing, debugging, deploying, etc.
  • 45. Model Deploy Execute Monitor Analyze Life Cycle Mining Analysis Optimization Simulation Testing Design Monitoring Reporting Execution Integration Deployment Management Audit Human Interaction Collaboration
  • 46. JUnit Testing public class MyProcessTest extends JbpmJUnitTestCase { public void testProcess() { StatefulKnowledgeSession ksession = createKnowledgeSession (&amp;quot;sample.bpmn&amp;quot;); ProcessInstance pI = ksession. startProcess (&amp;quot;com.sample.bpmn.hello&amp;quot;); assertProcessInstanceCompleted (pI.getId(), ksession); assertNodeTriggered (pI.getId(), &amp;quot;StartProcess&amp;quot;, &amp;quot;Hello&amp;quot;, &amp;quot;EndProcess&amp;quot;); } }
  • 47. Debugging
  • 48. TITLE SLIDE: HEADLINE Presenter name Title, Red Hat Date Demo
  • 49. Guvnor <ul><li>Guvnor as knowledge repository </li></ul><ul><ul><li>BPMN2 processes
  • 50. Task and process forms
  • 51. Model </li></ul></ul><ul><li>Web-based process editor (Oryx)
  • 52. Build, deploy, test, manage and collaboration features </li></ul>
  • 53. TITLE SLIDE: HEADLINE Presenter name Title, Red Hat Date Demo
  • 54. Integrating in your Architecture
  • 55. Architecture <ul><li>From “embedded” to “as a service”
  • 56. Command-based
  • 57. Different underlying technologies </li><ul><li>Java component (embedded, JNDI)
  • 58. REST service
  • 59. Web service
  • 60. EJB </li></ul><li># of (independent) session </li></ul>
  • 61. REST API
  • 62. Integration
  • 63. Integration
  • 64. Integration
  • 65. Integration
  • 66. Persistence and Transactions
  • 67. Persistence and Transactions <ul><li>Persistence (JPA, pluggable) </li><ul><li>Runtime persistence
  • 68. History logging
  • 69. Services </li></ul><li>Transactions (JTA, pluggable) </li><ul><li>Command-scoped
  • 70. User-defined </li></ul></ul>
  • 71. Persistence <ul><li>Create a persistent knowledge session </li></ul>EntityManagerFactory emf = Persistence.createEntityManagerFactory( &amp;quot;...&amp;quot; ); Environment env = KnowledgeBaseFactory.newEnvironment(); env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf ); StatefulKnowledgeSession ksession = JPAKnowledgeService . newStatefulKnowledgeSession( kbase, null, env ); JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger (ksession);
  • 72. Persistence ProcessInstanceInfo ProcessInstanceLog NodeInstanceLog
  • 73. User Transactions Environment env = KnowledgeBaseFactory.newEnvironment(); env.set( EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager() ); UserTransaction ut = (UserTransaction) new InitialContext().lookup(&amp;quot;java:comp/UserTransaction&amp;quot;); ut.begin(); // do stuff here, e.g. ksession.startProcess(..) ut.commit();
  • 74. Console
  • 75. Console <ul><li>Web-based management
  • 76. Business user
  • 77. Features </li></ul><ul><ul><li>Process instance management
  • 78. User task lists / forms
  • 79. Reporting </li></ul></ul>
  • 80. TITLE SLIDE: HEADLINE Presenter name Title, Red Hat Date Demo
  • 81. jBPM5: What, where? <ul><li>jBPM home page
  • 82. Source http://github.com/droolsjbpm/jbpm
  • 83. Hudson http://hudson.jboss.org/hudson/job/jBPM
  • 84. Blog http://kverlaen.blogspot.com/
  • 85. #jbpm on irc.codehaus.org
  • 86. [email_address]
  • 87. jBPM user forum </li></ul>
  • 88. jBPM5 in Action: A Quickstart for Developers Kris Verlaenen jBPM5 Lead Engineer

×