Warren Oyco · Jul 16

Setting filename and file target folder in Business Process class

Hi! I am working on a project where I use record map to transform a flat file and split it into two output text file and in the future will need to split four output files.

I only want to use one  target business operations instead of multiple. Is there a way to set the output file and the target folder path in my business process class?

Any advice on how I can achieve this or is this possible? Thanks!


Product version: HealthShare 2019.1
$ZV: Cache for Windows (x86-64) 2018.1.2 (Build 309_5_19491U) Tue Dec 10 2019 17:30:27 EST
1 0 5 90
Log in or sign up to continue

Yes of course. Pass them as  a request property and on the operation do 

..Adapter.FilePath = request.FP

..Adapter.FileName = request.FN

Thanks Neerav!  any suggestion on how to pass a request property?

Step 1: Create a custom persistent class to pass

Example :

Class FileRequest Extends %Persistent


Property FilePath As %String(MAXLEN=1000);

Property FileName As %String(MAXLEN=1000);


Step 2: Create a custom business operation and inside that request argument please use the above class.

Step 3: now modify the ..Adapter.FilePath using request.FilePath and ..Adapter.FileName using request.FileName

Step 4: Before sending to business operation create the object for the request class and pass it as the first parameter in SendRequestSync or SendRequestAsync.

Hi Karunanithi, sorry I'm kinda newbie but I wanted to clarify Step 3, is this done on a custom Business Process class OnRequest method? Below is my current SendRequestSync line of code.

Set tSC=..SendRequestSync(tTarget,tRmeNormalization,.tHL7Response) $$$ThrowOnError(tSC)

yes. I think tRmeNormalization would be a request class right? if so, the line is correct.