Hi there, I’m here again with a new module for the jBPM5 Community Training. In this occasion it’s time to take a look at the jBPM5 APIs and components followed by a Sample project containing some tests. The main idea of this module is to show you a running project that demonstrate the basic functionality of jBPM5. This module also gives you an overview about basic interaction with our business processes and business rules. Check it out and please send me feedback or questions that you might have!
Module #4: The jBPM5 API Overview
This module is about start using jBPM5 and the things that you need to know in order to understand the basic concepts about how it works. During this module you can download and play with a sample project that define a simple business process with some business rules. This module provides different tests that shows how to interact with our processes in different ways and how to test the behavior unit testing them.
The following topics are covered inside this module:
- jBPM5 API Overview
- Basic Concepts and Components
- Knowledge Builder
- Knowledge Base
- Knowledge Session
- Hands On Labs
- Downloading the Source Code
- Loading the Source Code in you IDE
- Sample Use Case
- Homework
Slides
Notice that I’ve relocated the github repository to: https://github.com/Salaboy/Drools_jBPM5-Training-Examples
Future revisions of this module will include:
- Speaker notes for each slide
- Video / Webinar
- Improved tests using jbpm-test-framework -> https://github.com/Salaboy/JBPM5-Test-Framework -> https://github.com/Salaboy/JBPM5-Test-Framework/blob/master/jbpm-test-framework/src/test/java/org/jbpm/test/matchers/SimpleEmergencyProcessTestWithHelper.java
Feel free to suggest more material that helps you to understand the content of this module!
Useful Links
Check out the training source code example projects (relocated, please re clone): https://github.com/Salaboy/Drools_jBPM5-Training-Examples
GIT on IntelliJ -> http://wiki.jetbrains.net/intellij/Using_Git_Locally
GIT on Netbeans -> http://netbeans.org/kb/docs/ide/git.html?intcmp=925655
Feedback
You can take a look at the “Contact Me” section for more information about this training course, suggestions, questions, feature requests, etc. Don’t be shy, your feedback helps to improve the quality of the material and to discover the important topics that needs to be addresses to reduce the learning hype.
Special Thanks
Special thanks to www.plugtree.com to support the jBPM5 community.
Special thanks to Alejandro “ivcoti” Ramirez for the jBPM5 Logo!
Hi Mauricio.
Thank you very much for the new module!
At slide 13, instruction mvn clean install, I get
C:\Temp\JBPM5-Training-Examples1-jBPM5-SimpleEmergencyServiceProcess\src\main\
java\com\wordpress\salaboy\example\model\FireTruck.java:[38,5] annotations are n
ot supported in -source 1.3
(use -source 5 or higher to enable annotations)
@Override
How can I correct this, please?
Best regards!
LikeLike
Hi Francisco. I will correct it in the github repo this afternoon. It’s my fault I should include the build plugings for 1.5. Greetings.
LikeLike
Francisco if you do a git pull, you will get the changes and it should work now. Thanks for the feedback! Stay Tuned!
LikeLike
Hi Mauricio,
Sorry for asking but do you know if the ebook jBPM Developer Guide is available for free?
LikeLike
Hi TestJb,
No I don’t have the ebook jBPM Developer Guide, because I wrote the book but the rights for the book are from packt. If you get a free copy of the ebook it will be illegal.
Greetings
PS: Stay tuned! I’m writing an updated version for jBPM5.
LikeLike
Hello salaboy
thank you for this training and i hope to see your
book update soon
in the homework do you mean that we should have
to choose a hospital depending on the emergency type ?
so we should have two hospital types one for fire and the other for heart attack ?
so the hospital rule task must be after dispatch vehicle
OR
we should put the hospital after the “Ask for emergency information” task?
sorry but i couldn’t understand it
regards
LikeLike
Hi Pageraz,
It’s ok.. the main idea is that you think what’s best for your use case. For the homework I recommend you to put a rule task after t he dispatch vehicle node. Then in your rules, depending the vehicle and the emergency type you can choose the hospital. You can have two hospitals that have different beds availability and based on that and the type of emergency you can choose one of the other. I will continue improving and adding more complexity to this use case in the following modules.
Stay Tuned!
LikeLike
I’m having a hard time understanding if jBPM5 is appropriate for my needs. All the examples involve “Human Tasks”. I have a number of services that can used in various sequences to accomplish useful work. All of the services involve no human input. They get an assignment (on a JMS queue), complete the work and place the result on a reply to queue. Base on that result, the path of the workflow would be determined. I’d like to orchestrate the sequence the service usage with a “workflow” engine instead of hard coding a path(s). Here would be an example
1. MDB receives data on a queue which would start a specific workflow.
2. Service 1 is to process that data.
3. Are the processed results from service 1 valid?
4. If valid, Provide the processed results to service 2 via JMS.
5. Service 2 picks up processed results for further processing via JMS.
6. Are the processed results from service 2 valid?
6. If valid, provide the processed result to service 3 via JMS.
7. etc till end of workflow is reached.
These workflow paths need to hand long running processes that need to survive service restarts and other disruptions in service. Is jBPM5 appropriate for this? I haven’t been able to wrap my head around the BPMN objects seeing how they could be all that useful. Suggestions? Should I be looking at another technology?
Thanks for your time.
LikeLike
Hey Tom,
Yes jBPM5 fits perfect. Inside the BPMN2 spec the Service Task can be used to specify your systems interactions. In this case your service tasks will all behave asynchronously because they will use JMS queues.
I’m working right now in the chapter that explains a little bit more about that. The module will show a couple of examples where the processes mix human and systems interactions. You can take a look at the alpha source code in: https://github.com/Salaboy/Drools_jBPM5-Training-Examples/tree/master/jbpm5
If you need more help you can write me privately.
Greetings!
LikeLike
Are you talking about using WorkItems defined for domain specific processes? I’d email you, but your email address eludes me.
Thanks for the reply
LikeLike
Hi Salaboy
I see that you mentioned we can use service tasks to read from JMS but i cant see anything under service task except Email and Log in the BPMN(Drools) editor. Am i missing soemthign in installation?
Can you please advise on how this can be done and share a snippet if you have it handy
Appreciate your help on this
LikeLike
Hi Sasi,
In the IDE you can plug your own Service Tasks. For example if you want to do something with JMS queues you can create a Service Task to implement that logic and then plug it into the editor.
Take a look at the documentation for the steps that you need to do in order to get it working in your environment:
http://hudson.jboss.org/hudson/job/jBPM5/lastSuccessfulBuild/artifact/target/jbpm-5.1-SNAPSHOT-docs-build/jbpm-docs/html_single/index.html#d0e2390
LikeLike
Thanks Salaboy, I went through this but its kind of vague and i couldnt actually figure out how this can be combined with normal JMS activities like queue read, topic read. Do you have any sample source where JMS is used so that we can extend it accordingly
LikeLike
Sasi, I spend my time here writing about jBPM5 and Drools, JMS it’s like a common mechanism for messaging in java, googling for it you can find a lot of examples about that. Then integrating that code with jBPM is extremely simple, but I cannot explain JMS here too, I just don’t have enough time for that. I really think that having an example with JMS will help, but if you don’t understand how to use JMS in depth you will not be able to modify it or adapt it for your use case.
Greetings.
LikeLike
Hi Mauricio,
I just wanted to let you know that these learning modules are very well done and very helpful. Looking forward to the one on Human Tasks.
Thanks,
Herman Post
LikeLike
Hi Mauricio,
Can you please advise on this. I know you are working on the human task training and i believe you might have covered it in that
http://community.jboss.org/thread/164453
Thanks
Sasi
LikeLike