Tuesday, August 3, 2010

AIA Error Codes

I was working on AIA error handling and found very weird thing about how AIA was handling its error codes and description. Error codes are pretty much sporadic in .bpel or .xsl files, and aia:getErrorMessage is used to get error description for the error code.

AIA gets error messages from following file:
$oracle_home/bpel/system/classes/oracle/apps/aia/core/eh/i18n/EHResourceBundle.class


Error Code

Error Message

AIA_ERR_AIAINF_1001 Input log level for IsLoggingEnabled function is incorrect
AIA_ERR_AIAINF_1002 No corrective action string specified for the given corrective action code
AIA_ERR_AIAINF_1003 No error message has been specified for the input key
AIA_ERR_AIACOMBMPI_0001 Maxitems requested is less than the Threshold/Number of records returned from the billing system
AIA_ERR_AIACOMBMPI_0002 Account/Billing Profile being sent is not synced to the billing system
AIA_ERR_AIACOMCMPI_0001 EBMHeader/Sender/ID is required
AIA_ERR_AIACOMCMPI_0002 EBMHeader/Target/ID is required
AIA_ERR_AIACOMCMPI_0003 Account Sequence Error: Pay-From Accounts and Billing Profiles must appear before dependent/subordinate Accounts and Billing Profiles
AIA_ERR_AIACOMCMPI_0004 Subordinate account cannot have multiple parent accounts
AIA_ERR_AIACOMCMPI_0005 Ambiguous subordinate bill profile update: There are multiple distinct Pay-From-Party Billing Profile references associated with a single Prior Pay-From-Party Billing Profile reference
AIA_ERR_AIACOMCMPI_0006 All existing subordinate bill profiles are not included in the move account request
AIA_ERR_AIAINF_2001 Error message for getErrorMessage XPath verification
AIA_ERR_AIAO2C2_1001 Timeout while waiting for a response from the InterfaceCustomerToFulfillmentEBF service.
AIA_ERR_AIAO2C2_1002 Timeout while waiting for a response from the InterfaceSalesOrderToCustomerEBFV2 service.
AIA_ERR_AIAO2C2_1003 Timeout while waiting for a response from the CreateSalesOrder EBS service operation.
AIA_ERR_AIAO2C2_1004 Timeout while waiting for a response from the UpdateSalesOrder EBS service operation.
AIA_ERR_AIAO2C2_1005 This order has already been synced.
AIA_ERR_AIAO2C2_1006 Account could not be queried. Please make sure the Account exists in the system
AIA_ERR_AIAO2C2_1007 Timeout while waiting for a response from the SyncCustomerPartyList EBS service operation.
AIA_ERR_AIAO2C2_1008 Credit Check failed. Please contact your System Administrator.
AIA_ERR_AIAMDM_1001 Timeout while waiting for a response from the SyncCustomerPartyList EBS service operation.
AIA_ERR_AIAMDM_1002 Timeout while waiting for a response from the FetchCustomerPartyEBF service.
AIA_ERR_AIAMDM_1003 Invalid QueryCode. Valid values are: MATCH_PERSON or MATCH_ORGANIZATION.
AIA_ERR_AIAMDM_1004 Invalid QueryCode. Valid values are: FETCH_PERSON or FETCH_ORGANIZATION.
AIA_ERR_AIAMDM_1005 Cross-Reference ID lookup failed or returned no associated IDs
AIA_ERR_AIARTL2PSFT_1001 Invalid Requesting System; Requesting Systems must be RESA
AIA_ERR_AIARTL2PSFT_1002 Invalid Set Of Books Id; Set Of Books Id must in BUSINESS_UNIT DVM
AIA_ERR_AIARTL2PSFT_1003 Invalid Currency Conversion Type Code; Currency Conversion Type Code is not in CURRENCYEXCHANGE_CONVERSIONTYPECODE DVM
AIA_ERR_AIACOMOMPI_0001 Dates Validation Falied : Either one of the Purchase Date/Cycle Start Date/ Usage Start Date should be set to future
AIA_ERR_AIACOMOMPI_0002 Date Validation Falied : Purchase Date should be set to future
AIA_ERR_AIACOMOMPI_0003 Purchased promotion instance does not exist for a promotion that was previously purchased.\240\240 A data upgrade script was not run.
AIA_ERR_AIACOMOFMPI_0001 Data Insufficient for Trouble Ticket Creation. Order Originating System Code not available
AIA_ERR_AIACOMOFMPI_0002 Data Insufficient for Trouble Ticket Creation. Order ID not available
AIA_ERR_AIAAGILEJDEE1_0001 For additional information go to /agile/ais/fileResult and review the following file:
AIA_ERR_AIAAGILEJDEE1_0002 There are branch plants in the input message that do not have a mapped value in the AGILE_TARGET_SITE_MAPPING DVM
AIA_ERR_AIAAGILEJDEE1_0003 None of the items selected have been integrated
AIA_ERR_AIAAGILEJDEE1_0004 None of the engineering change orders selected have been integrated
AIA_ERR_AIAAGILEJDEE1_0005 Unable to find a Agile Site to branch plant mapping. Ensure all of the sites for the items on the Change are properly mapped or a default is set in AGILE_SITE_TARGET_MAPPING DVM
AIA_ERR_AIAAGILEJDEE1_0006 Invalid Batch Quantity: All Bill of Materials Batch Quantity must be equal to Zero.
AIA_ERR_AIAAGILEJDEE1_0007 Invalid Bill Of Materials Type: All Bill of Materials Type must be equal to 'DEFAULT_BOM_TYPE' AIA Configuration Property value.
AIA_ERR_AIAAGILEJDEE1_0008 Invalid Bill Of Materials Input: Multiple Bill of Materials for the same Parent Item is not allowed when 'MULTISITE_ENABLED' property is set to 'FALSE'.
AIA_ERR_AIAAGILEJDEE1_0009 Invalid Bill Of Materials Input: Bill Of Materials Components with 'Non-Stock' Stocking type is not allowed when 'MULTISITE_ENABLED' property is set to 'TRUE'.
AIA_ERR_AIAAGILEJDEE1_0010 Failed
AIA_ERR_AIAAGILEJDEE1_0011 Release ECO SDK Execution Failed:
AIA_ERR_AIAAGILEJDEE1_0012 Could not find Change Order workflow:
AIA_ERR_AIAAGILEJDEE1_0013 File does not exist:
AIA_ERR_AIAAGILEJDEE1_0014 None of the Items selected have associated Branch Plants
AIA_ERR_AIAAGILEJDEE1_0015 The Change Order Not found -
AIA_ERR_AIAAGILEJDEE1_0016 Invalid Item Revision Level: Make sure 'ITEM_REVISION_LEVEL' Property in AIA Configuration Properties is not Blank
AIA_ERR_AIAEBSI_0001 Failed to fetch the Sales Representative Resource ID. Please make sure the Sales Representative email addresses are identical in both systems


