2018/10/09

Let's embed forms ... rendered by KIE Server

jBPM comes with rather sophisticated form modeller that allows to graphically build forms for processes and tasks. These forms can then be used to interact with process engine to start new instances or complete user tasks.

One of the biggest advantages of using forms built in workbench is that they share the same life cycle as your business assets (processes and user tasks). By that they are versioned exactly the same way - so if you have another version of a process that requires more information to start you simply create new version of the project and make changes to both process definition and form. Once deployed you can start different versions of the process using dedicated forms.

Although to be able to take advantage of these forms users have to be logged into workbench as the only way to render the content is ... through workbench itself. These days are now over ... KIE Server provides pluggable renderers for forms created in workbench. That means you can solely interact with kie server to perform all the needed operations. So what does this brings:
  • renders process forms - used to start new instances
  • renders case forms - used to start new case instances - includes both data and role assignments
  • renders user task forms - used to interact with user tasks - includes life cycle operations

Worth noting is that rendered forms are fully operational, meaning they come with buttons to perform all the operations that are based on the context - e.g. if user task is in in progress state there are buttons to stop, release, save and complete.

Here are few screenshots on how the forms look like, these are taken from the sample projects that come out of the box with jBPM distribution



Evaluation start process form

Mortgage start process form



IT Orders start case form
As it was mentioned, form renderers are pluggable and out of the box there are two implementations

  • based on PatternFly - this is the default renderer that keeps the look and feel consistent with workbench
  • based on Bootstrap
Renderers can be switched per each form rendering request by simply appending query parameter
?renderer=patternfly or ?renderer=boostrap if not given patternfly is the default one.

Here are few examples of the REST endpoints that illustrate how to get these forms rendered

http://localhost:8080/kie-server/services/rest/server/containers/evaluation/forms/processes/evaluation/content
http://localhost:8080/kie-server/services/rest/server/containers/evaluation/forms/tasks/1/content


http://localhost:8080/kie-server/services/rest/server/containers/mortgage-process/forms/processes/Mortgage_Process.MortgageApprovalProcess/content
http://localhost:8080/kie-server/services/rest/server/containers/mortgage-process/forms/tasks/2/content


http://localhost:8080/kie-server/services/rest/server/containers/itorders/forms/cases/itorders.orderhardware/content
http://localhost:8080/kie-server/services/rest/server/containers/itorders/forms/tasks/3/content

Note that containers are given as alias so that brings in additional benefits when working with forms and multiple project versions.

And at the end few short screen casts showing this feature in action

Evaluation process


Mortgage process


IT Orders case


Multi Sub Form - dealing with list of items in forms



More technical information will be provided in the next article as this one is just a quick preview of what's coming. Hope you like it and don't forget to provide feedback!

