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\"");
      response.setContentType("application/x-download");
      OutputStream out = response.getOutputStream();
      JasperExportManager.exportReportToPdfStream(jasperPrint, out);
      context.responseComplete();

This is not working if you are using ADF Taskflow and gives the exception java.net.ProtocolException: 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"
      id="cil2">
            <af:fileDownloadActionListener contentType="application/x-download"
            filename="print.pdf"
            method="#{backingBeanScope.MyBean.downlaodReport}"/>
      </af:commandImageLink>


      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.

Monday, December 20, 2010

Collections in UCM 11g

I have noticed that Collections/Folders in UCM 11g release had some changes. One of them is using randomly auto-generated IDs for folders, even for Contribution Folders. I know some guys did integrations using collections database table, which will cause some issues for them. For example if they are depending on using IDs on your development environment then you moved to production, for sure IDs will be totally different.

So how to retrieve Folders under Contribution Folders, without depending on IDs, the answer is using COLLECTION_DISPLAY service with the following parameters:

<$dCollectionPath="/Contribution Folders/"$>
<$hasCollectionPath=1$>
<$executeService("COLLECTION_DISPLAY")$>

Notice hasCollectionPath took value equal 1 which means true in IdocScript.

Adding profiles to COLLECTION_DISPLAY template

I have a requirement to allow users to check-in files inside folders according to a chosen profile, this will not be done from WebDAV it will be from the UCM Web Interface.


So in this case we need to customize with COLLECTION_DISPLAY template or resources used inside it.

After investigations I found that I need to customize the two resources collection_explore_menus, and new_content_form

For example I created a new profile called Processes, and I want to add it as a link under New Content link. In the first resource collection_explore_menus we will add the following at the end of the resource

FOLDER_EXPL_NEW_CONTENT_Processes,  FOLDER_EXPL_NEW_ITEM,     70,        wwArchiveProcesses,    javascript:document.newcontentformProcesses.submit(),

Where

id            = FOLDER_EXPL_NEW_CONTENT_Processes
parentId  = FOLDER_EXPL_NEW_ITEM
labelKey = wwArchiveProcesses
href        = javascript:document.newcontentformProcesses.submit()

Then as you noticed we are firing Submit action for a HTML form called newcontentformProcesses which has to be created by us and here comes the role of the next resource new_content_form, so will add the following to the resource and after the first HRML form there

<form action="<$HttpCgiPath$>" method="GET" name="newcontentformProcesses">

<input name="IdcService" type="hidden" value="CHECKIN_NEW_FORM" />
<input name="<$collectionIDMeta$>" type="hidden" value="<$dCollectionID$>" />
<input name="xIdcProfile" type="hidden" value="wwArchiveProcesses" />

</form>

Notice the hidden field xIdcProfile which is the profile trigger metadata field.

I hope this post will be helpful