jBPM 7.8 - Form Modeler - How to load dynamic data into a ListBox

1,862 views
Skip to first unread message

beppegg

unread,
Jul 20, 2018, 9:12:54 AM7/20/18
to jBPM Usage
Hi all,

I'm messing around with the latest version of jBPM, and I'd like to design a user task form with a list box in it. I'd also like to fill the choices for the list box by requesting data from a database/rest service at runtime.

I know the older versions had a mechanism called "data provider" for achieving that goal, but I find nothing like that in the new Form Modeler.

Can anybody point me in the right direction, please?

Pere Fernandez

unread,
Jul 23, 2018, 10:21:28 AM7/23/18
to beppegg, jBPM Usage
Hi Giusepe,

sorry for the delay answering, there's a mechanism to make listboxes & radiogroups load dynamically data from different sources. The problem is that it's intended to be used for internal purposes and it's not exposed yet on UI until we don't have a final solution for clients. 

If you still want to continue with that I can guide you to make you DataProvider and make it work on your forms, but you must be aware that this might change on later relases (not in a short time frame).

Works for you?

Regards,

Pere


El dv., 20 de jul. 2018 a les 15:12, beppegg (<bep...@gmail.com>) va escriure:
--
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/ca93c29c-f34f-42b2-b106-34f5e4a8f2f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

beppegg

unread,
Jul 23, 2018, 11:39:42 AM7/23/18
to jBPM Usage
Hi Pere,

That would be wonderful, your help is greatly appreciated!
I don't mind implementing a temporary solution knowing I will have to change it in some time.

Regards,
Giuseppe

Pere Fernandez

unread,
Jul 25, 2018, 5:04:41 AM7/25/18
to beppegg, jBPM Usage
Hi, sorry for the delay.. so let's start (be prepared for a long email)

the process is kind of similar as the old form modeler but there's a small "hack" on the form you want to use the DataProvider so the steps are:

1.- Create a MVN project with your favourite IDE and add at least this deps (mvn might ask for more, but I think this are the minimum):

<dependency>
    <groupId>org.kie.workbench.forms</groupId>
    <artifactId>kie-wb-common-forms-api</artifactId>
    <version>{kie.version}</version>
</dependency>
<dependency>
    <groupId>org.kie.workbench.forms</groupId>
    <artifactId>kie-wb-common-dynamic-forms-api</artifactId>
    <version>{kie.version}</version>
</dependency>

2.- Create a class that implements org.kie.workbench.common.forms.dynamic.model.config.SelectorDataProvider. This interface is providing two methods:

- String getProviderName() -> Should return the name for the provider... due to an issue pending to solve in your implementation it should return your className :S
- SelectorData getSelectorData(FormRenderingContext context) -> this is the method that is going to provide the data for your selector, so all your magic should be done here. 

The method receives a FormRenderingContext param that basically has all the information about the current form rendering. You can get the current form from therer, the model bound to the form to read the status of it... etc.

Whatever you do here this method should return an instance of SelectorData<T> containing:
    - A Map<T, String> values -> containing the selectionr options. key (T) should be the real value of the option on the dropdown and the value (String) should be the text that is going to be displayed on the dropdown/radio
    - A T selectedValue -> specifying which is the selected value if the field has no value comming from the bound model. This is optional.

Note that the type T has to match the data type of the model property bound to the field... for example if you have a ListBox bound to a String property on a Data Object (or variable on a process) you should return a SelectorData<String> other than that might cause problems and data won't be loaded.

3.- Configure CDI (IMPORTANT!!!)
- Add a CDI scope to your SelectorDataProvider, @Dependent should be enough but use the one that makes sense for your design
- On your project create a META-INF folder on src/main/resources and place inside a empty beans.xml file

With this 3 steps done you're ready to publish your SDP, so build your jar file and place it on the Web-inf/lib folder of your deployed .war folder.

Now let's configure hack your form, please don't do this at home :)
1.- Clone the repo that contains your form
2.- Locate your form and edit it, that's a one line JSON file... in your IDE do a code reformat to make it look better (make a backup copy of your form for security!!)
3.- Locate your field on the form, it should look similar to this:
{
      "options": [],
      "dataProvider": "",
      "id": {anyID},
      "name": {anyName},
      "label": {anyLabel},
      "required": false,
      "readOnly": false,
      "validateOnChange": true,
      "binding": {anyBinding},
      "standaloneClassName": "java.lang.String",
      "code": "ListBox",
      "serializedFieldClassName": "org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.selectors.listBox.definition.StringListBoxFieldDefinition"
}
4.- On the "dataProvider" property you should write the following "remote:<your SelectorDataProvider className>", so it should be something like:
{
      "options": [],
      "dataProvider": "remote:org.jbpm.demo.MySelectorDataProvider",
      "id": {anyID},
      "name": {anyName},
      "label": {anyLabel},
      "required": false,
      "readOnly": false,
      "validateOnChange": true,
      "binding": {anyBinding},
      "standaloneClassName": "java.lang.String",
      "code": "ListBox",
      "serializedFieldClassName": "org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.selectors.listBox.definition.StringListBoxFieldDefinition"
}

