on 04-09-2010 8:39 AM
Hi Folks,
In my scenario. PI will be getting a file in following format.
Header
Item
Item
Header
Item
Item
End Records
PI have to check if 'End Record' exists in the file. If not, then Alert need to be triggered. I am not sure how the scenario can be handled without using BPM.
Please help me if anybody is aware of the scenario.
Thanks & Regards,
Punit
there are two ways to do this;
1. Use FCC, convert to XML and then in RD check if the trailer node exist - thus you can stop the further execution. But raising alerts would be tricky and hence you would have to call a simple mapping just to trigger the alert
2. Use a module to do your validation and raise alerts within the module itself (its a bit complex, i wouldn't recommend this)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Punit,
You can create a UDF for throwing runtime exception when input string "false" is received.
Then use exists function to check if End Record exists and pass the outcome of exists to UDF.
If it doesn't exist,mapping will throw a Runtime exception and if Alert configuration is there,an alert will be raised.
Please excuse,if I have not understood the requirement correctly.
Thanks.
Regards,
Shweta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
UDF is not required in your case also not recommended....it will be better if you use Receiver Determination itself to check for the existence of the field and to raise any alert.
I am suggesting Receiver Determination because it will avoid processing the message till the Mapping step, for performance perspective.
Regards,
Abhishek.
Hi Abhishek,
Thanks.I just mentioned how I handled such a requirement.
You are right,handling it at Receiver Determination level would be good so as not to reach Message Mapping level.
I had to check if a field in Excel is blank(when we converted this Excel into XML,then this blank is replaced by " in XML)
In such case,I had to raise an exception.
So I created a UDF:
public String throwErrorOnInvalidValue(String a,Container container){
if(a.equals("\""))
throw new RuntimeException("Invalid Value: Value should be numeric");
else
return a;
Regards,
Shweta
You can check it in Receiver Determination (in the Condition Editor) and then mark the processing as error so that an alert can be raised (only if you have creatde and configured an alert category).....do you want the processing to stop if the field is not found?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.