Skip to Content
avatar image
Former Member

Need to trigger an email on successful delivery of message in File to File Scenario in SAP PI 7.31

Hi All,

We are working on PI 7.31 and have file to file interface without any ESR object.

Sender file channel is picking up the file from one source directory on NFS and receiver file channel is placing it on other target directoy on NFS only.

But now we have one more requirement to send an email on successful delivery of file to the target.

We know 2 options for the same.

1. using EOIO and developing one mail interface for the same.

2. Using a script to trigger the mail and define the script in Run Operating System Command After Message Processing.

But since I have never worked on any of these before,I need some help to start on the same.

Kindly help.

Thanks

neha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jan 09, 2013 at 03:32 PM

    IMO, Since the requirement has no ESR and using PI 7.31, Just go with your second option and as michal suggested initiate the file to mail scenario using the file receiver configuration Run oS command after message processing.  BPM will be more complicate on this.

    Otherwise You can do the following way too. Take help from unix team. Write a script and inside call a java program which would send the mail notification.  This requires java program and unix script to call this java program and you have to reference this in the file receiver adapter as os command after message processing. This way you dont need the second flow using pi.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2013 at 11:53 AM

    Hi,

    >>>>2. Using a script to trigger the mail and define the script in Run Operating System Command After Message Processing.


    check the OS of the PI server and check on google how to create a batch script which will create an empty file in another folder (which you can use for the e-mail confirmation flow)

    and you're done,

    Regards,

    Michal Krawczyk

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2013 at 02:42 PM

    Hi Neha,

    did you ever think about using a BPM scenario?

    There u can design your processes and send notification e-mails whenever u want.

    Regards,

    Thomas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 11, 2013 at 10:22 AM

    Hi All,

    Thanks for the replies but we realized that second option of using OS Command is not working for us.

    So, now we are working with First option.

    Now, I am getting the below error in File to Mail Scenario.

    Failed to call the endpoint  [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: expecting start tag: {http://sap.com/xi/XI/Mail/30}Mail, but found {http://sap.com/xi/XI/Mail/30}MAiLReceive at state

    I have put http://sap.com/xi/XI/Mail/30 in both sender and receiver Message types in XML Namespace option.

    Rest all ID and ESR is same.

    Also,I am sending data as below:

    <?xml version="1.0" encoding="UTF-8"?>

    <ns0:FileSend xmlns:ns0="http://sap.com/xi/XI/Mail/30">

       <FROM>abc</FROM>

       <TO>neha</TO>

       <CC/>

       <SUBJECT>Hi</SUBJECT>

       <CONTENT>First Mail</CONTENT>

    </ns0:FileSend>


    Please provide help in this regard for th same.

    Thanks

    Neha


    Add comment
    10|10000 characters needed characters exceeded