Note that if there are options on the field configuration the forms engine won't call your SelectorDataProvider, so clean them if you have some.

5.- Save changes, commit & push the changes back to the repo.

Just a reminder, you should be cautious doing this forms modifications manually...

Ok, so now you should be free to start your server and se your code running, I'd recommend you doing a fake implementation at first and debug a little before doing the final implementation.

That's all, I hope it helps and and let me know how it goes. I you need more help you know where to find me.

Regards,

Pere

El dl., 23 de jul. 2018 a les 17:39, beppegg (<bep...@gmail.com>) va escriure:

beppegg

unread,
Jul 25, 2018, 5:42:05 AM7/25/18
to jBPM Usage
Thank you so much!! I'll try your procedure and I'll report back ASAP!

beppegg

unread,
Jul 26, 2018, 9:52:11 AM7/26/18
to jBPM Usage
Hi Pere,

I think I’m almost there, but I still have some work to do..
Thanks to your suggestion I'm now able to see my options retrieved when I open the form in editing mode; when I run the process though I get the following exception:

2018-07-25 15:33:05,067 ERROR [io.undertow.request] (default task-14) UT005023: Exception handling request to /jbpm-console/in.37898-63832.erraiBus: org.jboss.errai.marshalling.client.api.exceptions.MarshallingException: Failed to demarshall an instance of org.kie.workbench.common.forms.dynamic.service.shared.impl.MapModelRenderingContext
at org.jboss.errai.marshalling.server.marshallers.DefaultDefinitionMarshaller.demarshall(DefaultDefinitionMarshaller.java:180)
at org.jboss.errai.marshalling.client.marshallers.AbstractCollectionMarshaller.marshallToCollection(AbstractCollectionMarshaller.java:89)
at org.jboss.errai.marshalling.client.marshallers.ListMarshaller.doDemarshall(ListMarshaller.java:47)
at org.jboss.errai.marshalling.client.marshallers.ListMarshaller.doDemarshall(ListMarshaller.java:34)
at org.jboss.errai.marshalling.client.marshallers.AbstractCollectionMarshaller.doDemarshall(AbstractCollectionMarshaller.java:48)
at org.jboss.errai.marshalling.client.marshallers.AbstractCollectionMarshaller.doDemarshall(AbstractCollectionMarshaller.java:33)
at org.jboss.errai.marshalling.client.marshallers.AbstractBackReferencingMarshaller.demarshall(AbstractBackReferencingMarshaller.java:76)
at org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.doDemarshall(ErraiProtocolEnvelopeMarshaller.java:68)
at org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.demarshall(ErraiProtocolEnvelopeMarshaller.java:39)
at org.jboss.errai.bus.server.io.MessageFactory.getParts(MessageFactory.java:152)
at org.jboss.errai.bus.server.io.MessageFactory.createCommandMessage(MessageFactory.java:101)
at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:130)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:110)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:70)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: marshalled type is unknown to the marshalling framework: org.jboss.errai.databinding.client.MapBindableProxy
at org.jboss.errai.marshalling.client.marshallers.ObjectMarshaller.demarshall(ObjectMarshaller.java:85)
at org.jboss.errai.marshalling.client.marshallers.ObjectMarshaller.doNotNullDemarshall(ObjectMarshaller.java:112)
at org.jboss.errai.marshalling.client.marshallers.AbstractNullableMarshaller.demarshall(AbstractNullableMarshaller.java:35)
at org.jboss.errai.marshalling.server.marshallers.DefaultDefinitionMarshaller.demarshall(DefaultDefinitionMarshaller.java:153)
... 65 more


Any hint?

Regards,
Giuseppe

Pere Fernandez

unread,
Jul 26, 2018, 10:35:38 AM7/26/18
to beppegg, jBPM Usage
Hmm this looks like it is not your fault, that's something internal from the forms engine. Need to check it locally to be sure.

El dj., 26 de jul. 2018 a les 15:52, beppegg (<bep...@gmail.com>) va escriure:
--
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.

beppegg

unread,
Jul 27, 2018, 8:21:46 AM7/27/18
to jBPM Usage
Ok Pere, thank you! Let me know if I can be of any help.
I just saw you guys published jBPM v. 7.9.0 - I'll try and see if that solves my issue!

Regards,
Giuseppe

beppegg

