cancel
Showing results for 
Search instead for 
Did you mean: 

Alert category always "XI_ALERT"

0 Kudos

Hi, i was just trying to raise Alerts from a user defined function:

-


import com.sap.aii.af.service.alerting.*; (from aii_af_svc.jar)

String errText = "AdapterFramework on " + System.getProperty("SAPMYNAME", "");

String adapterType = "adapterType";

String fromParty = "fromParty";

String fromService = "fromService";

String toParty = "toParty";

String toService = "toService";

String msgInterface = "msgInterface";

String namespace = "namespace";

String errorCategory = "XI_UDF_ALERT";

String errorCode = "myError";

String errParams[] = {

"!XI Alert TestParam1", "!XI Alert TestParam2", "!XI Alert TestParam3", "!XI Alert TestParam4", "!XI Alert TestParam5"

};

String errValues[] = {

"!XI Alert TestValue1", "!XI Alert TestValue2", "!XI Alert TestValue3", "!XI Alert TestValue4", "!XI Alert TestValue5"

};

ErrorInfo errorInfo = ErrorInfo.newAFErrorInfo("msgId", errorCode, errorCategory, errText, adapterType, fromParty, toParty, fromService, toService, msgInterface, namespace, errParams, errValues);

try

{

Alert.newAlert(errorInfo).send();

}

catch(AlertingException e)

{

System.out.println(e.toString());

}

return input;

-


although i am using errorCategory = "XI_UDF_ALERT" it always ignores this and shows up Cat: XI_ALERTS

how can i change this?

Accepted Solutions (1)

Accepted Solutions (1)

ravi_raman2
Active Contributor
0 Kudos

Hi,

Your method is getting overriden somewhere..internally..see if you can find that class and override that class.

Regards

Ravi Raman

While(pointsAreAssigned ==true){

boolean getAReply = true;

}

else{

System.exit(0);

}

0 Kudos

Hi Ravi,

give me an solution and i give you points

That is the deal in this forum.

Begging does not fit in here.

former_member189519
Participant
0 Kudos

you have to create an rule in RWB which matches your parameter you set in your user defined function

then this rule forwards the alert to an category in "alrtcatdef" and then you can use the standard channel to inform users (fixed receipient or whatever..)

hope this helps

0 Kudos

great, that solved my problem, the rwb-alertconfiguration is the filtering gadget

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi !

There is another approach:

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

Regards,

Matias

ps: please award points if helpful.

0 Kudos

yes, the "good old" alert-test functionmodule call, everybody know...

but why, when there is already an java-class which provides that functionality and which i can use comfortably?

bhavesh_kantilal
Active Contributor
0 Kudos

Can you provide us more details on the Java Class that you are using?

Is there some Java Doc on this? Have never come across this API and hence am kind of curious.

Regards

Bhavesh

ravi_raman2
Active Contributor
0 Kudos

Technical Team..SHAPE........

couldent agree with you more.........though the issue is support for it eventually if..sap changes something then..........But its a java way of looking at the sap world....

Regards

Ravi Raman.

Dont forget the while block......!!!!!!!!!!!!

former_member189519
Participant
0 Kudos

Hi Bhavesh,

you can find this functionality in any adapter framework core file: SAPXIAFC*.SCA (XI3.0 / PI7.0)

unpack it with any zip-utility and look for the file aii_af_svc.sda. unpack that too and you get the aii_af_svc.jar which exactly hold that information.

former_member189519
Participant
0 Kudos

If you ever called /AdapterFramework/alerting/ping.jsp you found that class used by the Alert-Test method Alert.sendTestAlert(true) which themself calls the Alert.newAlert() method