Wednesday, November 16, 2011

Modify UCM Workflow History

If you want to generate reports on Workflow, you may noticed two tables in UCM schema called DocumentHistory and WorkflowHistory. Both of them audits and saves all actions  done.

But those tables have few fields, notice DocumentHistory table
What if we want to add new fields to to the history, why? because I want to track changes on some custom fields and report them, another example if I want to track updates done on metadata fields using "Update" action.

Good news UCM is great, we can add our custom fields to the table (simply by modifying table structure), like adding xComments

At the end we can overwrite UCM query that inserts to the table actions' history. So we will modify IdocHistory, as the following

<tr> <td>IdocHistory</td> <td>INSERT INTO DocumentHistory (dActionMillis, dActionDate, dID, dRevClassID, dUser, dDocName, dAction, dSecurityGroup, xComments) values(?, ?, ?, ?, ?, ?, ?, ?, ?)</td> <td>dActionMillis int dActionDate date dID int dRevClassID int dUser varchar dDocName varchar dAction varchar dSecurityGroup varchar xComments varchar</td> </tr>

Tuesday, November 8, 2011

Senior Oracle ECM Consultants required for ME

I have several openings for Oracle ECM consultants, the openings are with a couple of companies. The required resources should have good experience with Oracle ECM for three years at least, and preferable to be based on Saudi Arabia (Having Visa there is a big plus), Jordan, Egypt, and Kuwait.

Send to me you resume, so that I will forward it to the companies. My email is (note most likely I am not the interviewer, I am just broker :) ).

If you are talented fresh graduate (I mean you have done something interesting) either your experience in ECM or other FMW products, send your resume too you are most welcomed.

Saturday, October 22, 2011

Modify Workflow Popup

Recently I got requirement to modify workflow popup menu according to certain conditions

The following explains how simply to do that:

  • Go to the following directory <middleware_home>/Oracle_ECM1/ucm/idc/resources/core/idoc
  • In that directory, we have two interesting files that contains most of resource includes that we desire to customize std_page.idocstd_workflow.idoc
  • As per our requirement of customizing Workflow related feature so our target will be std_workflow.idoc, inside it you will find an include called setup_workflow_action_popups
  • I will assume you will be able to create a new component, and add a resource file to it, then inside that resource file copy and past the include setup_workflow_action_popups from std_workflow.idoc as is.
  • Now lets take a look at the include
You will find there repeating parts in the include everyone is representing an item in the popup menu.

<$exec rsAppendNewRow("PopupProps")$>

<$exec setValue("PopupProps", "label", lc(""))$>

<$exec setValue("PopupProps", "function", "")$>
<$exec setValue("PopupProps", "ifClause", "")$>

<$exec setValue("PopupProps", "class", "workflow")$>
<$exec setValue("PopupProps", "id", "")$>

id: unique i for the popup menu item
class: will be always workflow
function: either a link location or javascript calls. The link may be composited by idoc script
label: localized display label for the popup menu item
ifClause: Which is the amazing feature, it is the condition for displaying the menu item and it can be something like dDocType like 'Correspondence' and of course you can make use of the existing conditions like AllowReviewAllowCheckin 

Here is an example of a new item I added

<$exec rsAppendNewRow("PopupProps")$>

<$exec setValue("PopupProps", "label", lc("wwUpdateAndApprove"))$>

<$exec setValue("PopupProps", "function", "<$HttpCgiPath$&>IdcService=GET_UPDATE_FORM&dDocType=Correspondence&dID=<$dID$>&dDocName=<$url(dDocName)$>&idcToken=<$idcToken$>")$>
<$exec setValue("PopupProps", "ifClause", "dDocType like 'Correspondence'")$>
<$exec setValue("PopupProps", "class", "workflow")$>
<$exec setValue("PopupProps", "id", "workflowUpdateAndApprove")$>

The two resource file std_page.idoc & std_workflow.idoc will make you very powerful, don't miss them and don't give up until you find your needs.

Thursday, October 6, 2011

Oracle Public Cloud

Did you see this website before

The interesting part for me is building your custom business application over Oracle Public Cloud, which will be stable and easy to configure and highly available. Customers in Middle East will take time to accept Public Cloud over building their own Private Cloud which is a correct decision for specific decisions.

May be hosting Website built using web content s or some kind of portals there will be applicable.

Friday, September 16, 2011

Solved password reset for UCM 11g

Today I returned to the password reset issue in UCM 11g, and I solved it by creating a custom component. Just less than 27 line of code solved it !!! till now I wonder why Oracle missed that.

Anyway I want to share it with you in case you faced the same problem and you were looking for a solution.

I will assume you know how to create a custom service, and in case if you don't know refer to The Definitive Guide to Stellent Oracle Content Server for Bex Huff.

1- Create a custom component using Component Wizard

2- Create a java class and make this class extends UserService

3- Add the following method to the class