unread,
Jul 27, 2018, 1:25:55 PM7/27/18
to jBPM Usage
Quick update: I still have the very same issue with jBPM 7.9.0 :(

Pere Fernandez

unread,
Jul 30, 2018, 12:13:24 PM7/30/18
to beppegg, jBPM Usage
Sorry for the delay answering.

What data type is bound to the field (String, number..)? 

I think we should rise a JIRA to solve this issue, I can show you how to patch it but we need this solve into our codebase.


El dv., 27 de jul. 2018 a les 19:25, beppegg (<bep...@gmail.com>) va escriure:
Quick update: I still have the very same issue with jBPM 7.9.0 :(

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

beppegg

unread,
Jul 31, 2018, 9:33:18 AM7/31/18
to jBPM Usage
Hi Pere!

The data type is String. If you point me to your JIRA, I can raise the issue so that it could get solved; I'd greatly appreciate your help in patching the current version while you work on the solution!

Regards,
Giuseppe

beppegg

unread,
Aug 8, 2018, 5:18:40 AM8/8/18
to jBPM Usage
Hi Pere,

Hope to find you well :-)

Is there any news about the patching, or the JIRA issue?

Regards,
Giuseppe

beppegg

unread,
Aug 22, 2018, 1:48:30 PM8/22/18
to jBPM Usage
Hi,

beppegg

unread,
Aug 31, 2018, 1:15:56 PM8/31/18
to jBPM Usage
In the while, we found a workaround!!!

In order for it to work, it's sufficient to create a file named ErraiApp.properties in the META-INF folder of the Jar containing the following string:

 errai.marshalling.mappingAliases=org.jboss.errai.databinding.client.MapBindableProxy->java.util.Map

Pere Fernandez

unread,
Sep 3, 2018, 3:48:55 AM9/3/18
to beppegg, jBPM Usage
Hey! Thank you very much for letting me know about that workaround! There is always to know regarding Errai Marshallers :)

If you ever come to Barcelona you have a free beer :)

Regards,

Pere

Roberto Miglietta

unread,
Sep 4, 2018, 4:59:22 AM9/4/18
to jBPM Usage
Hello,
I need to read a value of a variable to populate a SelectorDataProvider. How can I do that?
Thank you

José Cavieres

unread,
Dec 6, 2018, 3:31:32 PM12/6/18
to jBPM Usage
Hello,

The workaround is not working for me in 7.14. 
Do you have a working example that could share or any suggestion?
Everything works as expected (including the errai exception), but when the line in ErraiApp.properties is added, the following exception is thrown:

17:17:50,205 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "jbpm-console.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"jbpm-console.war\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
java.lang.RuntimeException: failed to instantiate new type: org.jboss.errai.config.rebind.EnvUtil$EnvironmentConfigCache
    at org.jboss.errai.common.rebind.CacheUtil.getCache(CacheUtil.java:46)
    at org.jboss.errai.config.rebind.EnvUtil.getEnvironmentConfig(EnvUtil.java:375)
    at org.jboss.errai.config.rebind.EnvUtil.isUserPortableType(EnvUtil.java:388)
    at org.jboss.errai.config.rebind.EnvUtil.isPortableType(EnvUtil.java:380)
    at org.jboss.errai.cdi.server.CDIExtensionPoints.processObserverMethod(CDIExtensionPoints.java:259)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
    at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:129)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
    at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
    at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
    at org.jboss.weld.util.Observers.notify(Observers.java:166)
    at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)
    at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)
    at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
    at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)
    at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:49)
    at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
    at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessObserverMethod(ContainerLifecycleEvents.java:311)
    at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessObserverMethod(ContainerLifecycleEvents.java:298)
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.deployObserverMethods(AbstractBeanDeployer.java:174)
    at org.jboss.weld.bootstrap.BeanDeployer.deploy(BeanDeployer.java:334)
    at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:264)
    at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:447)
    at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:86)
    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:97)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
    at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: could not find class defined in ErraiApp.properties for mapping: org.jboss.errai.databinding.client.MapBindableProxy->java.util.Map
    at org.jboss.errai.config.rebind.EnvUtil.addMappingAliases(EnvUtil.java:240)
    at org.jboss.errai.config.rebind.EnvUtil.processErraiAppPropertiesBundle(EnvUtil.java:217)
    at org.jboss.errai.config.rebind.EnvUtil.processErraiAppPropertiesFiles(EnvUtil.java:184)
    at org.jboss.errai.config.rebind.EnvUtil.newEnvironmentConfig(EnvUtil.java:142)
    at org.jboss.errai.config.rebind.EnvUtil.access$000(EnvUtil.java:52)
    at org.jboss.errai.config.rebind.EnvUtil$EnvironmentConfigCache.clear(EnvUtil.java:63)
    at org.jboss.errai.config.rebind.EnvUtil$EnvironmentConfigCache.<init>(EnvUtil.java:58)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.jboss.errai.common.rebind.CacheUtil.getCache(CacheUtil.java:42)
    ... 41 more
