1 Reply Latest reply on Apr 13, 2021 1:45 PM by VISHAL CHOUDHARY

    IICS - File Listener and JSON Hierarchy Parser

    Andrea Magrinelli New Member

      Hi all,

      like in the title, we are looking for a way to use the file listener in combination with a Mapping where a Hierarchy Parser is placed.

       

      There is any chance to make it works?

      as far as I know, the hierarchy parser is expecting a TXT file in which raw data (JSON or XML files) are placed.

       

      But the File listener is giving us only one entry and not a file with the entry inside.

      There is any chance to make it linear? (from File Listener to Hierarchy parser)

       

      Thanks and regards,

      Andrea

        • 1. Re: IICS - File Listener and JSON Hierarchy Parser
          VISHAL CHOUDHARY Seasoned Veteran

          Hi Andrea,

           

          Hierarchy parser needs an absolute path of the Json/Xml file in input. One can pass it either from Source, Taskflow, Database, etc.

           

          Based on my understanding of the use case.  You can try the following:

           

          Create a mapping with the In-out parameter (filepath). Using an expression, map it to the Hierarchy Parser input. Refer to the below screenshot.

           

          Note: FilePathexp has filepath in-out parameter assigned to it via Expression transformation & I'm using a dummy source here.

           

          Trigger the Tasflow using a FileListener. Choose the Data Task in it.

          Add in-out parameter in the input of DataTask & map it with the filepath(path) coming from File Listener. Here is the screenshot for your reference

           

           

          I'm assuming that Filelistener is picking the xml/json file from the desired location.

          Here are a few kb's that you can use for reference :

          Support

          File listeners in taskflows

          File listeners

           

          Hope this helps.

           

           

           

          Regards,

          Vishal