8 comments:

  1. There's typo in boostrap :)

    ReplyDelete
  2. Wow, such a nice article is this.how customers technique and think about your design
    One of the most important differences among print and internet designs is how human beings view them. business forms and printing in Hanford

    ReplyDelete
  3. hi,

    is it possible to open a jbpm rendered form from an external app a without having to input username and password? username and password are stored within the app and could be provided when the form is opened..

    tks

    ReplyDelete
  4. I really like this post which share that how can we design a business forms. Keep sharing more posts like this.

    ReplyDelete
  5. rendering forms via rest seems to nave js resources with server in its path harcoded. In this case starting with localhost, which does not render at the server where the rest call was originated.

    ReplyDelete
  6. Hello everyone out there, I'm here to give my testimony about a herbalist doctor who helped me. I was infected with HERPES SIMPLEX VIRUS in 2011, I went to many hospitals to heal myself but there was no solution, so I was thinking how I can get a solution so that my body can be well. One day I was in the river thinking about where I can go to get a solution. so a lady walked towards me telling me why I'm so sad and I open everything by telling her my problem, she told me she could help me, she introduced me to a doctor who uses herbal medicines to cure the SIMPLEX HERPES VIRUS and gave me your email, so I sent you an email. He told me everything I had to do and also gave me instructions to take, which I followed correctly. Before I knew what was happening after two weeks, the SIMPLEX HERPES VIRUS that was in my body disappeared. therefore, if you also have a broken heart and need help, you can also send an email to {oliha.miraclemedicine@gmail.com}or whatsapp him number: +2349038382931 or Facebook page https://www.facebook.com/drolihamiraclemedicine/Contact him today and he will have a testimony ... Good luck!
    Dr. OLIHA also cures:1. HIV / AIDS2. HERPES 1/23. CANCER4. ALS (Lou Gehrig's disease)5. Hepatitis B6. chronic pancreatic7. emphysema8. COPD (chronic obstructive pulmonary disease)

    ReplyDelete
  7. HOW I GOT RID OF MY HERPES Virus WITH THE HELP OF DR Aire. Greetings to the general public, i want to inform the general public how i was cured of HERPES Simplex Virus by a Doctor called Dr Aire. i visited different hospital but they gave me list of drugs like Famvir, Zovirax, and is Valtrex which is very expensive to treat the symptoms and never cured me. I was browsing through the Internet searching for remedy on HERPES and i saw comment of people talking about how Doctor Dr Aire cured them. when i contacted him he gave me hope and send a Herbal medicine to me that i took as instructed and it seriously worked for me, i am a free person now without problem, my HERPES result came out negative. I pray for you Dr Aire God will give you everlasting life, you shall not die before your time for being a sincere and great man. Am so happy, you can also contact him if you have any problem like HIV/AID, CANCER,HERPATITIS,DIABETES,HPV,INFECTION ETC. Reach him on his Email Address at=== drairehome@gmail.com or you can contact him on WHATSAPP FOR EASY ACCESS at +2347036740271

    ReplyDelete
  8. HELLO EVERYONE.. FEW MUNINETS TO REDY THIS INFOR ON HERPES CURE 2018..
    2017 MY MOTHER WAS DIAGNOSED OF HERPES/ KNOWN AS GENITAL WARTS ,I SPENT A LOT OF MONEY ON HER MEDICATION TILL A POINT I EVEN LOST HOPE,BECAUSE MY MOTHER WAS GRADUALLY DYING AND LOST HER MEMORY TOO, I WAS SO DESPERATE TO GET MY MOTHER BACK TO NORMAL, ONE DAY MY UNCLE WHO LIVES IN LONDON UNITED KINGDOM TOLD ME ABOUT DR OLIHA ,WHO HELPED HIM GET RID OF HERPES /GENITAL WART WITH HERBAL MEDICINE AND HIS HERBAL SOAP ,I WAS SO SHOCKED WHEN HE TOLD ME ABOUT THIS ,ALTHOUGH I NEVER BELIEVE IN HERB BUT, I KEEP TO BELIEVE BECAUSE MY UNCLE CAN'T TELL ME LIES WHEN IT COMES TO HEALTH CONDITION I CONTACTED DR OLIHA VIA HIS EMAIL; OLIHA.MIRACLEMEDICINE@GMAIL.COM , YOU CAN TALK TO HIM VIA CALL OR WHATSAPP MESSENGER ON +2349038382931 , HE REPLIED AND ASK ME TO SEND MY HOME ADDRESS AND MY MOTHER'S DETAIL AND THEN I PURCHASED THE HERBAL MEDICINE,SENT ME THE HERBAL MEDICINE THROUGH COURIER SERVICE, WHEN I RECEIVED THIS HERBAL MEDICINE USED IT FOR 2 WEEKS, AND 4 DAYS OF USAGE THE WARTS FELL OFF, MY MOTHER I NOW TOTALLY CURED AND MY MOTHER IS LIVING FREE AND HAPPY AGAIN. YOU CAN TALK TO DR VIA HIS MOBILE NUMBER OR WHATS APP HIM ON +2349038382931 or website i saw on the :https://olihamiraclemedicine.webs.com/    ALL THANKS TO DOCTOR DR OLIHA  

    ReplyDelete