Caused by: java.lang.ClassNotFoundException: org.jboss.errai.databinding.client.MapBindableProxy from [Module \"deployment.jbpm-console.war\" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.jboss.errai.config.rebind.EnvUtil.addMappingAliases(EnvUtil.java:232)
    ... 53 more
"}}

Pere Fernandez

unread,
Dec 6, 2018, 4:40:55 PM12/6/18
to José Cavieres, jBPM Usage
Jose Please try this and let me know if it helps.

El dv., 31 d’ag. 2018, 19:15, beppegg <bep...@gmail.com> va escriure:

José Cavieres

unread,
Dec 6, 2018, 4:55:02 PM12/6/18
to Pere Fernandez, jbpm-...@googlegroups.com
Hello Pere,

The exception I sent in my previous message was received AFTER adding in ErraiApp.properties the line
errai.marshalling.mappingAliases=org.jboss.errai.databinding.client.MapBindableProxy->java.util.Map

Regards
Jose Cavieres

José Cavieres

unread,
Dec 12, 2018, 1:15:51 PM12/12/18
to Pere Fernandez, jbpm-...@googlegroups.com
For anyone in the same situation:

For this to work, errai-data-binding-VERSION.jar has to be added to the WEB-INF/lib of the workbench. 

Regards

José Cavieres

unread,
Dec 12, 2018, 2:12:35 PM12/12/18
to jBPM Usage
Hello again, one more question:
There isn't a "dataProvider" field in MultipleSelector elements. How can I set dynamic data in this case?

Thanks 
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+unsubscribe@googlegroups.com.

Emerson Oliveira

unread,
Jan 30, 2019, 10:58:41 AM1/30/19
to jBPM Usage
Good afternoon sirs.

I'm almost able to do what Pere taught.

I did all the procedures but the time that I enter in the Form in the Jbpm appears the error:


 
{"ToSubject":"org.kie.workbench.common.forms.dynamic.service.shared.BackendSelectorDataProviderService:RPC.getDataFromProvider:org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext:java.lang.String::80:RespondTo:RPC"} |
Uncaught exception: Client-side exception occurred although RPC call succeeded. Caused by: (TypeError) : Cannot read property 'mMb' of null |
{"ToSubject":"org.kie.workbench.common.forms.dynamic.service.shared.BackendSelectorDataProviderService:RPC.getDataFromProvider:org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext:java.lang.String::81:RespondTo:RPC"} |
Uncaught exception: Client-side exception occurred although RPC call succeeded. Caused by: (TypeError) : Cannot read property 'mMb' of null




The Java code I am using for example is:

package org.jbpm;

import java.util.HashMap;
import java.util.Map;

import javax.enterprise.context.Dependent;

import org.kie.workbench.common.forms.dynamic.model.config.SelectorData;
import org.kie.workbench.common.forms.dynamic.model.config.SelectorDataProvider;
import org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext;

@Dependent
public class MySelectorDataProvider implements SelectorDataProvider {
Map<String, String> values = new HashMap<String, String>();
//SelectorData<String> selectorData = new SelectorData<String>();


public String getProviderName() {
return "values";
//return "selectorData";
}

public SelectorData getSelectorData(FormRenderingContext context) {
/*FieldDefinition definition = context.getRootForm().getFieldById("id");.
for (FieldDefinition fieldDefinition : context.getRootForm().getFields()) {
System.out.println(fieldDefinition.getName());
}

System.out.println(context.getNamespace());
context.getAvailableForms().put("", "?");
definition.getLabel();
// TODO Auto-generated method stub
*/
SelectorData<String> selectorData = new SelectorData<String>();
//Map<String, String> values = new HashMap<String, String>();
values.put("1", "valor-1");
values.put("2", "valor-2");
values.put("3", "valor-3");
selectorData.setValues(values);

return selectorData;
}


}
 

Does anyone have any suggestions for the ListBox to work?

Thank you.
 

Pere Fernandez

unread,
Jan 30, 2019, 1:15:20 PM1/30/19
to Emerson Oliveira, jBPM Usage
Hi Emerson,

this looks like a client error. I'd need to take a look. What version are you using?

Regards,

Pere

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

Emerson Oliveira

unread,
Jan 30, 2019, 1:43:07 PM1/30/19
to jBPM Usage
Hello Pere, good afternoon.
Thank you for your attention.

I am using version 7.15 of jbpm.

I think I made sure the procedures you passed above.
I can run in Jbpm but at the time I enter this error appears.
But still the Task screen appears, however the ListBox that I modified does not appear any option.

I did a test without modifying the ListBox and even without data in the list the "--Select a Value--" option appears.

I have attached the print.

Thank you very much

Emerson

Test ListBox.pptx

Emerson Oliveira

unread,
Feb 4, 2019, 10:26:06 AM2/4/19
to jBPM Usage

Good afternoon, Pere.

I'm still trying to make it work.
I think I'm on the right track.
This error is appearing in the log.
I think JBPM can not read Jar.

Where am I going wrong?

 
2019-02-04 11:49:17,112 WARN  [org.jboss.modules.define] (default task-10) Failed to define class org.jbpm.MySelectorDataProvider in Module "deployment.kie-server.war" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/jbpm/MySelectorDataProvider (Module "deployment.kie-server.war" from Service Module Loader): org/kie/workbench/common/forms/dynamic/model/config/SelectorDataProvider

Emerson Oliveira

unread,
Feb 5, 2019, 8:50:30 AM2/5/19
to jBPM Usage

Pere,

I think I'm almost done.
the error that is appearing in the log is similar to that of Cavieres.

I created the file "ErraiApp.properties", put in "errai.marshalling.mappingAliases = org.jboss.errai.databinding.client.MapBindableProxy-> java.util.Map".
I downloaded the file "errai-data-binding-4.4.1.Final.jar" and put it inside WEB-INF / lib in kie-server.war.
Inside the form clone I changed the "dataProvider": "remote: com.hbpm.hitss.listbox.impl.MySelectorDataProvider".

Now I do not know what else to do. I think I've tried everything.

Can someone help me?

Thank you all.



2019-02-05 11:24:09,867 ERROR [io.undertow.request] (default task-21) UT005023: Exception handling request to /jbpm-console/out.93457-5088.erraiBus: org.jboss.errai.marshalling.client.api.exceptions.MarshallingException: Failed to demarshall an instance of org.kie.workbench.common.forms.dynamic.service.shared.impl.MapModelRenderingContext
at org.jboss.errai.marshalling.server.marshallers.DefaultDefinitionMarshaller.demarshall(DefaultDefinitionMarshaller.java:180)
at org.jboss.errai.marshalling.client.marshallers.AbstractCollectionMarshaller.marshallToCollection(AbstractCollectionMarshaller.java:89)
at org.jboss.errai.marshalling.client.marshallers.ListMarshaller.doDemarshall(ListMarshaller.java:47)
at org.jboss.errai.marshalling.client.marshallers.ListMarshaller.doDemarshall(ListMarshaller.java:34)
at org.jboss.errai.marshalling.client.marshallers.AbstractCollectionMarshaller.doDemarshall(AbstractCollectionMarshaller.java:48)
at org.jboss.errai.marshalling.client.marshallers.AbstractCollectionMarshaller.doDemarshall(AbstractCollectionMarshaller.java:33)
at org.jboss.errai.marshalling.client.marshallers.AbstractBackReferencingMarshaller.demarshall(AbstractBackReferencingMarshaller.java:76)
at org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.doDemarshall(ErraiProtocolEnvelopeMarshaller.java:68)
at org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.demarshall(ErraiProtocolEnvelopeMarshaller.java:39)
at org.jboss.errai.bus.server.io.MessageFactory.getParts(MessageFactory.java:152)
at org.jboss.errai.bus.server.io.MessageFactory.createCommandMessage(MessageFactory.java:101)
at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:706)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:173)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:110)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:70)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: marshalled type is unknown to the marshalling framework: org.jboss.errai.databinding.client.MapBindableProxy
at org.jboss.errai.marshalling.client.marshallers.ObjectMarshaller.demarshall(ObjectMarshaller.java:85)
at org.jboss.errai.marshalling.client.marshallers.ObjectMarshaller.doNotNullDemarshall(ObjectMarshaller.java:112)
at org.jboss.errai.marshalling.client.marshallers.AbstractNullableMarshaller.demarshall(AbstractNullableMarshaller.java:35)
at org.jboss.errai.marshalling.server.marshallers.DefaultDefinitionMarshaller.demarshall(DefaultDefinitionMarshaller.java:153)
... 71 more

