on 04-19-2010 11:29 PM
Hi All,
I want to check whether the value is empty or starts with 'X' in message mapping for a field CUSTID.
If so, then send a mapping error with red flag in SXMB_MONI. Can anybody tell me the easiest way to achieve this.
Thanks
Deno
Deno,
Approach1 write a simple UDF
Simple UDF, with one input parameter CUSTID
if(CUSTID.equals("") || CUSTID.startsWith("X"))
{
throw new RuntimeException("MEANINGFUL ERROR DESC");
}
else
{
return CUSTID;
CUSTID >TRIM>toUPPERCASE->UDF>TARGET FIELD
Approach2 - Make the Target field as Mandatory(TARGETFIELD)
Now in the graphical mapping check the above conditions, using eQualS, If then else, etc and if satisfy don't populate the target node.
In approach2 since it's mandatory and you are not populating it, mapping program will fail and it will show red flag.
I would say go ahead with Approach 1, because Approach 2 will be difficult to debug for what reason it has failed. But in case of Approach1 , you can give a meaningful error desc and by seeing the error in sxmb_moni you can easily identify the root cause.
Hope it helps!
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wonderful Raj. Prob solved. Thanks
I would like to have one more favour. Do you have a set of functions (UDF) available which are the most commonly used ones in PI mapping conversions. By this way, it would be very helpful for me to use it as and when needed. Please let me know.
Appreciate your help again.
-Deno
Deno,
Sorry I don't have any sort of collections, but you can go through the list of solutions provided for SDN problems in the below link
http://www.flickr.com/photos/8764045@N06/
raj.
Thanks Raj. For the above UDF, if X comes in as the input value, we get a runtime exception with a red flag in MONI.
Now, question is how do we identify whether the failed message out of 10, 2 are from this exception and 8 are from some other exception. Is there a way in SXMB_MONI to uniquely identify these runtime exception messages without going inside for the error message description. Please let me know.
-Deno
Raj,
I guess, the question is not clear to you. Let me re-phrase the question again.
In the UDF above, if a run time exception occurs in the mapping, it will throw a red flag in SXMB_MONI for the interface.
Suppose, there are 100's of failed messages with a red flag in it for the interface, how do we know which one belongs to the run time exception. Customer don't want to go inside each failed message to check for the description of error. That's why.
Is there any way to customize the display of the run time exception message in SXMB_MONI like changing the flag color from red to yellow, or adding a column in the display to say "Runtime exception" etc etc.
Please let me know.
Thanks
Deno
Deno,
I understood ur question very well. I'm saying it's not possible other than going and looking inside the Error logs. If they think that they don't want to go inside and check the error logs, they shouldn't have thought of throwing an exception in first hand. Probably could have filter those files and written some where to the error folder so that later they can validate it.
raj.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.