Wednesday, October 29, 2008

Dynamic Converter

Dynamic Conveter (DC) is the poster boy of UCM product suite. This is one feature that can clinch any WCM deals in its favour. This is Oracles trump card. Ok... enough of bragging lets see what DC can actually accomplish.
For starters you can configure DC to your content regions and drive the contents of the webpage through Word Documents. We can go a step further and run your complete website through word documents without compramising on branding. We can map the MS word styles to specific css look and feel. DC supports hosts of other document formats.
Below are the steps to configure DC to your website. Here are assumptions I make.
  • You already have Dynamic Converter installed.
  • You have created a primary layout page with a content region.
  • You have created a Dynamic Converter template.(Creating templates is a topic for another blog)

Once you have the above things in place here is what you need to do to see word documents as webpages.

Create Template Selection Rule.

  1. Login to Content Server
  2. Go to Administration --> Dynamic Converter Admin
  3. Give suitable name for the new rule.
  4. Create a critiria, this will be the case when this rule will be selected. Ex: Apply rules on content with Type News.
  5. Select a template, this will be applied to the document to retain the branding of your website.
  6. File extention should always be "hcst" DC inserts idoc scripts for the word documents while convertion. These would be executed before rendering as a webpage.
  7. Forced Convertion and Exclude from User Request is self explanatory. Althoug in my experience its better to uncheck Forced Convertion for performance resons.

Assign Selection Rule to Content Region

Now that you have a Template Selection Rule you have to assign this rule to the content regions in your layouts. Here is how you do this.

  1. Goto your layout page
  2. Double click on Content Region.
  3. Click on Settings.
  4. Slelect the radio button Use Single Rule Dynamic Conversion
  5. Choose the Template rule you have created.
  6. Click OK
    To see the magic of DC veiw your layout page is browser and get into contribution mode and select a word document.

UCM server Configuration Variables

Content management systems are just frameworks that can be customised to once CM needs. All business requirements can be put into different baskets like:
  • Out of the Box
  • Configuration or Settings Change
  • Customisation
