Customizing Workflow Forms

September 13, 2011 Comments off

Ever wanted to create a custom form with added metadata inside a workflow review? This post will show you how.  This topic has come up many times on the Oracle forums. Customizing the workflow form is not really that difficult. Below are the steps you will need to know in order to customize the workflow form.

1. Create a custom component called MyWorkflowComponent

2. Add a template which overrides WORKFLOW_REVIEW_FRAMES

3. Edit this template. Insert the following in the HTML head after this line <$include std_html_head_declarations$>


<$if dWfName like "MyWorkflow" and dWfStepName like "Data.Input"$>

   <$include my_workflow_custom_javascript$>

<$endif$>

This code checks the workflow name and step to see if they match what you want. This way you can customize the workflow form for different workflows.

Search for this line within the WORKFLOW_REVIEW_FRAMES template: <$include workflow_doc_action_forms$> There will be a </table> </td> right before this. Insert the following code before this this </table>:


<$if dWfName like "MyWorkflow" and dWfStepName like "Data.Input"$>

   <$include my_workflow_custom_forms$>

<$endif$>

Again we check to make sure this is the Workflow we want to customize. If so, we insert a custom include that we will be creating.

4. Within your component, create a Dynamic HTML resource file.

5. Edit this resource file.

Create a dynamic include for anything that should go within the HTML head (this example includes jQuery and jQueryUI.

<@dynamichtml my_workflow_custom_javascript@>
<script src="<$HttpRelativeWebRoot$>resources/CSXWorkflowEnhancements/jquery-1.4.4.min.js"></script>
<script src="<$HttpRelativeWebRoot$>resources/CSXWorkflowEnhancements/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript">
$(function(){
   $("a[href^='javascript:document.Approve_<$dID$>']").click(function() {
      $("input[name='xEmployeeID']").val($("input[id='xEmployeeID']").val());
 [[% Submit my form %]]

 $("#frm_medical").submit();

 return false;    });

});

<@end@> 

Notice the use of HttpRelativeWebRoot. When you use this, you will need to put these files within your weblayout directory. Use this blog post as a reference.

Now we will create the actual form that shows up below or Approve / Reject links.

<@dynamichtml my_workflow_custom_forms@>

<tr>

 <td style="padding-top:10px">

 <form id="frm_employee_info" method="POST" action="javascript:document.Approve_<$dID$>.submit();">

 <p><label for="xEmployeeID">Employee ID</label><input type="text" id="xEmployeeID" /></p>

 </form>

 </td>

</tr>

<@end@>

Notice the form POST action. This is where we hook into the Approve link. When someone clicks the Approve link, our form (frm_employee_info) will get submitted first. This is where we can do validation and if something is not correct we can return FALSE and stay on the page. For this blog post, we are simply going to copy the values from this form and put them in the hidden field (which we will create next) that actually gets submitted to Content Server. If our form submits fine, then we will submit the Content Server form.

Create a dynamic include that overrides workflow_doc_approve_special_parameters. Within this include, we need to place HTML input elements that will get populated from or forms above.

<@dynamichtml workflow_doc_approve_special_parameters@>

<$include super.workflow_doc_approve_special_parameters$>

 <input type="hidden" name="xEmployeeID" value="" />

<@end@>

It may look like a lot of code, but it is not too much work. Have any tips or tricks to making your own custom forms? Send them to tips@corecontentonly.com.

Categories: OracleUCM

Oracle Database Express Edition 11g Release 2

September 12, 2011 Comments off

Oracle has recently (September 2011) released Oracle Database Express Edition 11g Release 2 (Oracle Database XE).  This is an entry-level database based on the Oracle Database 11g Release 2 that has a small-footprint.  It’s free to “develop, deploy, and distribute”.  It is also fast to download and simple to install.

Download Page

Documentation

The default character set used during installation and setup is AL32UTF8, which is perfect for use with WebCenter Content development machines!

Oracle XE 11g also supports Oracle Text.

Categories: Uncategorized

Setting up YUM on OEL

September 9, 2011 Comments off
Oracle provides a public YUM repository for OEL. The repository contains OEL 4, 5 and 6 releases, and relevant updates and add-ons.

This yum server only offers the packages already provided on the Oracle Linux and Oracle installation media. To access security updates and other patches or enhancements, you should use Unbreakable Linux Network (ULN).

Below are a few simple steps to setting up Oracle’s public repository:
To add OEL 5 update 5 repositories, for example (as root):
1. cd /etc/yum.repos.d
3. edit the generated *.repo file:
– Set the enabled flag to ’1′ for each repository needed (probably update 5 for most uses)
- You can use ‘ed’ (ed <filename>.repo) and do a “s/0/1/” to replace the relevant zeros with ones.
A few simple steps and you should be on your way with ‘yum’ and Oracle’s public repository.
This repository is provided by Oracle for free and comes with no support.
For support, you can visit the Oracle Technology Network Linux Forum.
Categories: OracleLinux

Java Constants

June 29, 2011 Comments off

It is easy to misspell variable names in Java. Using Java static final Strings (perhaps better known as constants) are a great way to help avoid this problem. Here and here are two articles on the subject. Below is a sample class for some very commonly used metadata field names in UCM.

public class RCSConstants
{
public static final String dDocTitle = “dDocTitle”;
public static final String dDocName = “dDocName”;
public static final String dDocName_encoded = “dDocName_encoded”;
public static final String dFormat = “dFormat”;
public static final String dID = “dID”;
public static final String dDocType =”dDocType”;
public static final String dRevLabel = “dRevLabel”;
public static final String dOriginalName = “dOriginalName”;
public static final String dDocAuthor = “dDocAuthor”;
public static final String dSecurityGroup = “dSecurityGroup”;
}

These constants (strings) can now be used in other classes as follows:

RCSConstants.dDocTitle

If you are using an IDE (such as JDeveloper or Eclipse) it will only let you choose values that are spelled correctly (provided you spelled them correctly in your constants class).

Categories: OracleUCM

Install WebLogic 11gR1 Patch Set 4 (10.3.5) in Console Mode

May 11, 2011 Comments off

Previously we showed how to install WebLogic Application Server 11gR1 PS3 (10.3.4) using the graphical mode installation.  You can also perform the installation in “Console Mode” which may be helpful if you only have terminal access (such as ssh).

Once you have download the generic installation jar you can execute a command line this to kick off the installation:

java -jar wls1035_generic.jar -mode=console

Upon executing this command you will basically get a text based version of the graphical installation.  You can enter Next to move to the next step or enter numeric keystrokes to toggle selected options.  Once all your choices are mad you’ll be presented with a text-based progress bar.  Once installation is complete you’ll be notified and control of the command line will be returned to you.

The installation is very fast!

Also, take a little bit to check out silent install info.

Categories: WebLogic

Oracle ECM Patch Set 4 (11.1.1.5) Released

May 10, 2011 Comments off

http://www.oracle.com/technetwork/middleware/content-management/downloads/index-085241.html

Get it while it’s hot!  Oracle released Patch Set 4, version 11.1.1.5 of ECM recently.  Includes updates to IRM, IPM, UCM and the whole stack as well as matching updates for RCU, WebLogic and JDeveloper.

Categories: OracleUCM

Installing Java on Ubuntu 11.04 Natty Narwhal

April 30, 2011 2 comments

Installing Java on Ubuntu 11.04 is pretty straightforward.  First you need to edit the repositories for apt-get.  Use the editor of your choice, but this is basically the command I use:

sudo vi /etc/apt/sources.list

Uncomment the following two lines and save the file:

deb http://archive.canonical.com/ubuntu/ natty partner
deb-src http://archive.canonical.com/ubuntu/ natty partner

Then, open a terminal and issue the following commands:

sudo apt-get update
sudo apt-get install sun-java6-jdk

Categories: Mindlessness Tags: ,

csCheckinIDNotUnique – Error Message of the Month (February)

February 7, 2011 Comments off

Error:

csCheckinIDNotUnique

There is actually a good Oracle Support article on this error.  There can be a variety of reasons why one might encounter this issue.  Occassionally the values in the Counters table get out of date.  Sometimes you’re attempting to check in a new piece of content with the same Content ID as an existing piece of content without knowning it.  Oftentimes this happens if you are integrating with Content Server and are attempting to generate a Content ID.

Once you’ve have fixed your core logic issue you may still be left with a “corrupted” piece of content in the system that you need to get rid of before you can make a fresh start with your updated code or process.  To take care of this situation:

Step 1 – Open Admin Applets -> Repository Manager

Step 2 – Search/Filter to find the offending Content ID.

Step 3 -Delete this revision in the system.

You should now be able to checkin content normally again without this error occurring.

UCM 11g Stand-alone Admin Applications

February 6, 2011 Comments off

Running UCM admin applications directly from the server where Content Server is installed is called running them in stand-alone mode. No longer are they called applets, since the term “applet” is usually referred to a program which is included in a web page.

Stand-alone admin applications are located here: CS_INSTALL_DIRECTORY/bin/

Executable applications are listed in this folder. If an application is not listed, it can be entered as a parameter to the IntradocApp application, as in this example: % ./IntradocApp Workflow

In Windows, you can find the applications in your Start Menu: Start, Programs, Content Server, instance, Utilities, utility

In UCM 10g, you could run these stand-alone applications with no additional setup.

In UCM 11g, due to the advent of WebLogic, these applications need some setup. You need to setup a JDBC driver to talk to the database and you will need to login with a local user.

Below are 12 simple steps to get stand-alone admin applications running.

1. Login to UCM as an administrator.

2. Navigate to Administration > Admin Applets > User Admin.

3. Find the local user “sysadmin”.

4. Click “Edit”.

5. Change the password to something secure that you will remember.

6. Click “OK” and exit User Admin.

7. Navigate to MIDDLEWARE_HOME/user_projects/domains/DOMAIN/ucm/bin/

8. Open SystemProperties.

9. Go to the “Database” tab.

10. Select Oracle Thin JDBC Driver.

  • JDBC Connection String = jdbc:oracle:thin:@localhost:1521:orcl
  • JDBC User Name = dev_urmserver (see note below)
  • JDBC User Password = oracle

Note: The user name you connect as should not be “SYS”. You want the user Content Server connects as. If you do not know what user this is, open SQL Developer and connect as “SYS”. Then you can look under “Other Users’ and find a user that looks like it might be Content Server’s user. In my example this is dev_urmserver because it was a dev instance and this was a URM server.

11. Click “OK”.

12. Now when you launch any of the stand-alone applications you will be prompted for a user name and password. Login with sysadmin and click “OK”. The application should now load.

The two stand-alone admin applications that do not need login credentials are SystemProperties and Component Wizard.

Oracle documentation on running UCM 11g stand-alone admin applications can be found here.

Categories: OracleUCM Tags: ,
Follow

Get every new post delivered to your Inbox.