Emerson Oliveira

unread,
Feb 5, 2019, 1:27:37 PM2/5/19
to jBPM Usage
Good afternoon sirs.

I got it. Finally.

I was putting the .jar created and the "errai-data-binding-4.4.1.Final.jar" inside the WEB-INF / lib in kie-server.war.
Now I changed to WEB-INF / lib in jbpm-console.war and ran.
From now on I can think of my final goal being to bind two ListBox's within the form.

Thank you all for your help.

Emerson Oliveira

unread,
Feb 14, 2019, 9:17:36 AM2/14/19
to jBPM Usage
Good afternoon sirs.

I wanted more help.

I managed to make Pere and Cavieres' tips work perfectly.

I would like one more tip.
I'm trying to put another ListBox that is bound to the first one.
Depending on the selection of the first ListBox, a different list appears in the second ListBox.
I've done two different classes and I'm almost done.
The problem is that when I choose the first option, it is not updating the second list.

Someone help me ?

Thank you.

Emerson

Emerson Oliveira

unread,
Mar 1, 2019, 8:37:04 AM3/1/19
to jBPM Usage
Hello Sirs,

I'll summarize all the work in this post:

After running the entire explanation of Pere in the previous posts, which worked perfectly, I needed to create a second ListBox with dependence on the first one.

