TN Flat File Content is null

Hi All,

I am trying to process a flat file in TN. TN able to invoke the processing rule however when I am checking the content tab in transaction analysis its value is null. Altough my flat file size is having few KB.

Step in gateway service:

  1. pub.file.getFile (load as stream)
  2. pub.flatfile.convertToValues
  3. MAP (set the TN_parms )

Everything is alright except the content is showing null.

Please help me. Thanks in advance !!


Your code is fine

Problem may be you are not mapping stream data correctly to “ffdata” in routeFlatFile

Are you mapping stream in the TN_params for the content to go to the TN?


Thanks Sai and RMZ for putting some light on it.

The issue is resolve now. Actually what I was doing is that mapping the output of flow service ‘pub.file.getFile’ (load as stream) to ‘pub.flatfile.convertToValues’. So the output stream sets to null value. May be it’s the Stream class limitation is that once it is used it’s value becomes null.

Now, loading as bytes('pub.file.getFile) then mapping to ‘pub.flatfile.convertToValues’ and creating stream from bytes and passing routeFlatFile Service. It’s working perfectly fine.


Glad you solved this by your self

YES you should be all set now: :smiley: