How to create radio button in JBPM form modeler

410 views
Skip to first unread message

Madhu Nali

unread,
Aug 20, 2015, 6:28:19 AM8/20/15
to jBPM Usage
Hi,

I want to create a radio button in JBPM form modeler like below

Label----Employment Type and i want radio button for below two fields 
          Self Employee
          Salaried Employee
       
I saw Radio group option. but, i am not understanding how to use it 

Can any one help

Luka Bizjak

unread,
Apr 18, 2016, 7:33:34 AM4/18/16
to jBPM Usage
Help please. so many of us are asking this ridicilously basic question. It is not fucking explained anywhere!

Pere Fernandez

unread,
Apr 18, 2016, 10:02:39 AM4/18/16
to Luka Bizjak, jBPM Usage
Hello,

I think I missed Madhu's message... my fault. 

to load values on RadioGroups and SelectBox you have to create a SelectValueProvider, and configure the field to use it. To do that  you should create a java project with a mvn dependency to:

<dependency>
  <groupId>org.jbpm</groupId>
  <artifactId>jbpm-form-modeler-api</artifactId>
</dependency>

Once you did that you can create your class that implements org.jbpm.formModeler.core.config.SelectValuesProvider. This interface provides two methods:

  • String getIdentifier(): should return a unique String that identifies this provider. This String will be shown on the Select Box configuration popup.
  • Map getSelectOptions(Field field, String value, FormRenderContext renderContext, Locale locale): This method have to return a Map containting the key, text that are going to be load on theSelect box. The received parameters are:
    • Field field: the configuration of the field that is going to be evaluated.
    • String Value: the current value of the field
    • FormRenderContext renderContext: a class that contains all the information about the form that is rendered at that moment.
    • Locale locale: the locale in which is being rendered the form.

Once you've created this provider, you must compile your project and put the jar on the server classpath and restart it. After doing that you'll be able to create a form (or edit an existing one), add aSelect Box field and choose your provider on the "Data provider" combo box.

BTW, I'll check the documentation it should be explained there.

Hope it helps.

Regards,

Pere


On 18 April 2016 at 13:33, Luka Bizjak <biz...@gmail.com> wrote:
Help please. so many of us are asking this ridicilously basic question. It is not fucking explained anywhere!

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/66f4dcfd-2dd5-4bb2-a435-1e9493459758%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Luka Bizjak

unread,
Apr 19, 2016, 2:44:00 AM4/19/16
to jBPM Usage, biz...@gmail.com
thanks for explanation... but this is as complicated as one could make it... I mean is there really not simpler solution to using radial buttons? :(  Im very weak programmer, and most of this just sounds rocket science to me... 

I'd like to meet the developer who said, yeah you know what... fuck it, lets just leave this radial buttons not user friendly, so that only programmers will be able to use them?! :)

i'll probably never be able to get it to work... not without my company hiring some external help :/

Luka Bizjak

unread,
Apr 19, 2016, 4:13:56 AM4/19/16
to jBPM Usage, biz...@gmail.com
i decided that i will replace radio buttons with "short text" and using range value to make it into dropdown selection box. An ugly solution, but something that will work i think.

José Cavieres

unread,
Nov 20, 2018, 5:30:50 PM11/20/18
to jBPM Usage
Hello,

Since 7.4 this method is no longer valid because there isn't a SelectValueProvider interface . Actually the whole jbpm-form-modeler-api is gone.
What is the right way to add dynamic values to forms now?

Thanks

Pere Fernandez

unread,
Nov 21, 2018, 5:51:19 AM11/21/18
to jcav...@gmail.com, Maciej Swiderski, jbpm-...@googlegroups.com
Hola José,

this mechanism exists but for now it is not exposed to be used on a real environment. I think @Maciej Swiderski is working on a solution for his new html form renderer for kie-server, but I don't know the details.

If you really need that I can show you how to do it, but it's a bit hacky and it only will work when using forms on business-central.

Regards,

Pere

Maciej Swiderski

unread,
Nov 21, 2018, 5:56:40 AM11/21/18
to Pere Fernandez, jcav...@gmail.com, jbpm-...@googlegroups.com
Have a look at these two articles to get more details about the forms rendered by kielbasa’s server (outside of workbench)


Maciej

José Cavieres

unread,
Nov 21, 2018, 6:08:32 AM11/21/18
to Maciej Swiderski, Pere Fernandez, jbpm-...@googlegroups.com
Thank you both for the quick answer.
I read the articles, but at least this time I am interested in the make it work in workbench / business central.

Pere, can you show the "hacky way" you have?

José Cavieres

Pere Fernandez

unread,
Nov 26, 2018, 12:35:00 PM11/26/18
to José Cavieres, Maciej Swiderski, jbpm-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages