Monday, December 6, 2010

Oracle Universal Content Management 11g and Oracle ADF/WebCenter 11g Integration

Every organization operates with different kind of documents. Oracle Forms systems usually store documents directly in database, using BFILE/BLOB format. It is hard to manage such content and publish it effectively. Oracle Fusion provides Oracle Universal Content Management (UCM) 11g product to store and manage unstructured data (documents, images, etc.). Today I will explain how to define Content Server connection from JDeveloper 11g and how to use WebCenter 11g ADF task flow to manage content stored in UCM repository.

You can download Oracle UCM 11g from OTN:


Sample application - UCMNewFolder.zip. This sample is typical ADF 11g application with WebCenter 11g support. Additionally it is using Oracle UCM 11g RIDC API, topic to be covered by future posts. There is no need to import RIDC API for WebCenter 11g UCM related ADF task flows. Its just my sample application is using advanced Oracle UCM 11g functionality (programmatic folder creation, removal and information retrieval) I will explain it in near future.

In order to compile provided sample application, you need to install RIDC library. This library can be found inside Oracle UCM 11g installation home - ORACLE_ECM/ucm/Distribution/RIDC/jdev:


Install this library as JDeveloper 11g extension - from local file:


New extension will be added:


RIDC library will be listed as JDeveloper 11g extension:


Now, when RIDC library was installed - we can compile sample application. Let me repeat - there is no need to install RIDC library, if you want to implement only WebCenter 11g ADF task flows related to UCM. However, sample application contains custom functionality, it requires RIDC library (next post topic).

Its time now to define Content Repository connection. This will enable us to use WebCenter 11g Document service (Oracle UCM 11g) ADF task flows:


There is developer guide for Oracle WebCenter 11g, it describes how to setup connections for Oracle UCM 11g from JDeveloper 11g environment - Integrating, Presenting, and Publishing Content. I will explain from my experience, what are the most popular options for Content Repository connection configuration. As you can see from Oracle WebCenter 11g developer guide, there are various RIDC Socket Types. There are two most common types - web and socket. You should keep in mind, when using web socket - it will not perform Identity Propagation and will not access secured Content Repository content. This means web socket is good for read-only public access. Let's check how it works. I will configure web socket connection:


For web socket, you need to specify URL of the Web Server Plugin, Admin Username and Password for Oracle UCM. Set this connection as primary, it will become default connection:


Before running application and testing defined connection, lets open Content Server admin console and check how content folders are defined there:


Under Contribution Folders we have our custom emplDocs folder. This folder was created by me, WebCenter 11g Document service ADF task flows are configured to point to this folder:



Folder is protected by HumanResources security group:


Now when I run sample application, with web socket configured for Content Repository connection, login is failing. Its because web socket is not allowed to perform Identity Propagation from ADF security context, Oracle UCM 11g server rejects anonymous access to protected folder (it would work if we would try to connect to public folder):


Let's change to socket connection and see how it will work. For socket connection, specify its type, server host and listener port (admin username and password are not needed). Keep in mind, Oracle UCM 11g Content Server needs to be configured to accept requests from WebLogic Server machine, otherwise socket connection will be rejected:


Now application is able to connect to protected folder and render WebCenter 11g Document service ADF task flow - Document Manager:


Document Manager WebCenter 11g ADF task flow provides different document management operations out of the box - file upload, download, removal, update and versioning. We can test it and try to upload a new file:


I will select image file:


File is successfully uploaded into protected folder and stored inside Content Repository - Oracle UCM 11g:


My next blog post will describe how to manage Oracle UCM 11g folder structure programmatically from Java code using RIDC library - create, remove and retrieve folder info.

