Error when I Map my InputDocument to DocumentToJson

Hi
I am trying to consume a Post API using pub:client http. I get and error

" com.wm.app.b2b.server.ServiceException: [ISS.0086.9249] Missing Parameter: document at pub.json.documentToJSONString(json.java:312) at sun.reflect.GeneratedMethodAccessor671.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:744) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:345) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:615) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:425) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383) at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253) at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:236) at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:267) at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:668) at com.wm.lang.flow.FlowState.step(FlowState.java:534) at com.wm.lang.flow.FlowState.invoke(FlowState.java:501) at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1150) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:744) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:345) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:615) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:425) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:278) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:95) at com.wm.app.b2b.server.InvokeHandler.process(InvokeHandler.java:107) at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:223) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:425) at com.wm.util.pool.PooledThread.run(PooledThread.java:134) at java.lang.Thread.run(Thread.java:748)"

I have mapped my input which is a document Reference to documentToJsonstring so i can pass it to pub:client http but it does not seem to pick up the mapping

Hi,

where does your “inputs” document come from?
It looks like a document reference to me, but the base referenced DocType is missing.
Therefore, the pipeline is eventually trying to map the wrong document instance here.

Please check that and share more details regarding this.

Regards,
Holger

Hi @Holger_von_Thomsen Holger

The referenced Doctype is the. I get this error only when run flow service in browser.

I am not sure why!

Regards
Keletso

Check if the document exist in the pipeline. The most likely scenario is it either has a different name (upper or lower case for instance) or it doesn’t exist at all. You can also initialize the document in the previous map.

Hi @engin_arlak

I checked and all seems ok. What i dont understand is that i only get this error when i run flow service as in browser

It probably doesn’t have anything to do with where you run it. Only difference would be passing something through body when you run it from browser. That’s probably why

said this as well. You can save the pipeline before you make the call and run it on browser, and then run it on debug mode by setting it to restore pipeline to verify if you are actually recieving the document correctly. Otherwise please share the rest of the flow service, so that we can assist you properly.

1 Like

Hi,
What is the input of your flow service? Are you trying to pass any data to your flow service while accessing it from browser or everything is hardcoded in your flow.

Pls share complete flow service with Input & Output.

Thanks,
Yogesh

1 Like

Hi,

Please fin the service attached
DSD_flowservice.zip (4.5 KB)

Hi,
This package is no use for us as it’s dependancy is missing. From your service, it looks like you are not passing any input to service when it is getting invoked from browser.

When you invoke it from browser there is no input is passed so your service “inputs” document will be null and “pub.json:documentToJSONString” flow will not have anything to convert.

Also what is the requirement to invoke it from browser? if you want to expose this service then you have to expose it as REST/WS and invoke it from any API testing tool like postman and SOAP UI.

Thanks,
Yogesh

3 Likes