Wednesday, July 11, 2012

AIA Error Handler Email Config Tricks


I had to chase down a problem with an AIA error handler failing to send email today. Boy, it has been a few months since I last touched it. Everything got blurry. I had to relearn quite a bit. Let me document the tricks before I forget again.

1.      First of all, .under {AIA instance home}/AIAMetaData/config (e.g. /app/oracle/product/fmw/AIACCB/aia_instances/AIACCB/AIAMetaData/config)
make sure the two XML files are configured correctly.
2.      Follow this link to update the AIA config: http://docs.oracle.com/cd/E17904_01/doc.1111/e17364/bldgintflows.htm#BACEGBEJ
(1)    Browse to the folder at $AIA_HOME/aia_instances/$INSTANCE_NAME/bin.
(2)    Source the file aiaenv.sh by executing the following command:
source aiaenv.sh
(3)    Browse to the folder at $AIA_HOME/aia_instances/$INSTANCE_NAME/config and open the deployment plan file, UpdateMetaDataDP.xml.
(4)    Update the file UpdateMetaDataDP.xml by inserting include tags for each resource group that you want to add to the MDS:

a.      To upload all the files under "AIAMetaData", add the following:
<include name ="**"/>
b.      To upload the files copied to "AIAComponents/ApplicationObjectLibrary/SEBL/schemas" folder, add the following:
<include name ="AIAComponents/ApplicationObjectLibrary/SEBL/schemas/**"/>
Note:
In the include tag, the folder path must be relative to the folder AIAMetaData.
(5)    Browse to AIA_HOME/Infrastructure/Install/config. Execute the script UpdateMetaData.xml by typing the command:
ant -f UpdateMetaData.xml
3.      (Trick 1) Due to an AIA bug, when you run (5) above, make sure {AIA home}/lib/aia.jar (/app/oracle/product/fmw/AIACCB/aia.jar) is available. HOWEVER, after you finish step (5), make sure you hide that aia.jar (rename to aia.jar.bak), then bounce your SOA server! It’s ironic that you have to hide aia.jar in order for AIA to work! BUT, remember next time when you need to run AIA update again, step (5) above, make sure you unhide your aia.jar in order for the update to work. Also, double check on step (4) carefully, I burned several hours in the past due to a careless file path problem in the XML file on step (4).

4.      (Trick 2) Say, you set up your error tables, for that “Role” column, you enter the user name (e.g. “foo”) that will receive the email notifications. According to AIA doc, you need to configure that user’s email under {your AIA URL}/sdpmessaging/userprefs-ui (if your AIA console is foo.com/AIA, then your link is foo.com/sdpmessaging/userprefs-ui). However, that didn’t quite work for me either.
What you really need do is to go to weblogic console, under security realm, users, set the email for that user  (say “foo”), click “attribute” tab, then find mail (2nd page), and enter email address over there. That is what worked for me! The only that appears to be working under "sdpmessaging/userprefs-ui " is if you set one user as the default channel (I used AIAIntegrationAdmin). 

5.      (Trick 3), one useful trick to debug your email problem is under “em” console.
Expand “User Messaging Service” (last link on the left panel)
Click on “usermessagingserver (WLS_SOA1)”
On the right panel, look on the top left corner, find the little drop-down menu (under “usermessaingserver” bold letters),
select “Message Status” from the drop-down menu
Hopefully, you’ll see a list of message action entries.
Click on the one you are interested (failed, succeeded)

I have had luck to find out the root cause of email issues from this page. In the case, when it shows failed, I can check the bottom to find out the detailed reason.
Today, I found one showed succeeded; however, we didn’t get any emails. So that prompted me to login to the putty console, and run the mail command, like “mail foo@bar.com”, directly, where “foo@bar.com“ is the address that the server claimed to have sent successfully. However, my putty console test shows the recipient never get the email. As it finally turned out that email “foo@bar.com” happens to be a distribution list and it was not set up properly on the server.





2 comments:

  1. Thank you very much for sharing. This note saved me today.

    ReplyDelete
  2. (Trick 2) DID THE JOB! Thanks mate for this hint!

    ReplyDelete