jBPM5 Community Training – Module #5: Domain Specific Processes

Hi there, I’m here again with a new module for the jBPM5 Community Training. Now it’s time to take a look at the features provided by jBPM5 to support extension points that allow us to create our domain specific behaviors. This module covers the concepts required to extend and plug your own implementations with external systems. The notion of synchronous and asynchronous interactions and some recommendations about how to deal with them are also included. Check it out and please send me feedback or questions that you might have!

Module #5: Domain Specific Processes

This modules covers two different aspects that we need to understand to customize our business processes to specific business situations. The first concept that we need to understand is the Service Task activity defined in the BPMN v2 specification. Once we understand the nature of external system interactions we need to understand the mechanisms implemented in jBPM5 to provide these extension points.

The following topics are covered in this module:

  • Domain Specific Processes
    • Introduction
      • BPMN2 Service Tasks
      • Work Item Concept inside jBPM5
  • Work Items characteristics
  • Work Item Handlers
    • Implementing Custom Handlers
    • Controlling Flow Execution
  • Examples


Future revisions of this module will include:

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: 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


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.

PS: this module will be also published in: http://ilesteban.wordpress.com -> Thanks for the Support!

Special Thanks

Special thanks to www.plugtree.com to support the jBPM5 community.

Special thanks to Alejandro “ivcoti” Ramirez for the jBPM5 Logo!

10 thoughts on “jBPM5 Community Training – Module #5: Domain Specific Processes”

  1. Conceptually it is a good explanation to get started. The only problem I see is that you refer in slides 27-29 to an example project that does not contain a single ‘serviceTask’?

    It would be of help to have one to refer to…


  2. Hi Mauricio!

    First of all, I want to thank you very much for this training. It’s been very much appreciated!

    Here are some questions / observations:

    Slide 09: implementation attribute of Service Task Activity.
    I didn’t find this attribute at “Vehicle Tracking (GPS)” node. Is it tns:taskName attribute of ?

    Slide 24: What are, for example, other ways, besides JMS Queue, to schedule a job in an external system?

    Are there generic guidelines about when to use scripts tasks (that may become “big” to implement what we intend) or when to implement the desired functionality as an external piece of code?

    Example 2:
    file EmergencyProcessWorkItemsTest.java
    class class MyTrackingSystemMock implements VehicleTrackingSystem
    method public void stopTacking(String vehicleId)

    Should line this.currentTrackingsById.remove(vehicleId); be replaced by this.currentTrackingsByVehicleId.remove(vehicleId); ?

    Example 2:

    interface VehicleTrackingSystem
    public String queryTackingStatus(String trackingId);


    class MyTrackingSystemMock implements VehicleTrackingSystem
    public String queryTackingStatus(String vehicleId)

    String trackingId and String vehicleId are both strings, but with different meanings. Am I missing something?

    Example 2:

    public String queryTackingStatus(String vehicleId){
    return “There is tracking for the vehicle with id = “+vehicleId;

    “There isn’t” in place of “There is”?

    Example 2:
    file EmergencyProcessWorkItemsTest.java
    line 74 (ksession.insert(emergency);).

    I’ve commented this line and noticed no behavior change of the execution. Why was this line included, since the emercency object was sent to the process via parameters? (At SelectEmergencyVehicleSimple.drl file the emergency is retrieved from $process.getVariable)

    That’s it 🙂
    Thanks again.


    1. Francisco, thank you very much for your feedback, it looks like I miss the comment notification and I never get back to answer.
      We are changing the examples right now to provide better ones and all these feedback will help us a lot!
      I will be checking all your comments for new versions, but can you ask again about the things that you have doubts or the things that you want to see included in the training?
      Do you want to contribute with this initiative? looks like you are using the jBPM5 project and it’s a good opportunity to learn 🙂


  3. Hi at all… first of all thanks for the grat job contained in this tutorials… now i’ve notice in example 2 that the emergency.revision change automatically to “1” just after ksession.insert(emergency) method… so why this happen?


    1. Salaboy,

      Appreciate the maven approach of your examples. It allowed me to easily get the whole jbpm engine running in Netbeans so I could run the JUnit tests you provided. I even upgraded to the latest version of all the jbpm components. Then I gutted the bpmn file to do what I wanted to do (call 3 web services, using the results of the first to as inputs to the 3rd web service call). Worked great, in my own little world.

      Deploying to the jBPM5 engine has been the sticking point, and could be a deal-breaker for our team. I already whined about this here (http://community.jboss.org/thread/160213?start=30&tstart=0).

      Sorry for the vagueness of the deployment issue I’m having, but I don’t appear to be alone on this.



      1. Hi Ronnie,
        I’m usually recommend to keep things simple. Are you sure that you want to use the jBPM5 server? I mean.. you can build your own server and keep everything as simple as you need. If you want to use and deploy to that specific runtime you will need to learn more complicated mechanisms that usually you will need to change.



    2. Hi Stefano, sorry for my delay in the response.. Can you be a little bit more specific?
      We are changing the examples right now to publish a new version, and I will appreciate more feedback on them.


  4. Great post. I was checking constantly this weblog and I’m inspired! Very helpful info particularly the last section 🙂 I maintain such information much. I used to be seeking this particular info for a very lengthy time. Thanks and best of luck.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.