Sunday, December 11, 2011

Oracle UCM Java Filters

Filters are a way to add your own custom logic or java code to the content server to get the required behaviour.
As Bex explained in his book, Filters trigger the execution of custom code when specific events occur in content server, ex : validateStandard occurs during check-in .

In the following example i would use the very simple java filter, which generates the ContentID with a custom prefix [based on the ContentType value chosen during Check-in]. and we want to insert that logic during content check-in.

Steps to follow:
1. I would first create a custom component in ComponentWizard and name it AlterPrefix.
2. Write the logic to add a prefix the ContentID sequence with the content type.[use the idcserver.jar* file to properly compile and execute the java file ]
3. place the compiled '.class' file under 'classes' folder under custom component [AlterPrefix] Directory.
4. add the java class name and the filter where you want to execute your code.

1. Create a component in CompWizard as AlterPrefix.
2. Write the java code : [i used Eclipse IDE]


  2.a  Add the jar file idcserver.jar to the project
3. place the .class file under 'classes' folder
4. add the filter name to the component's glue file under 'Filters' result set section. filter name = 'preComputeDocName'




 enable the custom component in the UCM and restart the server.


Now Once you check-in a content in UCM , the above event is triggered during check-in and it looks into the component .hda file which has the filter preComputeDocName and also for the Location of the custom code to be executed - which is mentioned as - - alterprefix.CustomFilter.
eventually , following the java code , it takes the content type and prefixes as shown below

I check-in a content choosing the type as utilities:


 and the custom java filter add the prefix as shown below :





Hope this made a clear and simple example about adding a custom java code to content server using Filters.
personally , i feel that it takes equal effort to find and decide the right filter for the job as with the logic , depending on the requirement.

* You can find the idcserver.jar file at "Oracle\<Middleware>\Oracle_ECM1\ucm\idc\jlib" under your ucm installation directories

Saturday, September 24, 2011

Oracle ECM 11g Installation

Overview: 
There have been many changes done to the product in all aspects with the 11g release.
key things to note are :
ECM 11g  is running on top of WebLogic Server , that means there has been an architectural change.
Installation is a lot different than the previous 10g R3 Release.

before getting on and listing all the changes and benefits of 11g release , let's get straight on to the installation part.

Required Software : 
Database 11 gR2  - contains the database schema  [tables to hold the metadata info].
WebLogic Server 11 - WLS1035
RCU [Repository Creation Utility] - OFM_RCU_WIN_11.1.1.5.0 [helps creating ECM schema in database]
ECM  Suite11g [OFM_ECM_GENERIC_11.1.1.5.0].

Quick Overview on Installation steps :

 1. Install Database
2. Install WebLogic Server 10.3.4 (This step will create Middleware Home and WebLogic Home)
3. Create schema for ECM using RCU 11.1.1.4.
4. Install Enterprise Content Management (ECM) 11g – Installer will create binaries for UCM, IBR, IPM,       IRM and URM 
 (This step will create ORACLE_HOME for ECM or ECM_ORACLE_HOME . This step will also create  ORACLE_COMMON_HOME containing Fusion Middleware Control and Java Required Files (JRF))
5. Configure Enterprise Content Management (ECM) by running config.sh / cmd
(This step will   create Domain, Admin/Managed  Server for WebLogic and deploy ECM applications for above mentioned products).
6.  Post Installation steps.



Steps in detail. [for Windows]

1. Install database and save the SYSTEM user password for later use.

2. Install WebLogicServer :
     a) Click on WLS installable. >Click Next
     b) Choose 'Create a new Middleware Home'. choose middleware home directory [ex .  C:\Oracle\Middleware]    >Click Next
     c)Choose Install Type as 'Typical' >Click Next
     d)Choose Installation Directories  >Click Next     [ex. C:\Oracle\Middleware\wlserver_10.3]
     e)Check Installation Summary > Click Next and Done.

3. Run RCU - Repository Creation Utility.
     a) run     ..\..\RCUHome\BIN\rcu     from RCU software installable  folder    >Next
     b) select - Create. create and load component schema into a database   > Next
     c) Provide Database connection details and test connect
     d) Once all the pre-requisits are checked >Click Ok - Next
     e) Select the required components :
                        - keep the prefix as 'DEV' for ease of use
                        - Select/check the Enterprise Content Management and the rest nested within.
                        - note the schema owners for each of the selected component ex - DEV_OCS ,  DEV_ORAIRM etc      > Click Next - Ok

     f)Choose the schema password - Keep the same password for all schemas for convenience.
   
     g) Check details for each component , schema owner , temp space and Click Next

     h) Check for Summary and Click Create

4. Install ECM 11g:

      a) Go to ECM installable and click ‘setup’   >Next [optional step] >Next
      
        b) System Pre Requisites Check  > Next
    
      c)  Specify installation location.  [ex. C:\Oracle\Middleware ]
                                       [Oracle Home Directory defaults to 'Oracle_ECM1']  
                           > Next
      d) Check for Installation summary and click ‘Install’   

        e) Installation complete. Click next and Finish

5. Domain Configuration :

     a)  Go to  <middleware-home>/Oracle_ECM1/common/bin/config.cmd 

     b)   create a new Weblogic Domain

     c)   select / check the ucm products for which the domain is to be created.
               ex - Oracle U C M - Content Server , Oracle U RM etc ...
      d)  select the Domain name and its location
         ex - domain name = ecm_base
                domain location = C:\Oracle\Middleware\User_projects\domains
                Applicaiton locaiton = C:\Oracle\Middleware\User_projects\applications

     e) Configure Administrator Username and password

       f) select server start mode and JDK

      g) configure JDBC for each of the components 
                         - Component name 
                         - Schema owner 
                         - Database details 

  [ check carefully , might confuse a bit initially. click back and recheck credentials for each component and then test]

      h) test connections and click next     

     i)   check configuration summary and create.

    j)  create Domain and start admin server
 
 6. Post Installation Task : 
        Once the Admin Server is started [.. \user_projects\domains\'ecm_base'\bin\startWebLogic.cmd]
    a) start the UCM server as Manged Server from the Command Prompt  [.. \user_projects\domains\'ecm_base'\bin\(stop or start) startManagedWebLogic.cmd UCM_server1]  and enter.

    b) access UCM server entering the URL -  http://<hostname>:16200/cs/
   
    c) Default admin user created would be 'weblogic' and password as set during domain configuration.

For more details follow this link -  Oracle ECM Installation