Wednesday, October 5, 2016

Adding dynamic behaviour to the Flowable Engine

We have added a new feature to the Flowable Engine that I would like to share with you even before it's available as part of an official release. The new feature is the ability to change a defined number of properties of a process definition without needing to redeploy the process definition.

Before I'll go into details about this feature, some examples of needing to redeploy a process definition would be good to set the context. One example is a service task with a defined class name in the process definition. This service task is part of a big process definition, and process instances can be active for over a year. After deploying the first version of the process definition to the production environment the requirements of the process execution have changed and a new Java class should be executed for the service task instead. This means that new deployment of the process definition is needed and existing process instances need to be migrated to this new process definition.

Another example is a user task with a candidate group management. Over time, the requirements have changed and the sales group needs to be set as the candidate group for this user task. Again, this would mean a new deployment of the process definition and migration of existing process instances.

With the addition of the DynamicBpmnService interface these use cases can be solved differently, without the need to redeploy the process definition. For example, the DynamicBpmnService interface has a method to change the class name of a specific service task named changeServiceTaskClassName. Let's look at a code example to change the class name of the exampleTask service task.

<serviceTask id="exampleTask" 
  flowable:class="org.flowable.PreviousTask" />

ObjectNode infoNode = dynamicBpmnService.changeServiceTaskClassName(
      "exampleTask", "org.flowable.NewTask");
dynamicBpmnService.saveProcessDefinitionInfo("procDefId", infoNode);

After the invocation of the saveProcessDefinitionInfo method the Flowable Engine will now execute the NewTask class instead of the PreviousTask defined in the BPMN XML. As you can see we are using Jackson JSON for storing the overriding process definition information in the Flowable database. Every process definition can have zero or one entry in the new ACT_PROCDEF_INFO table. All changes for a process definition are defined in the same JSON object and stored as a BLOB in the Flowable database. The cache that's used to retrieve the process definition info data is versioned and designed to work in a clustered Flowable environment.

Let's look at one more example, changing the candidateGroup of a user task:

<userTask id="exampleTask" flowable:candidateGroup="management" />

ObjectNode infoNode = dynamicBpmnService.changeUserTaskCandidateGroup(
      "exampleTask", "sales", true);
dynamicBpmnService.saveProcessDefinitionInfo("procDefId", infoNode);

Again, after saving the JSON object, the Flowable Engine will use the sales candidate group for the exampleTask user task instead of the management group.

If you want to override multiple properties of a specific process definition in different steps you need to get the currently stored JSON object first. This is easy to do like this:

ObjectNode infoNode = dynamicBpmnService.getProcessDefinitionInfo("procDefId");

These are the properties we currently support to change with this approach:
  1. Service task - class name
  2. Service task - expression
  3. Service task - delegate expression
  4. User task - name
  5. User task - description
  6. User task - due date
  7. User task - priority
  8. User task - category
  9. User task - form key
  10. User task - assignee
  11. User task - owner
  12. User task - candidate users
  13. User task - candidate groups
And there's an additional feature we have implemented with the same approach, which is localisation. It's now possible to store the user task name and description in multiple languages in the process definition info table and when you query for tasks you can set a locale to use. The returned tasks will then contain the localised name and description as defined in the process definition info table. Let's look at an example:

<userTask id="exampleTask" name="Name" />

ObjectNode infoNode = dynamicBpmnService.changeLocalizationName(
      "es", "exampleTask", "Nombre");
dynamicBpmnService.saveProcessDefinitionInfo("procDefId", infoNode);

Task task = taskService.createTaskQuery().locale("es").singleResult();

The returned task instance will now have Nombre as the name of the task.

We are really excited about this new feature that's available in both the Flowable 5 and 6 code that's in Github, and we are eager to get feedback about this new feature. Let us know what you think about it and maybe come up with suggestions of which properties we could add to this approach in addition to the current supported list. We'll do a 5.18.1 release in a couple weeks time, together with a new beta release for Flowable 6, that will include this feature. And you can already create your own build using the code on Github of course.