I added another parameter in the JSON extracted by the form clone:

"relatedField": "{$ binding of the field that depends}",

So with that, the part of the second ListBox that depends on the first looks like this:


      "relatedField": "{$ binding of the field that depends}"
      "options": [],
      "dataProvider": "remote: org.jbpm.demo.MySelectorDataProvider",
      "id": {anyID},
      "name": {anyName},
      "label": {anyLabel},
      "required": false,
      "readOnly": false,
      "validateOnChange": true,
      "binding": {anyBinding},
      "standaloneClassName": "java.lang.String",
      "code": "ListBox",
      "serializedFieldClassName": "org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.selectors.listBox.definition.StringListBoxFieldDefinition"

After that, I created the Java code in Eclipse, and they looked like this:


-------------------------------------------------- -------------------------------------------------- ---------


Code for the first ListBox:

@Dependent
public class MySelectorDataProvider implements SelectorDataProvider {

public String value;

public String getProviderName () {
return "values";
}

public SelectorData getSelectorData (FormRenderingContext context) {

System.out.println ("entered getSelectorData");

SelectorData <String> selectorData = new SelectorData <String> ();

Map <String, String> values ​​= new HashMap <String, String> ();

values.put ("test1", "test1");
values.put ("test2", "test2");
values.put ("test3", "test3");
values.put ("test4", "test4");
values.put ("test5", "test5");
selectorData.setValues ​​(values);


String test = context.getModel (). ToString ();
        
        String [] combos = test.replace ("{", "") .replace ("}", ""). Split (",");
        
        String ComboName = "outlistbox1";
        
        // scroll through all combos
        for (int i = 0; i <combos.length; i ++) {
               // check if it's the combo that wants to get the value
               if (combos [i] .contains (combo_name)) {
                      String [] value = combos [i] .split ("=");
                      this.value = value [1];
                      System.out.println ("ListBox1 value in the first combo:" + value [1]);
                      break;
                  
               }
              
        }

return selectorData;

}

}

-------------------------------------------------- -------------------------------------------------- ---------

Code for the second ListBox:


@Dependent
public class MySelectorDataProvider2 implements SelectorDataProvider {

MySelectorDataProvider myselectordataprovider = new MySelectorDataProvider ();

public String getProviderName () {
return "values2";

}

public SelectorData getSelectorData (FormRenderingContext context) {

myselectordataprovider.getProviderName ();

SelectorData <String> selectorData = new SelectorData <String> ();
Map <String, String> values2 = new HashMap <String, String> ();

String test = context.getModel (). ToString ();
String [] combos = test.replace ("{", "") .replace ("}", "") .split (",");
String ComboName = "outlistbox1";

// scroll through all combos
for (int i = 0; i <combos.length; i ++) {
// check if there is the combo that wants to get the value
if (combos [i] .contains (combo_name)) {
String [] value = combos [i] .split ("=");


if (value [1] .equals ("test1")) {

values2 = new HashMap <String, String> ();

values2.put ("aaa", "aaa");
values2.put ("bbb", "bbb");
values2.put ("ccc", "ccc");
selectorData.setValues ​​(values2);
break;

} else if (value [1] .equals ("test2")) {

values2 = new HashMap <String, String> ();

values2.put ("ddd", "ddd");
values2.put ("eee", "eee");
values2.put ("fff", "fff");
selectorData.setValues ​​(values2);
break;

} else if (value [1] .equals ("test3")) {

values2 = new HashMap <String, String> ();

values2.put ("ggg", "ggg");
values2.put ("hhh", "hhh");
values2.put ("iii", "iii");
selectorData.setValues ​​(values2);
break;

} else if (value [1] .equals ("test4")) {

values2 = new HashMap <String, String> ();

values2.put ("jjj", "jjj");
values2.put ("kkk", "kkk");
values2.put ("lll", "lll");
selectorData.setValues ​​(values2);
break;

} else if (value [1] .equals ("test5")) {

values2 = new HashMap <String, String> ();

values2.put ("mmm", "mmm");
values2.put ("nnn", "nnn");
values2.put ("ooo", "o");
selectorData.setValues ​​(values2);
break;

}
}

}

return selectorData;

}

}




Just remembering that I'm not an expert in JAVA, so this code can and should be improved, but the important thing is that it worked.

I want to thank Mr. Pere Fernandez here, who helped me a lot and without him he could not have done it.
And of course, I'm open to tips and corrections for something wrong that I might have done.

Thank you all and I am available for any questions to the best of my knowledge.




Emerson

