Showing posts with label BLOG. Show all posts
Showing posts with label BLOG. Show all posts

Friday, March 20, 2009

BP - Normal, Heart Beat - Normal. Rx - Run (Diagnostic report) frequently


Diagnostic Framework part of Oracle AIA Foundation Pack provides tools that help in maintaining the system. Diagnostic Framework provides information like which BPEL processes, ESB, Schemas got customized, Which schemas got extended, what custom directories got created, integrity of the config files, whether BPEL-ESB communication is working, JMS is working, custom XPATHs are working as desired & more.

Adding Custom Diagnostic tests
Beauty of the framework is that it allows you to add your own custom diagnostic tests with ease. For instance, if we want to add DBCheck test to the AIA FP Diagnostic framework, all we need to do is

1) Create our own Java code by implementing IAIADiagnostics interface. Sample code should look like this

package oracle.apps.aia.core.diagnostics.tests;

import java.util.Date;
import java.util.HashMap;
import oracle.apps.aia.core.diagnostics.IAIADiagnostics;
import oracle.apps.aia.core.diagnostics.util.DiagnosticsUtil;
import oracle.apps.aia.core.diagnostics.util.GetPatchesApplied;
import java.sql.*;

public class DBCheck implements IAIADiagnostics{
public DBCheck() { }
public String[] run(HashMap params) {

String testResult[] = executeTest(params);
return testResult; }
public String[] runBatch(HashMap params) {

String testResult[] = executeTest(params);
return testResult; }
private String[] executeTest(HashMap params) {
[[Insert Code Here]]
String testResult[] = {result.toString(), error.toString(), resultflag};
return testResult;
}
}
2) Compile the class and place it under ORACLE_HOME\bpel\system\classes and the appropriate package folder (in this case oracle\apps\aia\core\diagnostics\tests)
3) Add the below entry to AIADiagnosticsConfig.XML under
AIA_HOME\diagnostics\config
oracle.apps.aia.core.diagnostics.tests.DBCheck
4) Create the batch script by making a copy of the existing batch files under
AIA_HOME\diagnostics\bin and making the following change
set TEST_NAME=DBCheck
5) Execute the batch script

Ramesh Chandra Revuru

Thursday, March 19, 2009

Developer Tools in AIA FP - Part 3

AIA Artifacts Generator

1) What is the tool?
Artifacts Generator is a utility script that would help generate much of the common code needed to create the ABC service implementation in BPEL. It would generate the artifacts as a BPEL project that can be easily opened, viewed and enhanced from the Jdeveloper studio. It generates artifacts like WSDL, transformation, project file & deployment descriptor.

2) Where to find?
The tool can be found under
AIA_HOME\Developer Tools\ AIAArtifactsGenerators


3) How to Execute?

  • Open a command window and navigate to the above location
  • Validate that the JDK is set to jdk 1.5 or above. If not, set the path
  • Validate the ant version is 1.6 or above by executing ant -version
  • Modify the build.properties file as below. Give the file for the input.xml where all the description of the bpel process is defined. In this case we have uncommented the below line
    ABCSConfig.inputXML=Requestor_SyncReqResp.xml
    Requestor_SyncReqResp.xml is available under AIA_HOME\Developer Tools\ AIAArtifactsGenerators\ AIAServiceGenerator\input Run the ant by the following script from the folder AIA_HOME\Developer Tools\ AIAArtifactsGenerators\Ant buildBPEL
  • The artifacts would be generated in the output folder as given in the build.properties
    Open the JDeveloper Studio and create a new project and add the above output folder to the project source code.
The new bpel project generated by the above script can be opened, viewed and further enhanced and then deployed to the corresponding server

4) Post Execute Steps
  • Rearrange service invocations, if necessary
  • Complete the business payload transformation
  • Configure the correlation properties for asynchronous application service invocation
  • Create invocations for other operations when a service is called multiple times
  • Alter deployment descriptor properties in the bpel.xml file
  • Alter policies in the fault policy
  • Alter properties in the configuration properties file snippet and add it to your properties
Binoy Gopinathan
Sierra Atlantic