Sidebar

Mesage modifications are ignored by web service

0 votes
336 views
asked Dec 3, 2020 by golden-m-1060 (120 points)
I have a simple setup where I'm receiving a flat file, then running that through a mapping function to remove some trwoublesome characters that cause a problem when sent to a web service in JSON.  Testing the flow shows the message being modified correctly, but when I send it out to the web service the web service received the unmodified version of the message.  In the web service I've tried sending:

{"order": "/*{m:/}*/"}

And I've tried:

{ "order": "[/*{s:MSH}*/", "[/*{s:PID}*/", "[/*{s:ORC}*/","[/*{s:OBR}*/",]}

But wither way I do it I get the original message, not the modified message.  Is there a way to reference the modified message in the JSON definition?
commented Dec 3, 2020 by brandon-w-8204 (33,270 points)
I emailed you to get on and look at this. Please reach out to support@qvera.com so we can figure out the cause.
commented Dec 3, 2020 by golden-m-1060 (120 points)
I figured out what the problem was.  I had the message with the old data still in the web services queue, since it never succeeded.  I change the service to just ignore the error and return status code 200, and the message cleared and I saw the new message with the corrected information come through.  Is there a way to clear out failed messages out of the web service message queue?

1 Answer

0 votes

{"order": "/*{m:/}*/"} should be working. That is referencing the entire message not just one field.

{ "order": "[/*{s:MSH}*/", "[/*{s:PID}*/", "[/*{s:ORC}*/","[/*{s:OBR}*/",]} would not pull in your changes as it is referencing the source message. 

{s:MSH} would pull the MSH from the source which is a read only copy. 
{m:MSH} would pull the MSH from your message that you modified. 

Try this and see if this works as expected:
{ "order": "[/*{m:MSH}*/", "[/*{m:PID}*/", "[/*{m:ORC}*/","[/*{m:OBR}*/",]}

 

One other thing to verify is in the visual channel editor that the destination is connected to the mapping node and not skipping. It can appear to be connected but skip it. You can do this by moving the mapping node and make sure the lines and arrows follow your mapping node.

 

answered Dec 3, 2020 by brandon-w-8204 (33,270 points)
...