Monday, March 24, 2008

Oracle Apps - Java Concurrent Program

Writing a Java Concurrent Program

Concurrent Processing provides an interface JavaConcurrentProgram with abstract method runProgram() which passes the concurrent processing context CpContext. The concurrent program developer will implement all of their business logic for a concurrent program in runProgram().
CpContext will have the request specific log and output file input methods. The class name with the runProgram() method will be registered as the java executable file name in the register executable form.

Follow the following generic format to write a Java Concurrent Program…

package oracle.apps.yourpackage.subpackage;

import oracle.apps.fnd.common.Context;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.cp.request.*;
import oracle.apps.fnd.util.*;

public class HelloWorldApp
implements JavaConcurrentProgram{
public void runProgram(CpContext ctx){

//Obtain the reference to the Output file for Concurrent Prog
OutFile out = ctx.getOutFile();

//Obtain the reference to the Log file for Concurrent Prog
LogFile log = ctx.getLogFile();

try{

//To read parameters passed via Concurrent Program
String myName = null;
ParameterList lPara = ctx.getParameterList();
while (lPara.hasMoreElements())
{
NameValueType aNVT = lPara.nextParameter();
if ( aNVT.getName().equalsIgnoreCase("My Name") )
myName = aNVT.getValue(););
}

//Write your logic here

out.writeln("This will be printed to the Output File");

log.writeln("This will be printed to the Log File", 0);

//Request the completion of this Concurrent Prog
//This step will signal the end of execution of your Concurrent Prog
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL,  "Completed.");
}
//Handle any exceptional conditions
catch(Exception e){
StackTraceElement ste[] = e.getStackTrace();
for(int i=0; i<ste.length; i++){
log.writeln(ste[i].toString(), 0);
}
}
}
}


Best Practice

As a best practice, use Oracle JDeveloper patched with the following patch number: 6012619. You can download it from Metalink. This patched release of JDeveloper includes all the FND packages and other requisite packages commonly used while writing Java Concurrent Programs. You may use Eclipse, but you will have to manually copy all the packages from Oracle Apps Server to your local machine and give its reference to the project.

Porting Third-Party Libraries

Ask the DBA to place all the requisite third-party libraries under $JAVA_TOP. To make the third-party libraries available to your JCP, follow the steps outlined below to create your Concurrent Program Executable and to create the actual Concurrent Program.

Create Concurrent Program Executable

Path: Concurrent -> Program -> Executable
Create the concurrent program executable, details of which are as follows:
Executable   : HelloWorld
Short Name   : HelloWorld
Application   : Custom Applications
Execution Method  : Java Concurrent Program
Execution File Name         : HelloWorldApp This is your main class file
Execution File Path  : oracle.apps.yourpackage.subpackage

Create the Concurrent Program

Path: Concurrent -> Program -> Define
We are having one concurrent program.
Program  : HelloWorld Java Concurrent Program
Short Name : HELLOWORLDJCP
Application : Custom Applications
Description : Hello World Program
Executable Name : HelloWorld
Executable Method : Java Concurrent Program
Options  : -classpath  /dv00/oracle/product/DEV1110/java:/dv00/oracle/apps/DEV1110/11.5/au/11.5.0/java/appsborg.zip:/dv00/oracle/product/DEV1110/java/thirdParty1.jar:/dv00/oracle/product/DEV1110/java/thirdParty2.jar
Note:- If your JCP does not make use of any Third-Party libraries, then please DO NOT put any entry in the Options.
The Options to be specified must be fully qualified. Use of environment variables will fail the execution of the Java Concurrent Program.
/dv00/oracle/product/DEV1110/java - This is the path to my $JAVA_TOP
/dv00/oracle/apps/DEV1110/11.5/au/11.5.0/java/appsborg.zip - This is the path to my $AU_TOP/java/appsborg.zip
/dv00/oracle/product/DEV1110/java/thirdParty1.jar - This is the JAR reference to my first Third Party Library dependency.
/dv00/oracle/product/DEV1110/java/thirdParty2.jar - This is the JAR reference to my second Third Party Library dependency.
The paths must be set for appropriate environment as specified above and must be separated using a colon “:” without any new-line characters.

Keywords: apps software,concurrent application,concurrent applications,concurrent tutorial,java application,java concurrent program,java concurrent programming,java example,java examples,
java programming,java sample,java sample code,java source code,java tutorial,java tutorial program,oracle resume

Wednesday, March 19, 2008

Enabling Auto Order Functionality in Siebel v8.0 CRM /Error Code:SBL-APS-00802

Hi Friends,

If you just installed Siebel CRM v8.0 & are facing issues with AUTO ORDER Functionality while using Quotes (Error: SBL-APS-00802), then you need to do some configuration changes before proceeding.

1) Firstly check whether you have all the workflow components enabled on the server
If not, enable the workflow component group.



2)Go to Sitemap>Administration-Server Configuration>Component Definitions>
Query for the component for which you want to enable the Auto Order functionality. Say for e.g. Sales
Now, in the Component Parameters Applet, Query for: 'Order Management - Enable Asse' & set its Value to: 'True'