public void resetPassword() throws Exception {
      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
      env.put(Context.PROVIDER_URL, "ldap://localhost:7001/dc=my_domain");
      env.put(Context.SECURITY_AUTHENTICATION, "simple");
      env.put(Context.SECURITY_PRINCIPAL, "cn=Admin");
      env.put(Context.SECURITY_CREDENTIALS, "weblogic1");
      DirContext ctx = new InitialDirContext(env);
      ModificationItem[] mods = new ModificationItem[1];
      Attribute mod0 = new BasicAttribute("userpassword", m_binder.getLocal("dPassword"));
      mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, mod0);
      ctx.modifyAttributes("uid=sysadmin,ou=people,ou=myrealm", mods);

3- Modify the existing service EDIT_USER_PROFILE (by the Component Wizard)
-Change service class to the newly created class by you (don't forget package name)
-Then add new action which is of type java method and refers to our newly created method resetPassword
-Order actions so that resetPassword be before storeUserDatabaseProfileData

At the end restart and test. One last thing from inside weblogic administration console, you need to change embedded ldap credential and be sure it is configured correctly.

Wednesday, September 7, 2011

UCM users cannot reset their passwords!!!

I had an issue that I was trying to avoid, until I worked in a project that needs it. I cannot imagine how Oracle guys missed it, USERS CANNOT RESET THEIR PASSWORDS.

I don't care about how the new UCM has been structured, Users must have the ability to change their passwords. Guys most of the time LDAPS are only used as a repository (it is database) and users are not accessing them, that's beside a lot of customers doesn't have LDAP to work with or integration is not part of the scope.

Do you think this is a minor issue or not an issue at all?

At the end I want to thank Raj from Oracle support for his support.

Tuesday, August 23, 2011

Go Go Google :)

I was browsing google application engine features where I am thinking in hosting a website there. You may don't know that a free account can use up to 1 GB of storage and up to 5 million page views a month.

Anyway I found something else interesting which is Go programming language, it is a new one owned by google and is very interesting and promising. I have quoted the following:

"Compiled Go code runs at close to the speed of C"

"Compilation happens almost instantly"

"Existing languages haven't been optimized for multi-core processors or massive scaling." "One of our goals in Go was to make a language that could use those processors well, particularly for the kind of server-side programming that we do here at Google where you have many client requests coming into a machine that's multiplexing them. And Go is a really good language for writing multiplex servers in, where you use these things called 'go' routines, which are kind of like threads but lighter-weight, and some communication primitives to do the multiplexing"

"Go is appropriate for a broad spectrum of uses, including Web programming, mobile programming and systems programming"


Nice Name but the question is: What are google's plans for GO?

Monday, July 11, 2011

Packt Offer for Oracle books

is offering the following discounts:

  • 20% off all Oracle print books
  • 30% off all Oracle eBooks
That's because their celebration  for the publication of its 50th  Oracle book

Here is the campaign like if you are interested

For me I am waiting a new book about Oracle Identity Management

Sunday, July 10, 2011

CouchDB: Document Based Database

Did you notice that screenshot, we have something like metadata here !!!

A friend of mine (Amr Gawish) told me today about a new database engine project which I found interesting, it is called CouchDB which is a document oriented database. It is about semi-structured content as I read from Apache (for me it is about unstructured content) which manages and stores documents.

The interesting part about CouchDB is that you can use JSON and AJAX to work with database, so Google Web Toolkit will fit here too :D

The important questions, is that which future waits CouchDB? Is it practical?

Google Web Toolkit with UCM

Started development using Google Web Toolkit which in my opinion will be one of the major development tools for enterprise applications.

Let me explain from Oracle UCM point of view, in UCM services can be consumed using JSON that's by adding IsJson=1 at end of the URL, even if you created custom services you can consume them using JSON too. Now using GWT you can build your vertical solution which calls UCM services and display results and takes actions. In that way you will gain great benefits, like concentrating on user interface, build easy to use application, and lightweight too which will attract customers.

I recommend you to take a look and consider it seriously as another point of view for development.

Sunday, May 22, 2011

Active Directory Notes

I was working on integration on Active Directory with Oracle UCM 11g and I have the following notes that may be helpful:

- Change DefaultAuthenticator's Control Flag from REQUIRED to SUFFICIENT

- We are not using Oracle UCM LDAP Providers for integration with Active Directory anymore

- Users mapping between Oracle UCM and Weblogic embedded LDAP is done using JpsUserProvider provider

- In Oracle UCM 11g, you can give default roles and accounts for authenticated users, to do that from Oracle UCM Providers page edit a provider called JpsUserProvider and in Default Network Roles field add the default roles separated with commas, for default accounts use Default Network Accounts field

- Any weblogic ldap user assigned to administrators group, he will have Oracle UCM admin role

Saturday, April 23, 2011

Starting Weblogic Admin Server and Node Manager as background service

The following steps explains how to start Weblogic Node Manager and Admin Server automatically with Linux OS (Redhat in my case):

- Create file under


- Add to the file the following entries


- Create a file called wlsndm under


- Add to the file the following

# wlsndm startup script for node manager
# chkconfig: - 74 15
# description: weblogic
# processname: WLSNDM

# Source function library
. /etc/rc.d/init.d/functions

