cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate check and alert.

Former Member
0 Kudos

Hi,

I need to merge 4 files into single file.

input files.

1.abc.out.<timestamp>

2.abc.out.<timestamp>

3.abc.out.<timestamp>

4.abc.out.<timestamp>

output file

abc.out

Scenario: I have created 4 Communication Channels and used BPM fork for collecting all the 4 files and merge and generate the files.

Case1 :channels are scheduled.

Case2: BPM need to wait for all the 4 files are collected , if in the particular time any one of the file i smissing stop the process. This was achived using fork and it is working fine.

Case 3: If there are any duplicate files

eg: 1.abc.out.<timestamp>

2.abc.out.<timestamp>

3.abc.out.<timestamp>

4.abc.out.<timestamp>

2.abc.out.<timestamp>

2.abc.out.<timestamp> is repeated twice , if there are any duplicate files in the directory , i need to stop the process.

How can i achive the case 3 using BPM.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
2.abc.out.<timestamp> is repeated twice , if there are any duplicate files in the directory , i need to stop the process.

you can do so by comparing the file-names of the files (assuming 1.abc.out is file-name)...read the files and get the file-names into the payload before the messages enter the BPM....then while performing the mapping (n:1) do a check for the file-names...if it is unique then no action required....if duplicate raise an exception from the mapping....catch this exception in the BPM....and in the Exception Handler cancel the process.

Regards,

Abhishek.

Former Member
0 Kudos

Hi abhishek salvi,

Could you send me the step by step process.

Thanks in advance

Former Member
0 Kudos

Hi,

check this link :-

http://wiki.sdn.sap.com/wiki/display/XI/DifferentwaystokeepyourInterfacefromprocessingduplicate+files

You can try to use the the standard predefined BPM patterns SAP has delivered that are very helpful for developing the design for integration process. You can use these patterns or combination or part of these patterns to achieve your requirement. These patterns are available under software component SAP BASIS ..............Check the below links,they will give a better picture .You can use the patterns - BpmPatternCollectMultiIf , BpmPatternCollectMultiIfCondition

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-2

If you are using PI 7.1, then you can use the user decision step to meet your req.

Regards,

Rohit