Thursday, November 3, 2011

Conflict? What Conflict?

Sometimes you just have to RTFM - as in "Read the free manual". If you choose to do a Google search instead, chances are you'll be redirected to the free manual or a blog post that references the free manual. If you choose to do a search on My Oracle Support (I'm so used to calling it Metalink), you'll probably find a note that regurgitates contents from the free manual and/or makes a reference to the free manual. (Sometimes, as an added bonus, the same information is repeated in different free manuals). So, effectively, you end up Ring TFM!


Oracle eBusiness Suite comes with several seeded concurrent programs that have incompatibilities defined. The Conflict Resolution Manager (CRM) does it's thing to ensure that no conflicting programs run simultaneously. If you don't create your own conflict domains (a conflict domain is an abstract representation of the groupings used to partition your data), then you are limited to the seeded "Standard" conflict domain, which basically means that the incompatibility is global. However, to maximize the concurrency in a multiple organization environment, you can set up conflict domains for your operating units.


For more information, RTFM - 
Oracle E-Business Suite Multiple Organizations Implementation Guide
Oracle E-Business Suite System Administrator's Guide - Configuration

Tuesday, November 1, 2011

Incentive Compensation Payment Batch Action LOV

This one didn't take too long to figure out, but I'd like to share it just the same.

The Maintain Payment Batches screen in Oracle Incentive Compensation has a drop down for actions to be performed on selected batches.










The customer's requirement was to restrict the Pay action to a few select users. 
The poplist data is dynamically populated using  the base query :
SELECT * FROM 
(select lookup_code, meaning,decode(lookup_code , 'REFRESH','1','FREEZE','2','UNFREEZE','3','DELETE','4','PAY','5') ordactions 
 from cn_lookups 
where lookup_type = 'PAYMENT_BATCH_ACTION') QRSLT 
WHERE (lookup_code in ('DELETE','REFRESH','FREEZE','UNFREEZE','PAY')) 
ORDER BY ordactions ;

To remove any of the actions from the poplist for a responsibility, all you have to do is exclude the corresponding function from that responsibility.








And voila!










For a list of functions corresponding to the actions, look for functions that start with CN_PMT_PAYRUN.

Friday, October 28, 2011

eBS R12 Web Service Invocation Framework

The best source of information for WSIF in the Oracle blogosphere is the eBusiness Suite Integration blog. 
There's a great post by Vijay Shanmugam on invoking web services from Oracle Workflow with sample code. It's a great way to get started on WSIF. You may want to change the web service being invoked to William Shakespeare's quotes, because the movie finder web service in the sample code returns nothing. 


Happy WSIFing!

Thursday, October 27, 2011

Upside down printing in BI Publisher using RTF template

A while back I came across this query in the BI Publisher forum.


"I have to print an address upside down in order for it to come out right side up when folded and put into an an envelope. I see in MS Word that you can select the print direction of your text, but it only allows you to chose left, right or the standard printing."


You can follow the forum thread here.


All you really have to do is add an XSL-FO directive before the first element in the cell that you want to be upside-down. 
<xsl:attribute xdofo:ctx="block-container" name="reference-orientation">180</xsl:attribute>

That's all it takes...

Monday, October 24, 2011

ISG, JavaScript and Mobile Web Browsers

After getting ISG to work with SSL enabled for eBusiness Suite R12, the challenge was to get the JavaScript to work with all desktop and mobile browsers. It took me a while to figure this out and I had to ping some of my web development guru friends for help, but it works now!
If you look at the stub JS script for FND_PROFILE, you will find the function FND_PROFILE_Port_GET(_NAME) which basically creates the SOAP envelope and body and the calls the web service using XMLHttpRequest or ActiveXObject("Microsoft.XMLHTTP") for Internet Explorer. The script uses XMLDOM ( document.implementation.createDocument or ActiveXObject("Microsoft.XMLDOM")) to create a new XML document. To create elements and attributes, it uses createElement, createElementNS. 
Well, createElementNS works differently on Firefox than it does on IE, Chrome or Safari in that it uses the namespace to create an element with the namespace attribute.  For example the output from
var envelope = createElementNS(xmlDoc, 'http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope'); 
in Firefox is <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">. In the other desktop browsers the output is <soapenv:Envelope>.
Modifying all createElementNS calls to createElement, I got this working on all desktop and almost all mobile browsers - BlackBerry just refused to comply. I must have gone through over a 100 BlackBerry and JavaScript links that resulted from a Google search but I'd always end up with the same result - no luck on BlackBerry browsers. 
I then changed my approach - instead of using createDocument and createElement, I created the XML as a string and loaded the string into an XML document. Not a very elegant solution, but it gets the job done. 

if (window.DOMParser)
{
parser=new DOMParser();
xmlDoc=parser.parseFromString(xmlString,"text/xml");
}
else // Internet Explorer
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(xmlString); 
} 

DOMParser is only available on BlackBerry versions 4.7.1 and up.




Sunday, October 23, 2011

Integrated SOA Gateway and SSL

In the previous post I shared the ISG based solution for processing inbound email notifications. As I mentioned in that post, this solution only worked when the approvers were connected to the internal network. The customer required this functionality on mobile devices such as iPhone, iPad, Android, and BlackBerry. The obvious solution was to enable SSL for eBS. The eBS external URL changed to https://<ebs.companyname.com> without a port number. 
With this change in place, I tried to regenerate the WSDL for the custom procedure. After a long wait all I got was an error - something to the effect of "SOAProvider is not accessible. Please check with your system administrator". I set up statement level logging and found that the error was caused by the function call oracle.apps.fnd.soa.provider.util.ServerAccess.sendMessageToServer. The value for SOA_SERVER_URL was  https://<ebs.companyname.com>:<port>. The program was sending an HTTP request to a non-existent URL. So, I changed the oc4j.properties template files in $FND_TOP/admin/template -  oc4j_properties_1013.tmp and oafm_oc4j_properties_1013.tmp - and ran autoconfig. The value for SOA_SERVER_URL was now https://<ebs.companyname.com>. I tried to regenerate the WSDL once more and this time I got a numeric value exception. I decompiled $JAVA_TOP/oracle/apps/fnd/soa/provider/util/ServerAccess.class and saw this piece of code :

       int k = s3.lastIndexOf(":");
  s3 contains the value of SOA_SERVER_URL. This code assumes, rightly or wrongly, that the SOA server URL will always have a port number. Well not so in this case. I could have created an SR with Oracle Support but it was easier to get the web guys to create an alias for https://<ebs.companyname.com>:<port> to point to  https://<ebs.companyname.com>. I reverted to the original templates for oc4j.properties, ran autoconfig and retried the WSDL generation. Worked as expected.


In the next post I share how I got the solution to work on mobile browsers after grappling with various levels of JavaScript support.