start() {
echo -n $"Starting $prog: "
nohup su - oracle -c /wlserver_10.3/server/bin/ > /wlserver_10.3/server/bin/wlsnd.log &
echo "OK"

case "$1" in
echo $"Usage: $prog {start}"
exit 1

exit 1

- Create a file called wlsadmin under


- Add to the file the following

# wlsadmin startup script for node manager
# chkconfig: - 75 15
# description: weblogic
# processname: WLSADMIN

# Source function library
. /etc/rc.d/init.d/functions

start() {
echo -n $"Starting $prog: "
nohup su - oracle -c /user_projects/domains/my_domain/bin/ > /user_projects/domains/my_domain/servers/AdminServer/logs/wlsa.log &
echo "OK"

case "$1" in
echo $"Usage: $prog {start}"
exit 1

exit 1

- Create the following symbolic links under /etc/rc5.d/

ln -s /etc/init.d/wlsndm S74NodeManager
ln -s /etc/init.d/wlsadmin S75Weblogic

- then Create background services

chkconfig --add wlsadmin
chkconfig --add wlsndm

- Activate the created background services

chkconfig wlsadmin on
chkconfig wlsndm on

Now we have finished creation of background service, and you can start UCM or any other Managed Server from Admin Server Console. Using the same approach you can start UCM automatically.

Using UCM11g Logout With Site Studio

As most of us remember in Oracle UCM 10g, logout was not there by default. In UCM 11g Oracle has added logout to be there by default.

Also it is noticed there is new Service (LOGOUT) added to UCM 11g for logout and that service make use of redirect template.

What if you want to secure parts of a website designed by Site Studio using Oracle UCM security (may be it is intranet and you want to add security to HR section). Definitely UCM security will be used on a section and/or a layout, however you will need to add logout, and you want logout to redirect you to some page like home page or login screen.

To do that create your logout link like below

<a style="text-decoration:none " href='/cs/idcplg?IdcService=LOGOUT&RedirectUrl=%2Fmywebsite%2Findex.htm'>Logout</a>

Tuesday, March 8, 2011

Removing Subscribe and Unsubscribe from DOC_INFO template

Someone called Anonymous :D has commented from days on one of my posts asking me how to remove subscribe and unsubscribe menu items.

To do that will need to modify a resource include called docinfo_menus_setup.

Simply follow these steps if you are not familiar with Oracle UCM ComponentsWizard utility
- Open ComponentWizard utility
- Add new component, choose a name you want
- Add new Resource of type HTML Include/String 
- Inside in the new resource file, select an existing resource include called docinfo_menus_setup
- Do your modifications on the code inside the chosen include, enable the component, and restart the server.

I hope it is helpful for you Anonymous

Saturday, February 12, 2011

Proud Egyptian

Finally I am breathing freedom, and I am proud to say "I am Egyptian"

I miss you my country

Sunday, February 6, 2011

Oracle UCM Benchmarking

Oracle says "The 11g version of UCM was enhanced to enable exceptional performance even when dealing with extremely large volumes of content, including ingestion rates of over one hundred million content items per day."

I have found a white paper from Oracle which can give us a sample benchmark for Oracle UCM, which is helpful for us in expecting UCM performance:

Those results are based on a physical machine with specification 2 CPU 2.33 GHz Xeon®, 16 GB RAM, and as we know processing power is matters and affecting both of performance and license cost.

Thursday, January 13, 2011

2010 & 2011

I don't have much things to say about my blog in 2010, where I didn't make what I planned for in 2010, but I'd like to take the chance to give special thanks for two guys 
- Bex Huff who made my mind about Oracle UCM by his blog posts (which is now less than before), his components, and the two books he wrote.
- John who helped me so much in some webcenter challenges I faced and his useful comments on my posts.

Last year I became freelance consultant, and in this new year I wish to get more project and establish my own business. Also I am planning to create my first social networking website.

Wednesday, January 5, 2011

Download Jasper Report in ADF format from with ADF Taskflow

I was working on JasperReports and I had a requirement to export those reports to Pdf format. Exporting reports to Pdf by using JasperReports API is straightforward, but download it with ADF may cause an issue if you are doing it inside ADF TaskFlow.

When I google for that I found most people are doing that using Response object by setting headers

      HttpServletResponse response =(HttpServletResponse) context.getExternalContext().getResponse();
      response.setHeader("Content-Disposition", "attachment;filename=\"print.pdf\"");
      OutputStream out = response.getOutputStream();
      JasperExportManager.exportReportToPdfStream(jasperPrint, out);

This is not working if you are using ADF Taskflow and gives the exception Didn't meet stated Content-Length, wrote: '0' bytes instead of stated....; but if you are calling it from within JSPX, it will work. So what we should do with ADF Taskflow? we will do the following

      <af:commandImageLink text="My PDF Download Link"
            <af:fileDownloadActionListener contentType="application/x-download"

      public void printReport(FacesContext facesContext, OutputStream out) {
            //Export to pdf code goes here
            out.close() //close the stream

I think the problem is from the way ADF TaskFlows is being rendered inside page. However best practice is to use what ADF offers which - for downloading files in this case- is  fileDownloadActionListenerOperation.