22 comments:

  1. Oh...GREAT post Andrejus...
    very useful..congrats...!

    ReplyDelete
  2. Thanks Andrejus for this blog.

    Regards,
    Ramesh

    ReplyDelete
  3. Nice Post Andrejus.
    I wrote a similiar paper about webcenter and UCM integration in november:
    http://www.contribute.be/web/contribute/news/-/journal_content/56_INSTANCE_pdF5/10234/22321?redirect=%2Fweb%2F%2Fcontribute

    ReplyDelete
  4. Excellent info!!!

    Thank u very much

    ReplyDelete
  5. Hello,

    Can someone tell me if using the Content Server Data Control is it possible to specify a query text combining multiple metadata fields. for instance, get the documents where metadataX= A and metadataY=b?

    I tried using the keyword attribute of the component with no luck...

    thank you

    fwu

    ReplyDelete
  6. Hi,

    May be this post will help: http://andrejusb.blogspot.com/2010/12/oracle-ucm-11g-and-adf-data-control.html

    Andrejus

    ReplyDelete
  7. I have the JDeveloper 11.1.1.5.0, also I have the library oracle.ucm.ridc.jdev-11.1.1.zip from the Oracle IPM I do the same steps; but there is a option in the connection called Content Repository that I can't see it.. why? Is it version of Jdeveloper?

    ReplyDelete
  8. Very useful info Andrejus. Few questions here

    While uploading the content can we set the Start and Expiry date for the content (ex: .jpg file)

    Also depending type of region the content (images) should be uploaded so that when a user belong to that particular location logs in then the user should be able to see the respective content (images).

    Please let us know the steps for the above two requirements

    - PSN

    ReplyDelete
  9. 1. You can use UCM metadata fields to store your custom properties

    2. Probably you should store images into different folders, related to regions - its how you will be able to retrieve by region

    Andrejus

    ReplyDelete
  10. Hi Andrejus,

    Great Post!

    Just one request, is it possible for yout to create a blog that discusses integrating the UCM 11G with Webcenter Spaces?

    I am currently having a hard time on this case since most of the blogs that I am seeing involves only the Webcenter itself and connecting using JDeveloper.

    Thanks

    ReplyDelete
  11. Hi,

    Is it possible in your case to import custom ADF Task Flow with UCM into Spaces?

    Regards,
    Andrejus

    ReplyDelete
  12. Thanks Andrej for this blog post, just one question:

    ho can i configure Oracle UCM 11g Content Server to accept requests from Weblogic server machine ?!

    ReplyDelete
  13. Hi,

    UCM 11g is embedded by default into WebLogic, since 11g PS3. Additional hint might be useful: http://andrejusb.blogspot.com/2011/02/how-to-install-oracle-ecm-11g-ps3.html

    Andrejus

    ReplyDelete
  14. Hi,

    I wanted to know whether is it possible to deploy this application on a non UCM enabled weblogic server.
    My usecase is the UCM application deployed on the non UCM weblogic server in turn will talk to UCM content server running on a different weblogic server.

    Regards,

    ReplyDelete
  15. Yes, this is possible - non UCM server must be enabled with WebCenter. You can specify any address for UCM connection.

    Andrejus

    ReplyDelete
  16. Hello Andrejus,

    Thank you for this blog. I have a BMP project in which there are user tasks. I need to add "upload" option to these user tasks so users can upload documents to ucm server. How can we do this? I tried the ways you described but so far couldn't get the exact solution.

    And in the ucm side, i also need to create folders like you mentioned on your blog "http://andrejusb.blogspot.com/2010/12/oracle-ucm-11g-remote-intradoc-client.html".

    I know what i will ask you is maybe to much but i'll appreciate that if you can shoot a video about all these so this will be a perfect source for the newbies like me on Oracle Fusion Middleware.

    Thanks,
    Nurhak

    ReplyDelete
  17. This is interesting idea. I will think how to record such video and put it on my todo list.

    ReplyDelete
  18. Sorry for offtop guys. But I need some help. I am newly in ADF+UCM. So I try to run sample ADF using UCM task-flow. I created connection to UCM in Jdeveloper(it works and shows content), but when I deploy sample application into UCM server it fails and says:
    Weblogic Server Exception: weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: oracle.webcenter.framework, Specification-Version: 11.1.1, exact-match: false].
    Does in means, that ther's no such library on server? where can I get it. Else one sorry for offtop.

    ReplyDelete
  19. Hi,

    You need to install WebCenter extension in JDev. This error means - there is no WebCenter.

    Andrejus

    ReplyDelete
  20. Hi,

    I notice that for RIDC Socket Type you chosed "web" and "socket" and I know there are two other kinds, "socketssl" and "jaxws". When I use "jaxws" I specified the URL of the Web Server Plugin and JAX-WS Client Security Policy("oracle/wss_http_token_over_ssl_client_policy") with Server Security Policy configued also, I can't do the testing connection, sth like "your request not over SSL", can you help me?

    Thx,
    Quinn Wang

    ReplyDelete
  21. Hi,

    Can you share steps to do UCM connection using "jaxws". I am getting UnknownHostException when i do test connection?

    Thanks,
    Ravindra

    ReplyDelete