-
1. Re: How to pass an object into a startProcess using REST API or Java Remote API?
swiderski.maciej Jul 30, 2014 1:33 AM (in response to mysteryblinky)recommended approach is to use Java Remote API in case custom objects are required. In your case you would need to:
- model class in data modeler
- define it as variable in your proces
- build and deploy the project
- create client project in your IDE (preferable maven project)
- define dependency to the project created in kie-workbench in your client project
- create instance of that class in your client project
- use that instances as map element for start process
this is completely supported use case and has been validated on latest 6.1.0.CR2 available
HTH
-
2. Re: How to pass an object into a startProcess using REST API or Java Remote API?
mysteryblinky Jul 30, 2014 11:39 AM (in response to swiderski.maciej)thanks for your response. I believe that I understand (and have done) all the steps except for this one:
> define dependency to the project created in kie-workbench in your client project
How do i do that? Also can you explain why this is needed? I'm passing the object into a startProcess() call in my client code. I suppose I need to do it so that the engine knows what class to use to deserialize my object?
And I have one question about this point:
> use that instances as map element for start process
My question here is what do i use as the "key" in the Map? I put the instance of the class as the value in the Map, but what should i use as the key? I've tried using a) the name of the process variable i created; b) the name of the class itself (not the fully-qualified name, however -- didn't try that).
thanks!