-
1. Re: Passing Java objects via jbpm rest API
pandyajayn Apr 5, 2014 11:22 AM (in response to jojones54)I am also looking for answer for such problem as i am facing this issue and not able to resolve it. please let me know if you get the solution to pass custom object to jBPM from JAVA
-
2. Re: Passing Java objects via jbpm rest API
swiderski.maciej Apr 7, 2014 1:33 AM (in response to jojones54)look at the REST api section in documentation. The custom types should be send as JAXB objects so that must by as part of the POST request. Look at the execute method for REST api and the Java Remote Client API that does that for you.
HTH
-
3. Re: Passing Java objects via jbpm rest API
pandyajayn Apr 7, 2014 9:28 AM (in response to swiderski.maciej)com.entity.personaldetails.Personal personal = new Personal(); personal.setAge(5); personal.setName("cred"); HashMap<String, Object> mapObj = new HashMap<String, Object>(); mapObj.put("extobj", personal); URL url = new URL("http://localhost:8080/business-central/"); CReDBPMProcessAPI process = new CReDBPMProcessAPI(); process.initializeEnvironment(url, "com.cred.external:externaltest:1.0", "sisl", "Destiny#123"); ProcessInstance pi= process.startProcess("jbpmtesting.ExternalTest", mapObj); Hi,
above code i have written, here personal class is added to my class path and also in jBPM dependcies i have added but still when i am executing process.startProcess, it is giving me an exception of class type cast.
I have implemented this program using Remote REST API only
-
4. Re: Passing Java objects via jbpm rest API
marco.rietveld Apr 16, 2014 7:04 AM (in response to pandyajayn)I've added some documentation about the requirements for making user-defined classes accessible via the REST or JMS API's:
I need to update the community docs -- just implementing the Serializable interface for an user-defined class is *not* enough.
-
5. Re: Passing Java objects via jbpm rest API
marco.rietveld Apr 16, 2014 7:06 AM (in response to pandyajayn)Jaykumar,
The reason your getting a problem is because the server probably doesn't know anything about the class: the instance you're sending is of course deserialized on the *server* side.
In order to make sure that the server-side application (business-central or kie-wb) knows something about the class, the class must be part of the deployment.
-
6. Re: Passing Java objects via jbpm rest API
dstockdreher May 12, 2015 9:22 AM (in response to marco.rietveld)Is there an example project or anything similar that might be of value to use here? I've worked through all the docs I have seen and run into a bunch of issues and confusion as to what the minimum is to have the custom data objects returned in a useable format via the ReST API?