Question
· Feb 10, 2021

Return Clone of message

Hi everyone, I am trying to return a cloned version of my ADT that I have made changes to in a Business Process.  So far I have the following in my process.  

&sql(Select MemberId INTO :pMemberIDval from CDSM_MemberAPI.MemberInfo where MemDOB = :ptDOB and MemLname = :ptLname and MemFname = :ptFname)

set newrequest = pRequest.%ConstructClone()

set MemberIDPID4 = newrequest.SetValueAt(pMemberIDval, "PID:4.1")

The following does return the value I am populating the clone with to the log

  set newrequestPID4 = newrequest.GetValueAt("PID:4.1")
  $$$LOGINFO("newrequestPID4DB " _newrequestPID4)

So then I try to set the old request with the new but, I get nothing sent back out the trace.  Any Ideas where I am going wrong

set pRequest = newrequest

return newrequest

Product version: IRIS 2020.2
Discussion (3)0
Log in or sign up to continue

If it's an ObjectScript process, you would use ..SendRequestSync() or ..SendRequestAsync(), with newrequest as the request argument and the name of the downstream process or operation as the target argument. Whether you would send it asynchronously or synchronously would depend on your needs. For healthcare integration, synchronous is generally required as it maintains FIFO.

You can't modify an inbound message from a service as it will have the immutable property set; that's why you have to clone it to make changes.