If we need to do global configuration changes the best method is Configuration Variables. UCM has lot of config variables that can be used to change the behaviour of Content Server. These varibales should be put under Admin Server--> General Configuration --> Additional Configuration Variables.
Below are some of the variables and a short description of the behavioural changes that they bring to Content Server.
    1. AutoContributorAdvancesOnUnlock=true, AutoContributorAllowsReview=true these two config variables should be used when you want to trigger workflow process automaticlly when you add content through webdav folders.Content checked in using a WebDAV client enters the first autocontribution step of the workflow process. This requires the author to manually initiate the workflow by performing a check out / check in to force the item into the first defined step.
      2.DefaultAccounts=#none(R),#all(R): This configuration variable is used for annonymous access to SiteStudio websites running on Oracle Content Server outside DMZ. DefaultAccounts=#none(R) variable makes all content items checked in without any accounts readable for all users. DefaultAccount=#all(R) variable makes all content items checked in under any account readonly for all users.
        3.DisableSiteStudioContributor=true, Usual deployment architecture to have a dynamic SiteStudio site is you will have one contribution server inside the corporate network and clustered consumption servers in DMZ. Here we should disable any type of contribution capabilities. In that case we should use this config variable.
          4.AllowAllRedirectUrl=true, Lets look at this scenario. You have site studio website and a section of the website has an external URL as a primary layout page. When you do this and click on the link you will be first redirected to a standard page and there you have to click on the link to your final destination. By adding the config variable at the config.cfg file you will bypass this behaviour.

          This is not the end of this blog i will add more variables as and when i use them.

          Thursday, October 23, 2008

          Author Field in My Workflow Assigments

          OOTB UCM workflow application is very powerfull but lacks basic common sense features. One of them is the author field in the workflow queue table. When a reviewer checks in to look at the number of workitems in his queue there is no way he can see who modified the content.

          Here I have put the steps to add the author field for this page. I have followed the techniques given by Brain 'Bex' in his book. So in case you want to know more detail approach on customising the core services check out his book.

          Step1: Open the files workflow.htm and std_services.htm. We can find these under installdirectory/shared/config/resources. These will list the standard services provided and services that are used to implement workflows.

          Step2: (Assuming that we have at least one active workflow) Click on MyContentServer-->MyWorkflowAssignments. We will see Workflow in Queue page, here we see ContentID, Title,Enter Date, Last Action Date, and Actions columns for each work item in the queue.

          Step3:Do a mouse hover on All Active Workflows and you will see a similar URL -->http//ContentServer/instancename/idcplg?IdcService=GET_ACTIVE_WORKFLOWS. The resultset for GET_ACTIVE_WORKFLOWS service is all the active workflows in the content server. Search for this service in services_refrence guide you will see the that the response template is WORKFLOW_LIST. Our first instinct will lead us to experiment with this. But if we see the other templates using these and do a intelligent guess we will stumble on WF_INQUEUE_LIST (workflow_queue.htm). Also you will see the refrence to this page in the URL of My workflow assignments page.

          Step4: You will find workflow_queue.htm page in installDirectory/server/shared/config/templates. Open this page in a editor and add sample html code. Refresh content server page. You will see Testing at the end of the page. Incase you do not see any changes then, clear browser cache and refresh. Restart content server. Restart machine. If still you do not see the changes then you need to see other places where workflow_queue.htm is available. If you have a core update installed than go edit the page you will find inside the core update.

          Step5:Now double click on workflow_queue.htm you will see the dynamic html resource used to build this page. You will see workflow_in_queue_table is an include. Now go to std_page_workflow.htm found under installDirectory/server/shared/config/resources and search for workflow_in_queue_table. Here we see that this inturn executes setup_workflow_in_queue_table_header.

          Step6: Find for setup_workflow_in_queue_table_header and add below lines. dDocName column properties. <$exec rsAppendNewRow("ColumnProperties")$> <$exec setValue("ColumnProperties", "id", "dDocAuthor")$> <$exec setValue("ColumnProperties", "width", "auto")$> <$exec setValue("ColumnProperties", "headerLabel", "wwdDocAuthor")$> <$fieldName = "dDocAuthor"$> <$exec setValue("ColumnProperties", "headerURL", strTrimWs(inc("workflow_in_queue_header_resort_url")))$> <$exec setValue("ColumnProperties", "rowAlign", "left")$>This will add Author column in your content server page.Do a refresh to see the changes. Again make sure you are changing the file at the right place.

          Step7: Above step will add the Author coulumn, to get the document author name for each document in the workflow do the following change.Add below line inside setup_workflow_in_queue_table_row dhtml<$exec setValue("RowData", "dDocAuthor", "<$if dDocAuthor$><$dDocAuthor$><$else$><$lc(\"wwNoRevisionCheckedIn\")$><$endif$>")$>.

          On refresh you will the Author field of each document in your work queue.

          Thursday, October 16, 2008

          WebDAV and OracleUCM

          What is WebDAV?

          Wikipedia defines WebDAV as "Web-based Distributed Authoring and Versioning, or WebDAV, is a set of extensions to the Hypertext Transfer Protocol (HTTP) that allows users to collaboratively edit and manage files on remote World Wide Web servers. The group of developers responsible for these extensions was also known by the same name and was a working group of the Internet Engineering Task Force (IETF)."
          Why is this intresting?
          Jason stortz has an interesting story for WebDAV. This feature is provided by most content management system worth its salt. WebDAV allows users to look at there content repository using there windows explorer. Pleople can edit content items without going through the actual steps of:
          1. log in
          2. checkout
          3. edit
          4. check in.

          We can build basic content management rules like who can see what? can be applied. To use WebDAV feature with Oracle UCM we need to install two components Folders and WebDAV(I donot know why this is optional, I believe this should be part of core feature). Installing and configuring is fairly simple. One thing to take care is to give a strong password for the cokie. Below are the steps which shows how to add it to your network folder.

          1. Go to Start --> Click on My Network Places
          2. Click Add a network place. (This will launch Add Network Place Wizard)
          3. Click Next
          4. Click Next
          5. Click Next
          6. In the internet or Network Address text box enter http:/yourServerName/yourServerInstanceName/idcplg/webdav
          7. Click Next
          8. Give a suitable name to this network location.
          9. Click Next
          10. This will prompt you for the username and Password
          11. Now you will see the folders created in the Content Server

          Make sure that content server is up and running while configuring WebDAV.

          You should have at least read access on the server else you will not see any folders.

          You should have installed Folders and WebDav components in your content server.