Forum Discussion

Sahil's avatar
Sahil
Contributor
5 years ago

Need to cover few scenarios in pipeline

Hi,
I have a multiple scenario to cover in a pipeline.
1)read an xml, validate the xml , send mail mentioning xml file name that it is not valid.
2)create lookup out of csv file which will have number, name, s1.
3)if xml is valid, check if <V_number> exists in lkp(number).
if yes, then transform the xml and name the output file with <V_number>_lkp(name)_timestamp.
4)if <V_number> does not exists in lkp(number) stop the execution and send mail mentioning xml file name.

I am able to transform the xml. My current pipeline looks like below:-

10 Replies

    • Supratim's avatar
      Supratim
      Contributor III

      @Sahil You can try with below option-

      1)read an xml, binary router(both expression with true), use binary to document snap with NONE option, use mapper (map - file name from content)
      ** ,Inner Join use 1 in both path (it will give you filename with all xml parse json element )
      2)Read CSV file and create lookup element.
      3)Do inner join with both flow using common name (also open error view of join snap and select Unmatched data to error view)
      if yes, use mapper success to map required data then transform the xml and name the output file with <V_number>_lkp(name)_timestamp.
      4)if <V_number> does not exists in lkp(number) stop the execution and send mail mentioning xml file name.

      • Sahil's avatar
        Sahil
        Contributor

        Hi @Supratim ,
        I am fairly new to snaplogic. please excuse me for silly questions.
        scenario (1) is not fulfilled, where we need to validate the xml and send mail if xml is invalid.
        and I am stuck at 3 positions:-
        a) map - file name from content
        b)mapper all required element
        c)Not match email sender
        content-location object has value: “sldb:///Dev/Interfaces/input_1.xml”