cancel
Showing results for 
Search instead for 
Did you mean: 

ALERT

Former Member
0 Kudos

Hi,

I am working on ALERT.I have done all the configuration from the transaction ALRTCATDEF and ALERTINBOX as described in SDN.But I want to create an alert for a mapping problem.Please explain me how to triger the alert for a particular mapping logic .

Regards,

Somenath

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Somenath,

In this case u can trigger an alert from the UDF.What you can do is check for your mapping logic if the condition does not satistfy than u can trigger the alert.For trigerring alerts from UDF check the below link:

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Thanks,

Bhargav.

Note:Award points if found useful

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

Thanks for ur reply.UR ans are very helpful.Could you please send me some example udf with the logic to trigger the alert .

Regards,

Somenath

GabrielSagaya
Active Contributor
0 Kudos

package com.guarneri.xi.mapping.udf;

public class CustomMappingException extends RuntimeException {

public CustomMappingException() {

super();

}

public CustomMappingException(String message) {

super(message);

}

public CustomMappingException(Throwable cause) {

super(cause);

}

public CustomMappingException(String message, Throwable cause) {

super(message, cause);

}

}

package com.guarneri.xi.mapping.udf;

public class ExceptionThrower {

public static void fire(String message) throws CustomMappingException {

throw new CustomMappingException(message);

}

}

imports==> com.guarneri.xi.mapping.udf;

public void ThrowException(String[] theValue, String[] theMessage, ResultList result) {

if(theValue.length==0 || theValue[0].trim().length()==0 || theValue[0]=="$Error$")

ExceptionThrower.fire(theMessage[0]);

else

result.addValue(theValue[0]);

}

}

GabrielSagaya
Active Contributor
0 Kudos

function myudf(String a,Container container)

{

int i=0;

try

{

i=Integer.parseInt(a);

catch(NumberFormatException e)

{

throw new NumberFormatException("Not a Number");

}

return i;

}

You can write the UDF which throws NumberFormatException that triggers the Alert message in your alert inbox.