Friday, 6 April 2012

Installing Groovy plugin in Eclipse



1. find out eclipse version:

go to Help->AboutEclipse-> Installation Details (this button may not be present on all versions).
if it is present click on it. Go to Installed Software Tab and expand the tree, the child Eclipse Platform
gives the version number.

2. For manually installing Groovy Plugin, go to :

http://groovy.codehaus.org/Groovy-Eclipse+2.6.1+New+and+Noteworthy

and download the zip file compatible with your version of eclipse.

3. Open eclipse and go to Help->Install New Software
    Provide the path where downloaded zip file resides. give some name to the name text box.
   choose Required components and click ok. If it fails try unchecking optional component and try again.



Eclipse restart will be required for the install to take effect.

Note: do not try to copy unzipped files to eclipse Plugin or Dropin folder, it no longer works.
4. Create a Groovy Project as specified here:

http://groovy.codehaus.org/Eclipse+Plugin








Sunday, 25 March 2012

Currencies

Here is the difference between document currency, local currency and global currencies:

1. Document Currency: is the currency in which actual transaction takes place. for e.g. if Apple buys hardware components from China the transaction will happen in Yuan Renminbi. so it becomes the document currency.

2. Local Currency: is the currency in which in a business unit closes its financial books. For e.g if Hyundai's manufacturing plant is in India and it orders parts from China, then the local currency of the transaction is INR while document currency is Yuan Renminbi.
Local currency is useful in cases where each business unit generates its own report in local currency.

3. Global Currency: is enterprise wide currency


Exchange Rate Types:


Saturday, 10 March 2012

KM Research


ODI install comes with a set of xml files located at

ODI_HOME\oracledi\xml-reference

This location contains all the KMs that come bundled with ODI install, in the form of xml files.
Before using a KM in ODI the user has to explicitly import the appropriate KM from this location.

KMs are classified on the basis of tasks they perform.
KMs consist of steps, which are executed serially one after another. This modularizes the tasks performed
by a KM into small pieces each running independently of the other and preparing metadata for the next step.

A step usually consist of Substitution APIs which are java methods within single object instance odiRef. Substitution APIs
always return string. The same method returns different values based on the type of KM that invokes it.
snpRef and odiRef object instances are synonymous. snpRef object instance is the legacy syntax.
snpRef.<method> is supported but deprecated. (as oracle acquired sunopsis, snpRef was changed to odiRef)

Note: java code is invoked in tag <%=java_expression %>
The java_expression returns a string. The tag <%= %> distinguishes java code from rest of the code.


Flexfieds: flexfields are user defined fields and are added to customize properties of ODI objects.
Not all objects support flexfields(the ones which do not have flexfield tab do not support it).
Object properties can be accessed through ODI Substitution APIs. While accessing ODI object properties through
substitution APIs in KM steps when the flexfield CODE is specified replaces the CODE by the flexfield value for the object instance.
It is also possible to access the value of a flexfield through the method getFlexFieldValue().

Question: What is the difference between KM Options and Flexfields?
Answer: Apparently KM Options are set at the KM level. Whereas the flexfield is for an individual object instance.
research it further.

In order to understand the concept of Action Call Methods it is important to understand the terms:

Action, Action Line Code and Action Lines

It is important to understand the concept of Actions in ODI. An action represents one DDL command.
for e.g. Create table, Drop Table.  It is used to generate a ddl procedure(read script) that can be run on a
dataserver, to reflect the changes made to models in odi. An action can contain several Action Lines,
an Action Line can be defined as the sub commands required to perform a ddl operation. For e.g. dropping
a table requires dropping its constraints first.

Go to Topology Manger, the last navigator is Generic Actions, expand it, it lists all the generic actions available.
double click on action Create Table  :


click on dropdown in front of Type following type of actions can be seen:
Add
Begin
Modify
Create
Disable
Drop
Enable
End
Rename
Transfer



On the l.h.s the Action Lines are listed



The same Action Lines can also be seen by clicking on Details tab.
Click on any of the Action Lines, say Create Table, the code(Action Text) for that line can be seen:

This code can be edited by clicking on the Pencil button:


Note that for an action text both the Action Calls and odiRef methods are available. 

An Action Line has following properties:

Ignore Errors: select if you want to ignore errors when this command fails. for e.g dropping an non-existent table can be ignored. 
Commit: select if a commit is to be issued at the end of the command. 
Log level
Isolation level: odi help for details on this.
Transaction: Commands can be executed on several transactions numbered 0 to 9, otherwise choose Autocommit to work 
off-transaction.

Action group: Actions are organized into Action Groups. An Action Group corresponds to a given Syntax(Oracle, DB2 and so on).


Coming back to Action Calls Method,  the Action Call methods are usable only in Action Lines.  While Substitution APIs return text string, Action Call methods generate actions based on Context. As an e.g. in Create Table, the Action Line Add Primary Key has Action Call method  <% snpRef.addPK(); %> which generates add primary key action for each column defined as PK for current table. 

There should be only one Action Call method in an Action Line
there can't be more than one Action Call method in a Action Line:
for e.g in Action Create Table we've following 

<Only_One_Action_Call_In_A_Action_Line.bmp>

The syntax for calling the action call method is :

<% odiRef.method_name(); %>

Note: the Action Call method must be alone in an Action Line, should have no preceding = and should end with a semo colon













Friday, 17 February 2012

JAVA DECOMPILER

It's good to be detail oriented  when one works in technology. 
I was exploring ODI sdk and was curious to know how one of the plugins for ODI was written. 
I was looking for a decompiler which could decompile a  .class(bytecode) file into native java code. 
One of the decompiler plugin for java ide Eclipse is available at SourceForge.net. 
For decompiling .class file to .java one needs:

1.  A plugin(JadClipse) for Eclipse which is available at  sourceforge.net for download:   here
2.  The JAD executable available here

3. copy 1 to to plugins folder of Eclipse install. 
4. place 2( JAD executable) to a location (say c:\jad_home\) and set it in the PATH environment variable. 
or 

Go to Eclipse->Window->Preferences->Java->JadClipse and set the "Path to decompiler" as the place where JAD.exe exists.




Note: if you don't see Eclipse->Window->Preferences->Java->JadClipse it means the JadClipse plugin is not installed correctly. 

5. A restart of Eclipse is required after the configuration. 

6. Add the .jar file containing the classes to be reverse engineered to a project as external library
  select a project->Right click->Build Path-> Configure Build Path opens below dialog box:


7. Once the .jar file is added to the project. Select a class file on the Project explorer by expanding Referenced Libraries and any .jar file within it and then select a .class file. Press F3 to see the decompiled java code of the .class file selected. 

Alternatively by placing the cursor on a Java class name in the right side code window and pressing F3 also displays the decompiled java code of the class selected!








Thursday, 12 January 2012

SIEBEL

following are the main entities in siebel:

Party
Accounts
Contacts
Service Requests
Activities


Party model was a new concept in siebel 7.x.