sudha...@gmail.com

unread,
Mar 1, 2019, 9:01:40 AM3/1/19
to jBPM Usage
Emerson,

Great!!! I'm new to jBPM and need your guidance to load list box with dynamic data. When the form is opened, i need to load drop down with a list of options.

Please help me in achieving this.

Thanks in advance.

Sudha

Emerson Oliveira

unread,
Mar 1, 2019, 9:24:18 AM3/1/19
to jBPM Usage
Sudha, good morning.

start following Pere's directions at the beginning of this conversation.
He explains perfectly.
Try it, and as soon as the difficulties appear, let me know.
There will be several steps until you reach the final result.

I am available.

sudha...@gmail.com

unread,
Mar 1, 2019, 1:28:51 PM3/1/19
to jBPM Usage
Emerson,

Please let me know how to clone the form. (I added another parameter in the JSON extracted by the form clone). I dont understand this step, as i'm new to jBPM.

Thank you for your support.

Have a great day.

Thanks,
Sudha

Emerson Oliveira

unread,
Mar 1, 2019, 1:46:32 PM3/1/19
to jBPM Usage
go to the path: /bin/.niogit/MySpace/

there you clone using: git clone ssh: // {user jbpm} @localhost: 8001 / system / system

with this will appear a new file outside git.

enter it

modify the JSON that is in the path: {name Project jbpm}/ src / main / resources / com / myspace / testlistboxdinamic / test-taskform.frm.

inside the test-taskform.frm you will find the JSON as previously mentioned. , and there you make the changes ..

then follow the steps:
1 - git add datagrid-preferences / DataSetTaskListGrid_base
2 - git commit -m "test"
3 - git push -u origin {user jbpm} -uf-user

obs: all this with JBPM started.
Message has been deleted

sudha...@gmail.com

unread,
Mar 3, 2019, 2:46:15 PM3/3/19
to jBPM Usage

Emerson,

We almost got it.

The listbox is showing '--Select a Value--' and no other options are shown (screenshot attached). We have put the custom jar in jbpm-console.war as you have given.

What am i missing? Please let me know.

Thanks
Sudha
Image 2.png

sudha...@gmail.com

unread,
Mar 4, 2019, 7:51:07 AM3/4/19
to jBPM Usage
Emerson,

We are getting the below exception, when we open the form. What am i missing?

{"ToSubject":"org.kie.workbench.common.forms.dynamic.service.shared.BackendSelectorDataProviderService:RPC.getDataFromProvider:org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext:java.lang.String::40:RespondTo:RPC"} | Uncaught exception: Client-side exception occurred although RPC call succeeded. Caused by: (TypeError) : b is null

Please help.

Thanks

carlos conde santos

unread,
Mar 6, 2019, 5:53:09 AM3/6/19
to jBPM Usage
Hi Emerson 

I need you!!!

I can't find the folder WEB-INF / lib.
I can't find the jbpm-console.war folder
I found business-central.war in the following path: C:\JBPM_7.17\standalone\tmp\business-central.war
but inside it there isn't the WEB-INF folder
Could you help me???
I'm using the 7.17 version

Thank you 

carlos conde santos

unread,
Mar 6, 2019, 6:55:21 AM3/6/19
to jBPM Usage
Emerson 

Finally, I found the business-central.war in this path: C: \ JBPM_7.17 \ standalone \ deployments \ business-central.war.
(to add the jars I have used 7zip).
Am I following the steps well?

Thank you

Emerson Oliveira

unread,
Mar 6, 2019, 7:42:28 AM3/6/19
to jBPM Usage
Good Morning,

Sorry, it was a holiday here in Brazil and I was disconnected all those days.

Sudha ..

did you make the java code and put it inside the .war file?
in JSON in the dataProvider part, did you call the class that is inside the java?


use the code I gave as an example.

Emerson Oliveira

unread,
Mar 6, 2019, 7:45:36 AM3/6/19
to jBPM Usage
Good morning, Carlos.

that's right .. in the newer versions the name is this: business-central.war

jbpm-console.war is in older versions.

I also use 7zip to open ..

Anything goes asking ...

carlos conde santos

unread,
Mar 6, 2019, 12:13:46 PM3/6/19
to jBPM Usage
Hi Emerson

Don't work :(
before continuing, thank you in advance

my github repository is: https://github.com/carlos-conde/test
could you take a look?

this is the error that gives me:

 ERROR [io.undertow.request] (default task-17) UT005023: Exception handling 
 request to /business-central/out.92288-2046.erraiBus: 
_________________________________________________________________________________________________________________________________        

My code:


package org.jbpm;

import java.util.HashMap;
import java.util.Map;

import javax.enterprise.context.Dependent;

import org.kie.workbench.common.forms.dynamic.model.config.SelectorData;
import org.kie.workbench.common.forms.dynamic.model.config.SelectorDataProvider;
import org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext;