It was quite disappointing to see that all error codes and error messages are defined in a Java class instead of a property file. if someone needs to change error message or add new error code and error message, it is impossible unless you hack the Java code and recompile it.

It does makes sense to create a custom framework to store all your error codes and error messages so that you don’t get bound to the AIA boundaries.

Wednesday, July 7, 2010

Siebel Web Service with SoapUI

I was working with Siebel webservices for Query Customer and found that it was working fine from BPEL but when I try from soapUI, it returns junk characters. Upon intercepting both traffic using tcpmon, we found the issue was in one of the HTTP header. Basically "Accept-Encoding: gzip,deflate" which was sent from SoapUI was causing the problem.

In soapUI, you can disable this particular header via following option. Once the option is enabled, you can invoke Siebel web service doesn't return junk data and returns valid XML data.

Wednesday, June 30, 2010

Java forever

Not related with Oracle SOA. It was just fun to watch this after a long busy day .. Java forever

Wednesday, June 16, 2010

BPEL Version Redirect

I was working with the client and we had situation were multiple BPEL process versions were deployed with one of them being the default version (e.g. 1.0, 2.0*, 3.0). If client is using is version agnostic WSDL and end point URL, (as below), then it is not major concern because BPEL will route it to default version and everything will work like a charm.

http://host:port/orabpel/<domain>/<process>/<process>?wsdl

http://host:port/orabpel/<domain>/<process>