90 comments:

  1. What about changing the script inside a script task without redeploying?

    ReplyDelete
  2. Good point, will include that as well.

    ReplyDelete
  3. What about creating ad-hoc processes/tasks, ACM so to say?

    ReplyDelete
  4. What about creating ad-hoc processes/tasks, ACM so to say?

    ReplyDelete
  5. This is a really nice feature.
    This could also be interesting for the properties of a mail task, the properties for a timer event and even the signal reference for the signal event.

    ReplyDelete
  6. When is the next official release date? Will it include Spring Boot 1.3+ to take advantage of the new dev tool capabilities?

    ReplyDelete
  7. Thanks for the feedback, I've added sequence flow condition and script task support for the dynamic BPMN functionality. @Tom, your suggestions are welcome as well, and I'll have a look at adding support for it.
    We didn't upgrade to Spring boot 1.3 yet, any help with this would be welcome.

    ReplyDelete
  8. Srinivasan VaradarajanNovember 19, 2015 at 11:03 PM

    This is a great feature for building a process framework where multiple tenants will use a standard process model (a Reference Data pipeline model with ETL like properties, for instance), but each tenant can supply their own variations of the task class implementations.
    Thank you!

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. hello rally good feature. i am new in activiti-explore and i m read many post but i don't have idea how to use it in android app or web app . i am use activiti 5.18 throught rest but it is more hardcoded . can i used these java classes in my android app or have any sdk? please help

    ReplyDelete
  11. Right now, this is a Java API only feature, but we'll add support for the new DynamicBpmnService interface to our REST API as well.

    ReplyDelete
  12. hello i am using the activiti 6ui.
    but here is a problem when i create a workflow through kikstart app
    In user task , from properties attribute , when select type is enum type then not come its value type for choose yes or no ?

    ReplyDelete
  13. palanirajkumar

    hello sir ,
    sir give me the simple program for activiti bpmn restfulservices

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
    java training in chennai | java training in USA

    selenium training in chennai

    ReplyDelete
  17. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.
    python training in annanagar
    python training in chennai
    python training in chennai
    python training in Bangalore

    ReplyDelete
  18. I simply want to give you a huge thumbs up for the great info you have got here on this post.
    Blueprism online training

    Blue Prism Training in Pune

    ReplyDelete
  19. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

    rpa training in electronic-city | rpa training in btm | rpa training in marathahalli | rpa training in pune

    ReplyDelete
  20. The post is written in very a good manner and it entails many useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept.
    angularjs Training in bangalore

    angularjs Training in btm

    angularjs Training in electronic-city

    angularjs online Training

    angularjs Training in marathahalli

    ReplyDelete
  21. Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....


    Data Science Training in Chennai | Data Science course in anna nagar
    Data Science course in chennai | Data science course in Bangalore
    Data Science course in marathahalli | Data Science course in btm

    ReplyDelete
  22. Really great post, I simply unearthed your site and needed to say that I have truly appreciated perusing your blog entries.
    Python training in marathahalli | Python training institute in pune

    ReplyDelete
  23. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.

    java training in chennai | java training in electronic city

    java training in marathahalli | java training in btm layout

    ReplyDelete
  24. Greetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.

    AWS Interview Questions And Answers
    AWS Tutorial |Learn Amazon Web Services Tutorials |AWS Tutorial For Beginners
    AWS Online Training | Online AWS Certification Course - Gangboard
    AWS Training in Toronto| Amazon Web Services Training in Toronto, Canada

    ReplyDelete
  25. If you happen to be interested, feel free to shoot me an e-mail. I look forward to hearing from you! Great blog by the way!
    nebosh course in chennai

    ReplyDelete
  26. Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.
    top institutes for machine learning in chennai
    artificial intelligence and machine learning course in chennai
    machine learning certification in chennai

    ReplyDelete
  27. Great post. I was once checking constantly this weblog and I'm impressed! Extremely useful information specially the closing part. I maintain such information much. I was once seeking this specific information for a very long time. Many thanks and best of luck.
    samsung mobile service chennai
    samsung mobile repair
    samsung mobile service center near me

    ReplyDelete
  28. Thank you for taking time to provide us some of the useful and exclusive information with us.
    Regards,
    selenium course in chennai

    ReplyDelete
  29. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  30. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained!

    ReplyDelete
  31. It should be noted that whilst ordering papers for sale at paper writing service, you can get unkind attitude. In case you feel that the bureau is trying to cheat you, don't buy term paper from it.
    data science course malaysia

    ReplyDelete

  32. Hire A Technical QuickBooks Expert Today by Dialling QuickBooks Technical Support Number +1-855-686-6166. Nowadays, QuickBooks has become an essential accounting software for small and mid-size businesses. The seamless financial management process of this software gravitating a lot of businessman every day.
    QuickBooks Support Phone Number

    QuickBooks Support Number

    QuickBooks Support

    QuickBooks Technical Support Phone Number

    QuickBooks Technical Support Number

    QuickBooks Technical Support

    Quickbooks Payroll Support Phone Number

    Quickbooks Payroll Support Number

    Quickbooks Enterprise Support Phone Number

    Quickbooks Enterprise Support Number

    ReplyDelete
  33. We have helped thousands of apple customer by solving their minor technical and service related issues. You can dial this number:18003823046 any time you so desire and form anywhere you are in the country. This is a toll free Apple Support Number so you can talk freely.

    ReplyDelete
  34. It's really nice and meanful. it's really cool blog.you have really helped lots of people who visit blog and provide them useful information.
    data science course

    ReplyDelete
  35. Great Post. Very informative. Are you looking for the best automatic folding gates. Click here: Aluinium folding gates India

    ReplyDelete
  36. Azure is a technology which offers professional various development azure training in hyderabad

    ReplyDelete
  37. Hey Nice Blog!! Thanks For Sharing!!! Wonderful blog & good post. It is really very helpful to me, waiting for a more new post. Keep Blogging!Here is the best angularjs training online with free Bundle videos .

    contact No :- 9885022027.

    ReplyDelete
  38. Really learnt a lot from the post you shared. it will be helpful to us
    ui online training hyderabad

    ReplyDelete
  39. Hello, an amazing Information dude. Thanks for sharing this nice information with us. BPMN

    ReplyDelete
  40. I am inspired with your post writing style & how continuously you describe this topic on azure tutorial . After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.

    ReplyDelete
  41. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!

    Correlation vs Covariance

    ReplyDelete
  42. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

    AI Training in Hyderabad

    ReplyDelete
  43. Detectives privados Madrid Asociados es un despacho de investigación privada en Madrid con gran experiencia. Contacta con los mejores detectives privados en Madrid para todo tipo de investigaciones privadas.

    detectives privados madrid
    agencia detectives Madrid

    Thank you..

    ReplyDelete
  44. Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.
    DevOps Training in Chennai

    DevOps Course in Chennai


    ReplyDelete
  45. what a blog its really good one thanku so much oracle training in chennai

    ReplyDelete
  46. If Oracle is a job that you're dreaming of, then we, Infycle are with you to make your dream into reality. Infycle Technologies offers the best Oracle Training in Chennai, with various levels of Oracle courses such as Oracle PLSQL, Oracle DBA, etc., in 100% hands-on practical training with professional tutors in the field. Along with that, the mock interviews will be done for the candidates, so that, they can face the interviews with full confidence.

    ReplyDelete
  47. Fetch Oracle DBA Training in Chennai for making the best career in the software industry with Infycle Technologies. Infycle Technologies offers the best Oracle training in Chennai, providing courses for Oracle and many other software courses in 100% hands-on practical training with professional trainers in the domain. Along with the coaching, the placement interviews will be arranged for the students, so that they can set their careers at high standards. Of all that, 200% placement assurance will be given here. To have the best career, call 7502633633 to Infycle Technologies and grab a free demo to know more.

    ReplyDelete
  48. Goodness, so excellent and great post! A debt of gratitude is in order for offering a chance to peruse an incredible and fanciful blog. It gives me loads of joy and interest. A debt of gratitude is in order for sharing…

    DevOps Training in Hyderabad

    ReplyDelete
  49. Grab the Digital Marketing Training in Chennai from Infycle Technologies, the best software training institute, and Placement center in Chennai which is providing professional software courses such as Data Science, Artificial Intelligence, Cyber Security, Big Data, Java, Hadoop, Selenium, Android, and iOS Development, DevOps, Oracle etc with 100% hands-on practical training. Dial 7502633633 to get more info and a free demo and to grab the certification for having a peak rise in your career.

    ReplyDelete
  50. Are you interested in doing Data Science Course in Chennai with a Certification Exam? Catch the best features of Data Science training courses with Infycle Technologies, the best Data Science Training & Placement institutes in and around Chennai. Infycle offers the best hands-on training to the students with the revised curriculum to enhance their knowledge. In addition to the Certification & Training, Infycle offers placement classes for personality tests, interview preparation, and mock interviews for clearing the interviews with the best records. To have all it in your hands, dial 7504633633 for a free demo from the experts.

    ReplyDelete
  51. Are you looking for indian food near me? Maas Best provides the high quality of indian food, tiffin home delivery, and Indian tiffin delivery at affordable prices to his customers. Maas Best is one of best tiffin service provider where provides the home-cooked Indian food, Indian tiffin service, and tiffin food delivery in the United Kingdom. You can now order food online, all your favourite dishes, and many more delicious options.

    indian food near me

    ReplyDelete
  52. If you are dreaming of an IT job !!! Then AWS Course in Chennai!!Is the best choice for you. Yes, what you heard is Right Infycle offering you an AWS course for an Affordable price with experienced trainees, Practical Classes, Flexible timing, and more.

    ReplyDelete
  53. very informative blogs posting thanks you so much sharing me information.
    German Language course In Chandigarh

    ReplyDelete
  54. Thank you so much for such a well-written article. It’s full of insightful information
    Best Zirconia Brands In India

    ReplyDelete
  55. This comment has been removed by the author.

    ReplyDelete
  56. Very nice post here and thanks for it .I always like and such a super contents of these post. Excellent and very cool idea and great content of different kinds of the valuable information's.
    we are here at dental direkt which provides best best zirconia crowns in india

    ReplyDelete
  57. Pleasant data, important and incredible structure, as offer great stuff with smart thoughts and ideas, loads of extraordinary data and motivation, the two of which I need, because of offer such an accommodating data here.
    business analytics course in hyderabad

    ReplyDelete
  58. Nice blog and informative content. I am impressed a lot with your blog. Keep up your work in further blogs.
    Data Science Training in Hyderabad

    ReplyDelete
  59. I truly like your style of blogging. I added it to my preferred's blog webpage list and will return soon…

    ReplyDelete
  60. Основные способы хиромантии родились тысячелетия тому назад до Н.Э. Погодные проявления или церемониальные убийства животных за многие годы основали точное толкование увиденного. Гадание замужество является самым достоверным действием просмотреть грядущее человека.

    ReplyDelete
  61. 360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.

    ReplyDelete
  62. Thank you for the post. I will definitely comeback. data science course in kanpur

    ReplyDelete
  63. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. data science training in surat

    ReplyDelete
  64. Thank you so much for ding the impressive job here, everyone will surely like your post. data science course in kanpur

    ReplyDelete
  65. This is a really authentic and informative blog. Share more posts like this.
    Types of Bots in Automation Anywhere
    Automation Anywhere Bots

    ReplyDelete

  66. Thanks for this blog, keep sharing your thoughts like this...
    MERN Stack Future
    Importance Of MERN Stack

    ReplyDelete
  67. This post is so useful and informative. Keep updating with more information.....
    British Council Practice Test
    How To Start Preparation For IELTS

    ReplyDelete
  68. I really enjoyed reading your post! It was not only informative but also helped me enhance my knowledge with the latest information. Please continue blogging. Your article is well-written and contains valuable information that is beneficial for readers. Thank you for sharing it, and I look forward to reading more posts like this from you.

    Best CMA Coaching in Hyderabad

    ReplyDelete
  69. I strongly believe in leaving comments on websites to inform blog writers that they have contributed something valuable to the internet, Thanks for sharing.

    Best Colleges For MEC In Hyderabad

    ReplyDelete