@Dependent
public class MySelectorDataProvider implements SelectorDataProvider {

public String getProviderName() {
return "values";
}

public SelectorData getSelectorData(FormRenderingContext context) {
SelectorData<String> selectorData = new SelectorData<String>();
Map<String, String> values = new HashMap<String, String>();
values.put("1", "valor-1");
values.put("2", "valor-2");
values.put("3", "valor-3");
selectorData.setValues(values);

return selectorData;
}
}
________________________________________________________

Finally, My Maven Project:

mavenProject.JPG

sudha...@gmail.com

unread,
Mar 6, 2019, 1:34:13 PM3/6/19
to jBPM Usage
Emerson,

Hope you had good time during holidays. :)

Yes. I have put my custom jar in jbpm-console.war and have updated the data provider in form JSON.

However, im getting the below exception when i open the form.

{"ToSubject":"org.kie.workbench.common.forms.dynamic.service.shared.BackendSelectorDataProviderService:RPC.getDataFromProvider:org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext:java.lang.String::40:RespondTo:RPC"} | Uncaught exception: Client-side exception occurred although RPC call succeeded. Caused by: (TypeError) : b is null

What am i missing? Is the problem with my jar? Can you give your email id, so that i can send you the sample jar for review.

Please help.

Thanks
Sudha

carlos conde santos

unread,
Mar 7, 2019, 2:38:59 AM3/7/19
to jBPM Usage
hi Sudha

my email is: carlos.co...@gmail.com. I'm trying to do the same as you, we can share info between us.

If you want, we can try it together. Pass your jar to see it. my link to the github repository where is my project, is: https://github.com/carlos-conde/test.


My mistake is different from yours, but still we do not use the same code (the code I used is in the previous post).
 
I need it to work

Thank you very much to all

carlos conde santos

unread,
Mar 7, 2019, 6:02:23 AM3/7/19
to jBPM Usage
Hi Emerson

First of all I would like to thank you for your time.
I followed all the steps correctly (I did it twice from scratch to check it), but it still gives me the same error message that you received.
I do not know what I'm doing wrong.
Emerson, I need your help, please.
my email: carlos.co...@gmail.com, I would like very much to be able to count on you for the learning of jBPM, please write me by email so that you can solve this problem. And in future problems we can help each other.
Thank you very much again.

carlos conde santos

unread,
Mar 7, 2019, 7:23:19 AM3/7/19
to jBPM Usage
Hi all

Once I have modified the JSON of the form, I enter into central busines, I open the modified project, and upon entering the form I receive an error message that is the same as yours. However I have tried to deploy it, it does it correctly, I start the process, all right ... but when I enter the task that has the ListBox, it does not work correctly (it does not show me the options, and it throws me the same error in the console windows (system symbol) than Emerson's.

I don't know what to do......     HELP PLEASE


Thank you for all!!!!

sudha...@gmail.com

unread,
Mar 7, 2019, 11:50:43 AM3/7/19
to jBPM Usage
Emerson,

How should the Data Provider be like?

 "dataProvider": "remote: com.hbpm.hitss.listbox.impl.MySelectorDataProvider". (given below)

(or)

"dataProvider": "org.jbpm.demo.MySelectorDataProvider".

Please let us know.

Thanks

carlos conde santos

unread,
Mar 7, 2019, 12:06:31 PM3/7/19
to jBPM Usage
Hi sudha

is your package + your ClassName

On my project is org.jbpm.MySelectorDataProvider

sudha.JPG

Emerson Oliveira

unread,
Mar 11, 2019, 1:23:34 PM3/11/19
to jBPM Usage
that's how it's supposed to be :
 
"dataProvider": "remote: com.hbpm.hitss.listbox.impl.MySelectorDataProvider".

using the remote 

sudha...@gmail.com

unread,
Mar 13, 2019, 7:23:28 AM3/13/19
to jBPM Usage
Emerson,

Im stilll getting the below error, when i open the form that has the dynamic list box. What am i missing?

{"ToSubject":"org.kie.workbench.common.forms.dynamic.service.shared.BackendSelectorDataProviderService:RPC.getDataFromProvider:org.kie.workbench.common.forms.dynamic.service.shared.FormRenderingContext:java.lang.String::152:RespondTo:RPC"} | Uncaught exception: Client-side exception occurred although RPC call succeeded. Caused by: (TypeError) : Cannot read property 'c' of null

Regards
Sudha

Emerson Oliveira

unread,
Mar 13, 2019, 7:48:35 AM3/13/19
to jBPM Usage
It seems to me that the ListBox is not finding the class.
re-check the JSON that you changed.
Make sure the clone you made has changed and comited correctly.
put some System.out.println to know if you are reading the code.
Reply all
Reply to author
Forward
0 new messages