3)Go Siebel_Server_Installation_Root\siebsrvr\bin\enu
Open the .cfg file for the application which you just enabled the Auto Order Functionality.
Under the '[InfraObjMgr]' add following line:
'AssetBasedOrderingEnabled = TRUE'
Save the file & close.
You need to do similar changes in your Dedicated or Mobile Client cfg's to enable the functionality.



4)Now restart your Siebel Services!
Order of Siebel Service Restart:
1)Stop the Webserver Service
2)Stop the Siebel Server Service
3)Restart Gateway Server Service
4)Start Siebel Server Service
5)Start the Webserver Service

5)Now go to Sitemap>Administration - Business Process>Workflow Deployment
Select All Workflows & click ACTIVATE


6)Now log out of the application & relogin to test your AUTO ORDER Functionality! It should be working now!

Enjoy!

Keywords: autoorder,auto order,siebel crm,siebel customer relationship management,siebel solutions,siebel support,siebel supportweb,siebel systems, SBL-APS-00802

Sunday, March 16, 2008

Siebel Thin Client Connectivity Fails/SWSE Configuration/Siebel Web Server Extentions Problem

Hello Friends,

I was playing around Siebel CRM 8.0 Installation (Business Applications/Enterprise Applications)!
One of the most amusing aspect of the setup is the configuration & installation of Siebel Web Server Extensions (SWSE)!

I would like to point here one very common & specific reason why thin client connectivity fails almost always while configuring the first time!
While creating the SWSE Logical Profile, we are asked to give High Interactivity User & Standard Interactivity User




As you can see, i used GUEST & GUESTCTS as the High & Standard Interactivity Users respectively!
Well logically this should be true as its mentioned in the Siebel Installation Guide!
But the biggest problem is, your Database does not have GUEST or GUESTCTS users being created by Siebel.
These users should be created when we fire the grantusr.sql file before running Database Configuration Wizard!
But since they are not mentioned in the SQL Script, they are not created.

Due to this, after SWSE Installation, when we try to access the Siebel Application, we get following error:
"The server you are trying to access is either busy or experiencing difficulties. Please close the Web browser, open a new browser window, and try logging in again.[14:58:04]"

While the SWSE Log file shows:
"ObjMgrSessionLog Error 1 0000000847670820:0 2007-12-18 12:47:44 Login failed for Login name : GUESTCTS
ProcessPluginState ProcessPluginStateError 1 0000000847670820:0 2007-12-18 12:47:44 2112: [SWSE] Open Session failed (0x75eb4d) after 1.0381 seconds.
SisnapiLayerLog Error 1 0000000947670820:0 2007-12-18 12:47:44 480: [SISNAPI] Async Thread: connection (0x1a097e8), error (1180682) while reading message"

Resolutions / Workarounds:
We have two resolutions or workarounds for this problem:
  1. Manually create users GUEST & GUESTCTS in your database and assign them SSE_ROLE
  2. Use SADMIN as High & Standard Interactivity User in the SWSE Logical Profile
So thats the basic reason, why generally the Thin Client Connectivity fails most of the time!
Hope, if you are installing for the first time & having this problem, then by now your thin client must be up & running! ;-)

Keywords: analytics,business objects,crm,crm software,crm solutions,customer relationship management,data warehouse,ecrm,eim,erp,j2ee,pivotal,salesnet,service oriented architecture,sibel,siebel,siebel analytics,siebel crm,siebel software,siebel support,siebel systems,siebel training,web crm,workflow

Create Hidden Command Prompt/CMD/COMMAND Process

Hi friends,

Being a Java programmer, i always have a wish that while distributing my programs, instead of creating some setup, i could just distribute it in a JAR file & launch it via a batch file!
But a batch file, means a command prompt window keeps running side ways!
There began my search for a way to create a hidden command prompt process!

I came across two good solutions:
  • Create Hidden Process (http://www.commandline.co.uk/chp/)
  • NirCmd (http://www.nirsoft.net/utils/nircmd.html)
Create Hidden Process is an excellent freeware which allows you to launch almost anything from command prompt & that too completely hidden!
For example, i participate in BOINC Projects (SETI@Home & Climateprediction)
Running the BOINC GUI Module consumes lots of RAM & CPU...so i always prefer to launch it via Console!
But launching via console means, i have to keep a command prompt window open!
Using CHP, i can easily create a hidden command prompt process as follows:
###########################
bhide.bat - Example to launch boinc console using CHP (Create Hidden Process)

CHP cmd.exe /c ""d:\User Profiles\skatdare\boinc.bat""
exit
###########################

###########################
boinc.bat - Example to launch boinc console (sub-batch file call)

cd\
cd pro*
cd boinc
boinc

##############################

So download Create Hidden Process from here!

NirCmd is an advanced command line tool which allows us to do lots of things without showing any user interface.
More detailed documentation for NirCmd is available here..
Download NirCmd from here!

So enjoy Hiding command prompts :-)

Keywords: batch file,batch file command,batch files,batch files command,batch files prompt,cmd,cmd command,cmd exe,cmd32,command exe,command prompt,command prompt commands,command promt,command windows xp,dos command,dos commands,dos prompt,j5,j7,j70,msdos prompt,windows 2000,command,windows command prompt,windows prompt,windows xp prompt,z5,z7