Question
· Aug 30, 2022

Calling a class method from a code block in a business process

I have a production that takes in an HL7 message thru a business service. The business service passes the incoming HL7 message to a business process that calls a transform to transform the HL7 message to a message class. After the transform is finished, the business process uses a code block to pass the object created by the transform to a method class that processes the data in the object. What would be the correct syntax for passing in the object to the class method?

In the business process, the source for the transform is the request and the target is context.SurgeryData  where context.SurgeryData is of type Surg.SurgeryData.

in the next step of the business process, I have a block of code that calls the class method to file the data. My code is s tSC=##class(Surg.Utilities).filedata(context.SugeryData)

I can see the object context.SurgeryData that is sent to the method is id@Surg.SurgeryData. But I am having problems opening the object to parse the data to be filed. The filer class method is ClassMethod filedata(pInput As Surg.SurgeryData) As %Status.

So my questions are:

1. is the call to the filing utility correct in passing in the context.SurgeryData as the parameter? 

2. How can I open the open in the filing utility? 

Product version: IRIS 2021.2
Discussion (2)1
Log in or sign up to continue