That was not the case we had. One of the client was using version specific URL, and we didn’t have time and control over the client to change their URL right away. Of course, the long term solution would be use version agnostic URL, gateway or UDDI, but here is quick and dirty way if we just want to route old version request to new version using Apache redirect rule.


This basically routes the request from old-version to new-version for WSDL or End-Point request. If we want to make it generalize, to redirect all versions to a specific version (doesn't matter if that is default or not), it would be following. This can come pretty handy if version management goes out of hand..


After making it generalized, I thought of taking this approach to the next level. As all of us know that to utilize ESB->BPEL native binding (which is highly recommended by Oracle, especially in AIA world), we have to configure routing rules to point to specific version of BPEL process. Every time new version of BPEL is deployed it causes routing rule to change. I thought may be I can fool ESB with this redirect even if it is using native binding, but this trick but didn’t work out with native binding.

Monday, May 3, 2010

XSLT Troubleshooting

May be it is just based on my experience, but I feel in general XSLT doesn’t have lot of troubleshooting support. E.g. in Java, no matter what JVM you use, you can pretty much get stack trace (even in NPE errors). In XSLT, based on XML parser you use, sometime you get line numbers and some time you don’t, plus it doesn't provide lot of details in log. Moreover there are not really any good tools to do much troubleshooting. In AIA world, it gets even crazier. Most of the XSLT functions come with AIA just runs only on server side, so you are hopeless and helpless when you want to do some troubleshooting on your local box. It gets even worse, when you get FOTY0001 type errors. Sometime you get more details in log file when there is FOTY0001, and sometime you don't.

Here are couples of ideas which can make your life easier.

1) XSL comment
You can put XSL comment in your code, so it will show up when XSLT is completed. It does help a lot when you are trying to just print values of variables. Pretty much all credit goes to Mahesh Narayanaswamy (absolute XSL genius) for this suggestion.

2) XSL out
This was very cool idea came out of disucssion with Amol Vaidya. XSL comment didn’t help much when XSLT was completely breaking and we were unable to get the line number or the root cause. All we needed is the similar capability like System.out inside the XSL, so we know how far in XSL we went and what are the variables. We just want to get all information before the point of failure. A custom XSLT log function came pretty handy for putting trace log in your XSLT. This way we can get as much information about the XSLT before the point of failure.
We wrote custom XSL function called XSLTLog, and registered that function in BPEL RT and ESB XSL Library.

3) Java code
I also wrote a Java code which can take XML input and execute the XSL. We have to register this Java code to the server as lot of AIA XSL functions relies on server side components. We also took it further to find exact line number in XSL using binary search approach.

Wednesday, April 28, 2010

BPEL ReadOnly Console

It was my first blog which I wrote almost three years ago. http://chintanblog.blogspot.com/2007/12/i-saw-numerous-people-asking-about-bpel_290.html Since then, pretty much all my clients and a lot of other companies used this approach. I also saw many other blogs copied this idea or put enhancement to it. Anyways, one of my client pointed out this metalink article: 852840.1. Metalink had reference to my blog!! Wow, it certainly makes me feel good when multi billion dollar organization put reference to my tiny little site.




On a smaller scale, but it still reminds what Margaret said: "Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has"

Thursday, April 8, 2010

TCP Tunnel - Java Port Forwarding - TCP kill

You know, sometime you just get amazed when you find an absolutely simple solution for a overly complicated problem. I was working with one client remotely and banging my head against the wall to get the access to their valuable servers. After a so much frustration I could get access to one or two servers via ssh, and that's pretty much it. I could ping to everywhere from that UNIX box but can not connect anything from my local laptop.

To make long story short, I tried using SSH tunnel, hacked routing tables of UNIX/windows but nothing came as handy as a simple Socket program which basically listens on a port and make socket connection to remote client. It is very much like TcpMon or Obtunnel but it is just bare bone version of it. Pretty much 99% of my laptop traffic was going through this tiny unix box and never had to beg for access.

java -jar springportforward.jar com.springsoa.socket.Forward localport remotehost remoteport &

Now as this become the absolutely life savor, I thought I can I can leverage something more out of it. I think we potentially can use this for tcpkill workaround. Basically try to forward all traffic through portforward, and kill the portforward to achieve same effect as tcpkill.