File Aging Alerts Part2
Part 2 of the blog explains how to use this custom module in PI .
Deploy the EAR file in your SAP PI server using NWDS .Now develop one File to Mail interface as below.
ESR Part:
Create below components in ESR
I have taken Input structure as below.It is up to you ,but make sure your module o/p structure matches to your input xml structure .
Mapping:
ID Part:
Create the below components in ID.
In Sender communication channel/Module tab–>Give the JNDI name of the Project that you created in NWDS and add the input parameters as below.
Here I have taken a simple example to explain the usage .Here PI is polling 2 file servers to check the age of the files.
Input parameters that need to pass for AgingAlerts:
InpTag:Input tag of the input xml structure
EndTag:End tag of the input xml structure
Count –>Number of file servers PI is polling (In this example i have taken 2 servers)
Server_0 –>Hostname/IP for 1st server
UserName_0/pwd_Password_0 –>Username,Password of the first server
dateFormat_0 –>OS level date format in 1st server.
osType_0 –>OS type of the first server .(UNIX,NT,AS400,VMS,OS2,L8,NETWARE,MACOS_PETER,MVS,OS400)
UNIX –>For connecting to Unix based ftp server. (Use this for Windows-NT servers which has been configured to use a unix-style listing format )
NT –>For connecting to WindowsNT based ftp server
AS400 –>For connecting to AS/400 based ftp server
VMS–>For connecting to VMS based ftp server
OS2–>For connecting to OS/2 based ftp server
L8–>Some servers return an “UNKNOWN Type: L8” message in response to the SYST command. We set this to be a Unix-type system
NETWARE–>For connecting to Netware based ftp server
MACOS_PETER –>For connecting to Mac pre OS-X based ftp server
MVS –>For connecting to MVS based ftp server
OS400 –>For connecting to OS/400 based ftp server
SubCount_0 –>No of folders in which we are doing search for fileage in server1 (Here i’m searching in one folder )
DirPath_00 –>Directory path of the first server (increase the last 2 digits for more no.of folders within the same server)
FileName_00 –>File Name schema of the files that need search in 1st server (same as above)
FileAge_00 –>Age Limit of the above matching files in 1st server (same as above) ((Here i have given 10 minutes))
Server_1 –>Hostname/IP for 2nd server
UserName_1/pwd_Password_1 –>Username,Password of the 2nd server
dateFormat_1 –>OS level date format in 2nd server.
osType_1 –>OS type of the 2nd server .(UNIX,NT,AS400,VMS,OS2,L8,NETWARE,MACOS_PETER,MVS,OS400)
SubCount_1 –>No of folders in which we are doing search for fileage in server2 (Here i’m searching in two folders )
DirPath_10 –>Directory path of the second server that need search
DirPath_11 –>Directory path of the second server that need search
FileName_10 –>File Name schema of the files that need search in 2nd server
FileName_11 –>File Name schema of the files that need search in 2nd server
FileAge_10 –>Age Limit of the above matching files in 2nd server (Here i have given 5 minutes)
FileAge_11 –>Age Limit of the above matching files in 2nd server (Here i have given 5 minutes)
Above configuration values need to give very carefully .Don’t jump in to the conclusion that it is not working .If you give all configuration details aptly it will work.
I tried to explain in detail with lot of patience. All the best 🙂 .In Part3 of this blog i will explain by taking end to end test case .