OL Learn

Self-Replicating process updates a text file

Is there any guide how to write info to custom log or reconciliation file for Self-Replicating process?
For say, I develope an application of generating multiple page PDF for emailing, printing and archiving purpose. There is a process to split data file from a multiple record in an input data file to many single record input data files. Follow by a Self-Replicating process to read the single record input data file in a watch folder to produce output accordingly.
The self-Replicating process intermediary hit error of accessing file when writing activity log and updating reconciliation file.
The activity log is by date, example, D:\Application_A\Log\Log_{ProcessDate}.txt
The reconciliation file is by batch job, example, D:\Application_A\Output\Print\{ProcessDate}\{Orig_Input_Filename}_Reconciliation.csv

You process shouldn’t write directly to the file. Instead, it should send the info to another process which is not self-replicating and which does the actual writing to the log files. Here’s a visual representation:


May I know what will be the recommended method of sending info to another process which is not self-replicating?
Currently, what i think is to create a text file with unique name (%u) then send to the watch folder of the None self-replicating process.
Thank you.

Yep. That’s probably what I would do too.

1 Like