End-to-end installation of WebCenter and BPM 11g (64-bit)

In this post we will present a complete end-to-end installation and configuration of Oracle BPM 11.1.1.3, including Oracle WebCenter 11.1.1.3 for the Process Portal, Spaces and Composer features, on the Oracle Enterprise Linux 5.4 64-bit operating system, with Oracle Database 11.2.0.1.

The system used in this post is a virtual machine running on Oracle VM 2.2.  The guest has 8 cores, 24GB of memory, 160GB of disk and 18GB of swap space.  It is running Oracle Enterprise Linux Release 5 Update 4.  Everything is 64-bit (unless otherwise stated).

If you want to complete this installation on a single machine, you are going to want to have at least 12GB of memory and 4 cores.  Otherwise it may be a little bit slow.  You could also install the various components on different machines, and in fact you probably would in a real production installation.

This post will help you set up everything you need to get started with BPM, including the runtime environment for business processes, the web-based Process Composer which allows business users to edit their processes, the worklist that allows business users to process tasks, and dashboard reporting.

It will also guide you through configuration of the Process Portal feature, which provides a whole stack of social BPM capabilities, including the ability for end users to create self-service collaboration spaces to share information around processes and process instances.

Note: It is possible to use BPM without the Process Portal feature.  If you were to do that, you could leave out about two thirds of the steps in this post!

Preparation

We created an operating system user and group, both called oracle, which will be used as our normal users to install and run the software.

Before we start the actual installation, we have a couple of housekeeping tasks to take care of.  The virtual machine is configured with a static IP address and hostname, and the DNS servers are configured.  This can be done using the system-config-network command, and by updating the /etc/hosts file to include a line for the static IP address and hostname you have chosen.

The virtual machine is also configured to use the Oracle Unbreakable Linux Network so that we can easily install updates and packages as required.  You need to be an Oracle Enterprise Linux customer to use this facility.  If you are not, you will need to download and install the packages individually, or use some other package management application to do this.

In order to install the Oracle Database, we need to meet a number of prerequisites.  Almost all of these can be handled with one simple command.  Note that throughout this post, commands that are shown with a # prompt must be issued as root.

# yum install oracle-validated

At the time of writing, two packages are missing, so you will also need to install them manually, using the following commands:

# yum install libaio-devel
# yum install unixODBC-devel

Install Database

Now we are ready to install the Oracle Database.  In this post, we are using Oracle Database 11.2.0.1 Enterprise Edition (also known as 11g Release 2).

First, we will create directory to install the database into, and give our oracle user access to this directory.

# mkdir /u01
# chown oracle:oracle /u01

Now we can run the installation program

oracle$ ./runInstaller

The installation program will launch and we need to step through a number of screens.  Firstly, you can provide your Oracle Support details if you want to get automatic security updates from Oracle.  If not, just uncheck the box and click on the Next button.

You will be asked to confirm that you do not want the security updates.  Click on Yes.

On the next screen we select what we want to do, leave Create and configure a database selected and click on Next.

For our installation, we are going to use a Server Class database.  You can choose Desktop Class if you want to, everything will still work, but our choice here will give us some more flexibility.  Click on Next.

In this case, we will just run a single instance of the database, not a cluster.  Click on Next.

We are going to want to change some of our settings from the defaults, like our database character set for example, so we want to choose Advanced Install here and click on Next.

Click Next to choose English as the language to install.  (Feel free to install in your own language.)

We will use the Enterprise Edition of the Oracle Database in this example.  Any of the database editions will work, so choose the one that you are licensed for, then click on Next.

Now we need to specify where we want to install the database.  We put ours in /u01 – the directory we created earlier.  The Software Location will be automatically determined based on the Oracle Base you specify.  Click on Next.

As this is our first installation, we need to create our “inventory.”  This may not happen in your environment, if you have installed other Oracle products previously.  Here we just need to provide the location for the inventory.  We put it in our home directory, as shown below.  Click on Next to continue.

Wow!  A lot of questions here!  We are almost done.  Next, we need to decide what kind of database we want.  We are going to use the General Purpose / Transaction Processing option and click on Next.

Now we need to define our Global database name and Oracle Service Identifier (SID).  Here we are just going to use obpm for both of these.  If you have a number of Oracle database instances in your environment already, your Database Administrators may have some standards for these, which you might want to comply with.  They are pretty hard to change later!  Enter whatever values you will use, and click on Next.

Now we get to memory and character sets.  We definitely want to make some changes here.  By default, the database will take around 40% of the physical memory.  This is a lot of memory for us to give up, and given our workload, it is not really necessary.  We set our database to use only 1,024 MB of memory as shown below.  This will be more than enough for our intended usage.  If you are installing a production environment, you will probably want more – you should check the documentation for recommendations.  Don’t click on Next just yet.  We also need to make some changes on the Character sets tab.

Change the setting to Use Unicode (AL32UTF8).  We need this character set to support the data that our other products will want to keep in the database.  Now click on Next to continue.

In this example, we are not using Grid Control, so just take the default option here to Use Database Control for database management.  Feel free to turn on email notifications if you wish.  Click on Next to continue,

Now we need to tell the installer where we want to keep our database files.  In our case we are just going to use the File System, nothing fancy.  Leave that selected and provide a location to keep the files.  We used /u01/oradata as shown below.  Click on Next.

It’s a good idea to Enable automated backup.  You may be happy you did one day!  Click on Next.

We used the same password for all of the system accounts.  You can do the same, or provide different passwords for each account.  This wont make any difference to our installation.  Complete either the top or bottom part of this screen and then click on Next.  Now, this may seem obvious, but you would be surprised how often we get support calls from people who did not bother to remember the passwords!  Make sure you remember your passwords – you will need them later.

On the next screen we set the operating system user and group that the database will run under.  In our environment these are both called oracle.  Then click on Next.

At this point, the installer will check if there are any additional packages required.  There should not be any, but depending on our choices in the installer, there may be.  In our case there were two, as shown below.  You will need to install these (using yum for example) and then click on Next.

Once all the packages are installed, the installation summary screen will be displayed.  We are finally ready to actually install this database!  Click on the Finish button to get started!

As the installation runs, you will see the progress windows (below) update to provide you information about what is happening.

After the installation phase is completed (i.e. after all the product binaries have been installed), the Database Configuration Assistant will run.  This is the part that creates your actual database instance.

When this is completed, you will get a final screen showing you details of what was done.  You are probably going to want to keep a copy of the information on this screen if you are not familiar with the Oracle Database already.  Click on OK when you are ready to go on.

At this point, we need to run a couple of scripts as the root user.  Open a terminal windows as root, and run the indicated scripts.  Once these are completed, click on the OK button ton continue.

Congratulations, you now have a shiny new Oracle 11g Release 2 database installed!

Install WebLogic Server

The next phase of our installation is to install WebLogic Server.  Most of the remaining components run on top of WebLogic Server.  In this post, we are using the WebLogic Server 10.3.3 installer.  You can download this from edelivery.oracle.com if you have a license, or otn.oracle.com if you want to take up the development license option.  Once you have it downloaded and unzipped, invoke runInstaller.  After a few moments, the installation interview will appear, as shown below.  Click Next to get started.

On this page, we need to tell the installer where we will create our new Middleware Home.  We used /u02.  The Middleware Home is the location where all of the product binaries will be installed, and additionally where we will create our data files as we create (one or more) domains.  You will want to make sure you have at least 5GB of free space in the Middleware Home.  If you want to put it on a separate disk, or a RAID group, to improve performance, you should cancel the installation and go and set that up now and mount it on /u02 or wherever you choose to put your Middleware Home.

Note that you can have more than one Middleware Home on a (virtual or physical) machine (or operating system image) and that these can contain different products and/or different versions of products.

On the next page you can provide your Oracle Support details, or uncheck the box and click on Next as we did.

Choose Typical for your installation type and click on Next.  In this example, the typical installation is fine for what we need.

Now we need to select the JDK to use.  The installer should automatically detect your JDK and list it for easy selection, as shown below.  If your JDK is not found automatically, or you want to use a different one, click on the Browse… button to locate it.  Otherwise, just click on Next.

You can change the product installation directories on this screen.  We will just accept the defaults and click on Next.

Now we are presented with the summary, click on Next to start the installation.

As the installation runs, we can see its progress.

When it is completed, uncheck the Run Quickstart option and click on Done to leave the installer.  If we were just installing WebLogic Server, we would go ahead and run the Domain Configuration tool now.  However, we are also planning to install additional products, so we will run it later on, after those other products are installed.

Run the Repository Creation Utility

Now we will set up the necessary schemas in the database to hold data for the various products we are planning to install.  This is done using the Repository Creation Utility.  Again, you can download this from edlivery or OTN.  You want the 11.1.1.3 version, which includes the schemas for Oracle Business Process Management.  It is not necessary to run the 11.1.1.2 version first.  Note that there is not a Linux 64-bit version of the download.  You can just use the 32-bit version.  This tool is just used during the installation, to create objects in the database, it is not part of the running system.

After you have downloaded and unzipped it, invoke runInstaller from the rcuHome/bin directory.  After a few moments, the installation interview will appear.  Click on Next to get started.

Select the option to Create the database schemas and click on Next.

On the next screen, we need to provide details to connect to our database (which we installed earlier).  Enter the hostname of your machine, the port number (the default port is 1521), the service name (this is the SID that we created earlier), sys as the username and the password that you set during the database installation.  The role will default to SYSDBA.

At this point, we need to pause to discuss the Oracle Database Listener.  This is a component of the database that is responsible for managing incoming connections.  When you created the database instance (a few minutes ago) it also created a set of configuration files for the listener.  These are located under the network/admin directory in the database home and are called listener.ora and tnsnames.ora.  If you have a problem connecting to your database at this step of the installation, and you are confident you have entered all the information correctly here, then it could be that you need to update the configuration of your listener, or perhaps change the information you provide on this screen to match what is already in the listener configuration.

You can use the command lsnrctl status to view information about the configuration of the listener.  This will tell you how many “services” it is supporting.  Those services are database instances.  You should see your database instance listed in the output.  The listener might also have derived a different hostname than you expected.  You might try localhost or look in the two configuration files mentioned above to find the name or IP address the listener is using.  You will need to supply the same information in the Host name field on this page.

If you do all of this, and still cannot connect, you may need to update your listener configuration.  A quick Google search on the two configuration files should turn up instructions on how to do that.  If this still does not solve your problem, post a comment and I will write a post on that topic.

Once you get the database details correct, a small dialog box will open and the Repository Creation Utility will run a prerequisites check on your database.  After this is completed, click on the OK button to continue.

Note: if you choose to use the Oracle Express Edition (XE) database, then you will get a warning message at this point informing you that it is not a supported database for production.  You will have to click on Ignore to continue.  It is perfectly reasonable to use XE as the database in your BPM development environment, but you should not use it in production.

On the next screen, we need to select which schemas we want to create.  Select all of the schemas in the two groups called SOA and BPM infrastructure and WebCenter Suite as shown below.  Then click on Next to continue.  Note that there is a prefix at the top of this page.  The default value is DEV.  This allows you to use a single database instance to hold schemas for more than one BPM domain.  You would probably only want to do this in your BPM environment if you have a large RAC database environment, or if your database is on an Oracle Database Machine (Exadata), or if all of the BPM environments are non-production.

A dialog box will appear as a further prerequisite check is completed.  Once this is done, click on the OK button to continue.

On the next page, we need to specify the password to use for the schemas.  You can specify to use the same password for all of them, as we have done here, or specify individual passwords for each schema.  Either way, complete the necessary details and click on Next.

The next page gives is the opportunity to map schemas to tablespaces if desired.  For this example, we will just accept the defaults.  If you are setting up a production environment, you may want to sit down with your Database Administrator and do a more thorough mapping.  Click on Next to continue.

Click OK in the confirmation dialog that appears.

Now the Repository Creation Utility will create any tablespaces that do not already exist.  This step can take a few minutes, depending on the speed of your storage.  When it is done, click on OK to continue.

Finally, we are presented with a summary of the work to be done.  Click on Create to go ahead and create all of the schemas and load them with data.

You can watch the progress as this task runs.  Note that this can also take some time if you have slower storage.

When it is complete, a summary will be displayed.  Click on Close to finish this part of the installation.

Installing SOA Suite 11.1.1.2

Now that our database contains all the necessary definitions and data, we are ready to move on to our other product installations.  First we will install Oracle SOA Suite.  You will need to download the 11.1.1.2 installer and also the 11.1.1.3 patchset installer, which we will use a little later on.

Unzip the 11.1.1.2 installer and invoke runInstaller from the Disk1 directory.  It may ask you to enter the location of your JDK before the installer interview appears on screen.   In our example this was /usr/java/jdk1.6.0_21.   Once the installer appears, click on Next to get started.

The installer will run some prerequisite checks.  Once these are completed, click on Next.

Now we need to specify the location where we want to install SOA Suite.  Note that our Middleware Home (which we created earlier) is automatically selected for us.  Click on Next.

Now a summary is displayed.  Click on Install to start the process.

Again, we can observe progress as the installer runs.

Once it is finished, click on Next to continue.

Here we see a summary of what was done.  Click on Finish to complete this phase of the installation.

Installing the Web Tier

Next we will install the Web Tier.  This is required by the Oracle Universal Content Management system (UCM) which is used to store content in the WebCenter environment.  When we have our business processes running later on, process participants are able to attach documents, comments, have discussions, tag, and collaborate in other ways around an instance of a process.  This content that they create is stored and managed in UCM.

The Web Tier contains a web server, load balancing and caching technologies, but for our purposes, we are just going to install the web server component.

Again, you will need to download the Web Tier 11.1.1.2 installer and 11.1.1.3 patchset installer from edelivery or OTN.  Keep the patchset installer for later on.  For now, unzip the 11.1.1.2 installer and invoke runInstaller from the Disk1 directory.  Again, you may need to provide the JDK location.  After a few moments, the installer will appear, as shown in the image below.  Click on Next to get started.

Select the option to Install and Configure the software and click on Next.

Some prerequisite checks will run.  When they are complete, click on Next.

We need to specify the installation location.  Put this into the same Middleware Home we have used for WebLogic Server and SOA Suite.  It should be automatically selected.  Press Next to continue.

On the Configure Components screen, uncheck everything except for Oracle HTTP Server and click on Next.  We are not going to use the Web Cache in our environment and we do not want to associate our web server with a WebLogic domain.  You might want to use these other options in a production environment, but they would most likely be installed on a different machine anyway.

On the next screen we need to specify the location for our instance.  Go ahead and accept the defaults here and click on Next to continue.

On the next page, we have the opportunity to set the port numbers to use.  The default port number for Web Tier is 7777.  We are going to accept the default in our example.  Click on Next to continue.

Again, you can provide your support details if you wish.  Click on Next to continue.

A summary page will be displayed.  Click on Install to start the installation.

You can watch the progress as the installer runs, and then the instance is created and started.  This step may take a while to complete as it will check that it can successfully start and stop the instance.

When the installation is finished and the configuration has completed, click on Next to continue.

A summary screen is displayed, showing what was done.  Click on Finish to leave this part of the installation.

Installing WebCenter

The next step is to install Oracle WebCenter.  This is the component that will provide all of the collaboration services to our BPM environment.  You will need to download both the WebCenter 11.1.1.2 installer and the WebCenter 11.1.1.3 patchset installer.  Again, keep the patchset installer for later on. You also need to download and unzip the Oracle Content Management for WebCenter 10.1.3.5.1 installer.  Take a note of where you unzip this.

Unzip the 11.1.1.2 installer and invoke runInstaller from the Disk1 directory.  You may need to specify the JDK path again.  After a few moments, the installer interview will appear.  Click on Next to get started.

A prerequisites check will run.  When it is complete, click on Next.

Again, we will install WebCenter in to the same Middleware Home.  Click on Next.

Make sure you leave the option to Install and Configure Oracle Universal Content Management selected.  Accept the default ports, 4444 and 4440, and enter the web server address as shown.  Note that this is the address of the Web Tier we just installed a few minutes ago, which should be running now, with /ucm on the end.  You should be able to hit the web server in your browser and get the Oracle Fusion Middleware welcome page.  In this example, this would be at http://bpm11g:7777/.  If you cannot view the homepage, then you need to stop and go fix that before you continue here.  When you are ready, click on Next.

On this screen, we need to provide the database details for UCM to use.  The connect string is in the format hostname:port:SID.  Substitute in the values that you used earlier when we ran the Repository Creation Utility.  In our case it is bpm11g:1521:obpm.  You also need to provide the schema username, note that this matches the one we created with the RCU, note also it has the DEV_ prefix that we pointed out earlier, and provide the password you set for the schema when we ran RCU.  When all of these details are entered, press Next.

The summary screen is displayed.  Click on Install to start the process.

We can watch the progress as the installer runs.

When it is complete, click on Next to continue.

Now we need to tell the installer where we unzipped the UCM installation media.  Note that you want to point at the ContentServer directory inside the directory where you unzipped the file, as shown below.  You can click on the Browse button to locate this directory.  Click on Next when you are ready to continue.

The installer will install UCM and configure it for use with WebCenter.  You can watch progress.

When this is complete, click on Finish to leave this part of the installation.

Installing the Web Tier PatchSet

Our next step is to run the patchset installers to upgrade our installation from 11.1.1.2 to 11.1.1.3.  We start with the Web Tier patchset installer, which we downloaded and unzipped earlier.  Invoke runInstaller from the Disk1 directory.  You may need to provide the JDK location.  When the installer opens, as shown below, click on Next to get started.

Point the installer to the location where you installed Web Tier earlier.  This should be automatically found for you.  Click on Next.

Provide your Oracle Support details if you wish, then click on Next.

The summary screen is displayed.  Click on Install.

We can watch progress.

When it is complete, click on Next.

And then click on Finish.

Installing the WebCenter 11.1.1.3 PatchSet

Next we will patch WebCenter.  Invoke the runInstaller from the Disk1 directory from your unzipped WebCenter 11.1.1.3 patchset.  Provide the JDK details if necessary.  When the installer opens, click on Next to get started.

Point it to the location where you installed WebCenter.  This should have been automatically found.  Click on Next.

Review the summary page and click on Install.

You can watch the progress.

When it is complete, click on Next.

Click on Finish.

Installing the SOA Suite 11.1.1.3 PatchSet

This is a large patch and it adds the BPMN support to SOA Suite, to effectively extend it to include BPM Suite.

Again, we invoke runInstaller from the Disk1 directory of the SOA Suite 11.1.1.3 patchset that we installed and unzipped previously.  Provide the JDK details if necessary.  When the installer opens, click on Next.

Point the installer to the location where we installed SOA Suite.  This should have been automatically populated for us.  Click on Next.

Review the summary screen and click on Install.

We can observe progress.

When it is complete, click on Next.

Review the summary and click on Finish.

Configure the Web Tier to support Oracle UCM

We need to make one small update to the configuration of the Web Tier to support Oracle Universal Content Management (UCM) which will act as the content server for various content created in our BPM environment.

To complete this configuration, you need to edit the httpd.conf (web server configuration) file for the Web Tier.  It is located here:

/u02/Oracle_WT1/instances/instance1/config/OHS/ohs1/httpd.conf

The following line must be added to the end of this file:

include "/u02/Oracle_WC1/ucm/data/users/apache22/apache.conf"

This change directs the web server to load up the configuration from UCM.  You will need to restart the web tier after making this change.  This can be done with the following commands:

cd /u02/Oracle_WT1/instances/instance1/bin
./opmnctl shutdown
./opmnctl startall

Providing there were no errors, the web server should now start up and be accessible at http://yourserver:7777/.  You should also be able to access UCM at http://yourserver:7777/ucm.  Note that this URL is formed using the information we provided during the WebCenter installation interview.  Your screen should look like this:

Configuring a Domain

Now that we have finished installing all of the software, we are ready to create our WebLogic Domain.  The domain is essentially all of the configuration information needed to actually run the software.  We can create as many domains as we like, with different combinations of software in them.  In our example, we will just create one.  In a real world installation, you would most likely have separate domains for production, disaster recovery, training, test, etc.

To create the domain, we use the Fusion Middleware Configuration Wizard.  Invoke config.sh in your /u02/Oracle_SOA1/common/bin directory.  When the configuration wizard opens, select Create a new WebLogic domain and click on Next.

On the Select Domain Source page, we need to select which components we want configured in the domain.  Select the components shown in the image below.  Pay special attention to the part in brackets at the end of the name.  There are some components that have very similar names.  When you have made your selections, press Next.

On the next page, we need to specify the name of the domain and the location where its files will be stored.  You can go ahead and accept the defaults and press Next to continue.

On the next page, we need to provide a password for the domain administrator (weblogic user).  Enter a password and click on Next.

Next, we specify whether we want the server to run in Development Mode or Production Mode, and which JDK to use.  For now, accept the defaults and click on Next.  We can change this later on, when we are ready.

Now we need to provide the database connection details.  Select all of the Component Schemas listed in the table by checking the boxes next to each one, then type in the appropriate values in the fields at the top.  The DBMS/Service field is our SID, we used obpm.  The hostname is bpm11g in our case, port 1521.  If you specified the same password for all schemas when we ran RCU, then you can just type that password in here.  If not, you will need to select each schema one by one and enter its password.  When you are done, click on Next.

The configuration wizard will check that all of the schemas are accessible.  If there are any errors, you will need to go back and correct them.  When everything is successful, click on Next to go on.

We do not need to do any optional configuration, so just click on Next.

The summary page is displayed.  Click on Create.

We can watch progress.

When it is complete, click on Finish.

Note that the configuration wizard gives you the Admin Server URL.  Take a note of that.

Starting the environment the first time

Now we are ready to start up the environment for the first time.  We will start everything from the command line so we have easy access to the consoles, and so we can easily start and stop the servers, as we will need to do this a few times as we complete the configuration.

First, we start the Administration Server.

cd /u02/user_projects/domains/base_domain/bin
./startWebLogic.sh

The server will start up and produce a number of messages.  This may take a few minutes the first time.  Eventually, a message will be displayed informing you that the server is in the RUNNING state.  Once you see this message, open a browser and point it to:

http://yourserver:7001/console

The WebLogic Server console will be displayed.  You can log on using the user weblogic and the password you specified during the domain creation wizard previously.

You may also like to point your browser at the Enterprise Manager URL:

http://yourserver:7001/em

You can log on using the same details.

When you log in, you will see the Farm status page, which will look something like the one below.  You may not have the same servers running as shown in the image, and the menus on the left may be slightly different for now.  When you start the additional servers, your screen should resemble the image quite closely.

To start the other servers, called the Managed Servers, run the following commands, each one in a separate shell/window (you will need to set the directory in each shell before executing the other command):

cd /u02/user_projects/domains/base_domain/bin
./startManagedWebLogic.sh soa_server1
./startManagedWebLogic.sh WLS_Services
./startManagedWebLogic.sh WLS_Portlet
./startManagedWebLogic.sh WLS_Spaces

The first time you start up these managed servers they will take a bit longer than usual and you will get some errors – as we have not configured security yet.  They will each ask you for a user and password (in their shell/window) when you start them.  You will need to enter weblogic and your password.  It is a useful exercise to start them up and validate they all start successfully.  You will know they have started when they each issue the message about being in RUNNING state.

If you want to stop one of these managed servers, you just type a Control-C in its shell/window.  It will perform an orderly shutdown.  You must stop all managed servers completely before you shutdown the admin server, and you must start the admin server completely before you start the managed servers.

Setting up boot.properties

We can create a special file called boot.properties to provide the user and password to WebLogic so that we don’t have to manually enter them when we start up the servers.  This file should contain the following data:

username=weblogic
password=whatever

Change the password from whatever to the one you chose during domain creation.

Save a copy of this file in each managed server’s security directory, i.e.:

/u02/user_projects/domains/base_domain/servers/soa_server1/security
/u02/user_projects/domains/base_domain/servers/bam_server1/security
/u02/user_projects/domains/base_domain/servers/WLS_Services/security
/u02/user_projects/domains/base_domain/servers/WLS_Portlet/security
/u02/user_projects/domains/base_domain/servers/WLS_Spaces/security

The file must be called boot.properties in each case.

Next time you start a managed server, it will read the details from this file and it will not ask you to enter them.  It will also encrypt the contents of this file.  You can verify this by taking a look at the file after you have restarted the managed server.

Using the Node Manager

At this point, you may wish to configure the Node Manager so that you can also start and stop servers from the WebLogic Server console or Enterprise Manager.  If you wish to do so, then take a look at this post for the instructions to enable the Node Manager.  Once you have done that, you can then start just the admin server and then the node manager from the shell window/command line.  The managed servers can then be managed from the consoles.  To start the Node Manager, you would use these commands:

cd /u02/wlserver_10.3/server/bin
startNodeManager.sh

Configuring WebCenter

Now we need to configure WebCenter for use with the Process Portal.  This part gives us access to the new social BPM features provided in the Oracle BPM 11g product release.

The first step is to register the connection to the content server.  Login to the Enterprise Manager at http://yourserver:7001/em using the user weblogic and your password.

In the main navigation tree on the left hand side of the page, navigate to “Farm” -> “WebCenter” -> “WebCenter Spaces” -> “webcenter”

In the context menu (at the top of the main content pane and indicated by the red arrow in the image below), select “Settings” -> “Service Configuration”

Click on “Content Repository” -> “Add”

Complete the fields as shown below:

Connection name = local-ucm
Repository type = Oracle Content Server
Active Connection = checked
Administrator User Name = sysadmin
Root Folder = /Spaces
Application Name = Spaces
RIDC Socket Type = Socket
Server Host = localhost 
Server Port = 4444
Others may be left on default values

Save your changes and restart the WLS_Spaces managed server.

To verify this has worked successfully, you should now be able to login to WebCenter Spaces at http://yourserver:8888/webcenter using your weblogic user and see that the Documents view (its a taskflow technically) displays correctly, with no error message.  Alternatively, you can see the same in your recent documents view in the personal side bar on the left hand side of the screen.  The image below shows the two places where you can validate this.

Next, we want to set up the discussions server.  We will need to configure WS-Security to do this, so we need to create our security keys first.

Create a directory to hold our keystore:

mkdir /u02/keystores

In this directory, create a new keystore and a RSA key pair.  Note that this whole command is entered on one line.  It is shown here on multiple lines for ease of reading only.  You may need to put the path to your JDK’s bin directory before the keytool command if that directory is not in your PATH.  You need to add in the appropriate Common Name (CN) as shown in bold.  Here we have used the fully qualified hostname of the WebCenter server, with the hostname as a cn and each domain name component as a dc.  You also need to provide a password for the key (keypass) and for the keystore (storepass), as shown.

keytool
-genkeypair
-keyalg RSA
-dname "cn=yourserver,dc=au,dc=oracle,dc=com"
-alias orakey
-keypass welcome1
-keystore webcenter.jks
-storepass welcome1
-validity 1064

Now we need to create the certificates.  In this example, we are going to use self signed certificates.  This is suitable for test or development systems, but in a production system you may wish to purchase certificates from a trusted external Certificate Authority.  Alternatively, you may have already purchased a signing certificate and have your own certificate authority.  In this case, you will need to get your certificates signed by the administrator of the certificate authority.

The following command is used to create a new certificate which we will call orakey.

keytool
-exportcert
-v
-alias orakey
-keystore webcenter.jks
-storepass welcome1
-rfc
-file orakey.cer
Certificate stored in file <orakey.cer>

Now we import that certificate into the WebCenter keystore with a new name, webcenter_spaces_ws.

keytool
-importcert
-alias webcenter_spaces_ws
-file orakey.cer
-keystore webcenter.jks
-storepass welcome1
Certificate already exists in keystore under alias <orakey>
Do you still want to add it? [no]:  yes
Certificate was added to keystore

Now we are ready to copy our keystore, which contains our certificate, into our domain configuration directory, using a command like this: (again, this command should be entered on one line)

cp webcenter.jks
/u02/user_projects/domains/boot_domain/config/fmwconfig/

Next, we will configure our domain to use this keystore.  In Enterprise Manager, navigate to “Farm_boot_domain” -> “Weblogic Domain” -> “boot_domain”

From the context menu, select “Security” -> “Security Provider Configuration”

Scroll down to Keystore, expand it, and click Configure.  Deselect (uncheck) the box Configure Keystore Management and click Ok.  This will make sure that we reset the configuration and remove any old values.  Obvisously, since we just installed the software and created our domain a few moments ago, there wont be any old values, but if you have to come back and do this again for any reason, then you will want to follow this two step process.

Now go back to Keystore, and click Configure again, this time check the box Configure Keystore Management and enter the following information:

Keystore Path = ./webcenter.jks
Password = welcome1 
Confirm Pwd = welcome1
Signature Key Alias = orakey
Signature Password = welcome1 
Confirm Pwd = welcome1
Encryption Key Crypt Alias = orakey
Crypt Password = welcome1
Confirm Pwd = welcome1

Save your changes and then stop all managed servers, and then the admin server, then restart the admin server and then the managed servers.

Now we need to create a keystore for the discussions service to use.  This is done by issuing the following command, this is done in the same directory as the commands we use previously to create the keystore for WebCenter, i.e. /u02/keystores.

keytool
-importcert
-alias df_orakey_public
-file orakey.cer
-keystore owc_discussions.jks
-storepass welcome1
Owner: CN=yourserver, DC=au, DC=oracle, DC=com
Issuer: CN=yourserver, DC=au, DC=oracle, DC=com
Serial number: 4b69f328
Valid from: Wed Feb 03 17:05:28 EST 2010 until: Wed Jan 02 17:05:28 EST 2013
Certificate fingerprints:
         MD5:  3C:7A:D7:33:1A:21:9F:BA:24:A2:D1:9E:09:F6:FC:93
         SHA1: 59:B6:3F:78:8D:5B:28:E4:E8:8C:7E:B1:9A:22:A9:20:F6:39:F1:20
         Signature algorithm name: SHA1withRSA
         Version: 3
Trust this certificate? [no]:  yes
Certificate was added to keystore

In this same directory, create a file named keystore.properties.  This file must contain the following text.  It is very important that this file does not contain any extra spaces at the ends of the lines, or any extra lines.  Please check carefully to make sure you have not added any extra spaces.  Note that the last line contains the name of the keystore we just created in the last step.

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=welcome1
org.apache.ws.security.crypto.merlin.keystore.alias=df_orakey_public
org.apache.ws.security.crypto.merlin.file=/u02/keystores/owc_discussions.jks

We need to update our domain configuration so that this file can be found on the servers’ CLASSPATH.  This is done by updating the file that sets up the environment for the servers.  This file is:

/u02/user_projects/domains/boot_domain/bin/setDomainEnv.sh

You need to add the following lines to the end of this file:

if [ "${CLASSPATH}" != "" ] ; then
  CLASSPATH="${CLASSPATH}${CLASSPATHSEP}/u02/keystores/"
  export CLASSPATH
else
  CLASSPATH="/u02/keystores/"
  export CLASSPATH
fi

Note that the path to the directory containing the keystore.properties file is added to the CLASSPATH by this file.  You should now restart all your servers to pick up this change.

We need to tell the discussions server about the keystore now.  This is done by logging in to the Discussion Server Admin tool at http://yourserver:8890/owc_discussions/admin using the weblogic user.

Go to “System Properties”

Modify the value of webservices.soap.custom.crypto.fileName so that it points to the properties file you just created:

webservices.soap.custom.crypto.fileNamekeystore.properties

Note that you don’t need to specify full path, as you made the change to the CLASSPATH.  Click “Save Property”

Finally, we can register the Discussion Server with WebCenter.  Like before, this is done in the Enterprise Manager.

Navigate to “Farm” -> “WebCenter” -> “WebCenter Spaces” -> “webcenter”

From the context menu, select “Settings” -> “Service Configuration”

Click on “Discussions and Announcements” -> “Add”

Complete the fields as shown below:

Connection name = discussion_server
Active Connection = check
Server URL = http://yourserver:8890/owc_discussions
Administrator User Name = weblogic
Connection Secured = check

Then expand “Additional Properties” and click “Add” to add the following properties:

keystore.location = /u02/user_projects/domains/boot_domain/config/fmwconfig/webcenter.jks
keystore.type = jks
keystore.password = welcome1 - To encrypt the password, check "Is Property Secured"
encryption.key.alias = orakey
encryption.key.password = welcome1 - To encrypt the password, check "Is Property Secured"
group.mapping = forum - that is the default value

Save your work and restart your servers again to activate these changes.

At this point, you may feel like you are restarting your servers an awful lot.  Strictly speaking, all these restarts are not necessary – you could make all the changes in the one go, and then just do one restart.  But, if you get anything wrong, it will be pretty hard to find your mistake.  This way, step by step, it is easy to identify where you have gone wrong if anything does not work.

If you now log on to WebCenter Spaces (like before) you should be able to see your (empty) discussion forums using the discussions icon in the personal sidebar.  It is the one right underneath the documents icon we saw earlier.

Last, but not least, let’s set up the Wiki server.  Again, this is a two step process.  First, in Enterprise Manager, we will generate a passcode which will be used by the Wiki server for authentication.

Navigate to “Farm_boot_domain” -> “Weblogic Domain” -> “boot_domain”

In the context menu, select “Security” -> “Credentials”

Click “Create Map” to create a new credential map

Name the map owc_wiki

Highlight/select the owc_wiki map that you just created, click “Create Key” and complete the fields as shown:

Select Map = owc_wiki
Key = wsPasscode
Type = Password
User Name = weblogic - does not really matter
Password = welcome1

Click on OK to save this.

Now we can register the Wiki server to WebCenter.  Still in Enterprise Manager, navigate to “Farm” -> “WebCenter” -> “WebCenter Spaces” -> “webcenter”

From the context menu, select “Settings” -> “Service Configuration”

Click on “Wiki and Blog Server” -> “Add” and complete the fields as shown:

Connection name = wiki_server
Active Connection = check
Server URL = http://yourserver:8890
Passcode = welcome1 - the one we defined above

Now save your changes and restart all of your servers.  You should now be able to login to WebCenter Spaces and get the option to add Wiki and Blog pages when you click on Page Actions and Create Page as seen in the image below.  Note that these page types would not have been available previously.

That completes all of the necessary configuartion of WebCenter for use with BPM.  Now we can move on to the final phase of the installation, setting up the Process Portal feature.

Configuring the Process Portal

The final step is to run the script that will configure the Process Portal, but first we need to set up the configuration file.  All the files you need are included in the installation in the following directory:

/u02/Oracle_SOA/bpm/processportal.zip

You need to unzip this file, then edit the process-portal-install.properties file located in the unzipped location.

Here is an example of the file contents:

################################################
# BPM Process Portal installation properties   #
################################################
#Flag to decide whether to extend existing BPM domain or create a new one.
extendSoa=true
#Flag to decide whether to prompt for passwords or read them from this file
promptForPasswords=false
#BPM Schema details
bpmDBUser=DEV_SOAINFRA
bpmDBPassword=welcome1
bpmDBType=ORACLE
bpmDBDriver=oracle.jdbc.OracleDriver
bpmDBUrl=jdbc:oracle:thin:@${oracle_db_host_name}:${oracle_db_port}:${db_sid}
#BPM MDS details
bpmMDSUser=DEV_MDS
bpmMDSPassword=welcome1
#BPM Runtime details
bpmHost=yourserver
#Managed server port if BPM is installed on managed server. Else admin port
bpmRuntimePort=8001
bpmAdminUser=weblogic
bpmAdminPassword=welcome1
#webcenter spaces installation details
wcOracleHome=/u02/Oracle_WC1
#If extendSoa flag is set to true, then configure the below two properties to point to BPM domain
wcDomainName=base_domain
#Flag to control whether to set domain realm password or not
wcSetDomainRealmPassword=true
#This is the password to setup trusted domains. Same password should be set on BPM domain as well
wcDomainRealmPassword=welcome1
wc.server.port=8888
#Webcenter's weblogic installation details
wcHost=yourserver
wcAdminPort=7001
wcAdminUser=weblogic
wcAdminPwd=welcome1
wcManagedServerName=WLS_Spaces
#Flag to control whether to configure services
wcConfigServices=false
#content server details
wcContentServerName=yourserver
wcContentServerPort=4444
wcContentSpacesRoot=/Spaces
wcContentAdminUser=sysadmin
#discussion server details
wcDiscussionServerUrl=http://yourserver:8890/owc_discussions
wcDiscussionAdminUser=orcladmin

You will need to go carefully through this file and check every value against your environment.  Now is a really good time to take a backup so that you can easily retry this step if you got anything wrong.

Once you are ready, you need to make sure you have ANT on your path.  If you don’t have it installed independently, you can use the one provided in your Oracle Middleware home, at /u02/modules/org.apache.ant_1.7.1

Then run ant -f install.xml in the directory where you unzipped your processportal.zip, i.e. the same directory where you just edited that properties file to match your environment.

This will probably run for a while – maybe ten minutes – and if you got all your parameters correct, you will be rewarded with a BUILD SUCCESSFUL at the end.

Congratulations!  You have successfully installed a full, complete, end to end Oracle BPM system, including the Process Portal and all social BPM features.  Give yourself a pat on the back!

Now that you have got one, what do you do with it?

A good place to start is to hit the following URL’s and start taking a look around.  In future posts we will discuss how to use this environment you now have at your disposal.

WebLogic Console 
    http://yourserver:7001/console
Enterprise Manager
    http://yourserver:7001/em
BPM Worklist Application
    http://yourserver:8001/bpm/workspace
WebCenter Spaces (and Process Portal) 
    http://yourserver:8888/webcenter
Process Composer
    http://yourserver:8001/bpm/composer
Business Activity Monitoring
    http://yourserver:9001/OracleBAM

p.s.  This post took us a long time to write – getting all the information together and typed up to present (we hope) nicely.  If it helped you out, or if you found anything was missing, please leave us a comment to let us know.

Posted in Uncategorized | Tagged , , , | 10 Comments

New “Oracle Now” iPhone application

The team that run the oracle.com website have just released a new iPhone application that brings you the latest news, events and blog posts.  You can get it free by searching for Oracle Now on the App Store.

If you allow it to use your location, it will also tell you about upcoming events in your country.

Posted in Uncategorized | Tagged | Leave a comment

Issue with JDK 1.6.0_18 under WebCenter

I was talking to an architect at a new WebCenter installation over the last few days, they were having a lot of strange issues with pages not rendering correctly, parts of the page missing and the layout getting all messed up.

Turns out the issue was due to a bug in the JDK version they were using, 1.6.0 update 18, and was resolved by upgrading to update 21.

So, if you are installing WebCenter, learn from their experience and don’t use that version of the JDK!

Posted in Uncategorized | Tagged , | Leave a comment

Simple Navigation

Note: This post was written using Oracle JDeveloper 11.1.1.3, running in 64-bit mode on 64-bit Ubuntu 10.04 LTS, but will work with JDeveloper 11.x on any platform.

This post is part of a series on Oracle Application Development Framework (ADF).  This post assumes that you have completed the example in the previous “Hello World!” post.  Subsequent posts will build on this post with increasing, additional functionality.

Let’s return to the application we started in the previous post.  In the Application Navigator navigate to the adfc-config file in your ViewController project under Web Content then Page Flows.  If you have just completed the previous post, this file will probably still be open.  If you can’t see the Application Navigator, you can open it by selecting Application Navigator from the View menu.

Add two new pages to the diagram by dragging a View from the Component Palette onto the canvas, like we did in the previous post.  If you don’t see the Component Palette, select it from the View menu.  Name these new pages “one” and “two” as shown in the image below.  If you accidentally lose focus on the name before you have typed in the name you want, just click on the text again and you will be able to edit it.

Now we will create some rules that determine how users can navigate around our application.  In this example we are going to create some very simple rules, but later on we will see how we can have more complex navigation rules including conditions and “sub-navigation.”  For now, click on the Control Flow Case in the Component Palette, then click on the the home page to start an arrow and then the one page to end the arrow.  Your screen should look like the image below.  Type in one to name this arrow.  If you lose focus, just click on the name to change it.

We named this arrow the same as the view that it is pointing to.  This is not mandatory, but in this example it does make it a little clearer what it happening.  The name of the arrow is important though.  When we are developing our views (pages) and we want to have a component (like a button for example) cause the application to follow a navigation path (one of these arrows), we will be selecting the name of the arrow from a list.  So choosing good names will make life easier for us later.

Go ahead and create some more arrows so that users will be able to navigate from any page to any other page, as shown below.  The details of the arrows are as follows:

Source        Target        Name
------------  ------------  ------------
home          one           one
home          two           two
one           home          home
one           two           two
two           home          home
two           one           one

Your project should look like this:

Save your work by selecting Save All from the File menu.  Now that we have defined our views (pages) and navigation (arrows), we are ready to create the views (pages).  Just like we did in the last post, double click on each new page in turn (one and two) and create the page.  You can just accept the default name, which is the same as the view name with .jspx on the end, but make sure you choose the Oracle Three Column Layout template.

Note: there is nothing special about this template.  You could complete the example without using it, but we plan to put things in to the columns in later posts, and it is nice for all our pages to look the same.

Now let’s use some buttons to allow the user to navigate around the pages.  Button is not the only component that allows navigation, in fact there are many components that we could use, but button is simple to use and understand, so it is a good choice for this example.

Open up your home view and drag two buttons from the Component Palette right after your Output Text which we set to display Hello World! in the previous post.  Your screen should now look like this:

You may want to open the Structure view (from the View menu) at this point.  We don’t really need it right now, but it is something that you will definitely want to use later on, as your pages get more complex, so it is a good idea to get used to using it now.  You can see it there on the left hand side of the next image.  It shows all of the components on the page (in this case) in a tabular format.  This makes it easy for us to navigate through the page structure and select components we want to work on.  Notice that the first button is highlighted in the Structure view, and also in the graphical design view.  If you select a component in either of these two views, it will also be selected in the other.  When you have a lot of components on a page, you will find it is much easier to select the exact component you want from the structure view.

Notice also, that when a component is highlighted in the Structure view, its properties are displayed in the Property Inspector which is visible on the right hand side in the image below.  If you don’t see it, you can open it by selecting Property Inspector from the View menu.  Take a moment now to notice that you can move these views around the screen to set them up however you like.  Grab the title bar of a view with your mouse and drag it around.  Notice that you can drop it on top of another view and you will get tabbed views, like you see in the image below.  Notice that I have the Application Navigator and the Structure view sharing the left hand side of the screen (see the tabs at the top), and the Component Palette, Resource Palette and Property Inspector sharing the right hand side.  You can also double click on the title bar of a view to maximise it, and then again to restore it.

If you accidentally lose a view you want, you can always reopen them from the View menu, as you have seen previously.  If you get your screen all messed up and you can’t work out where things are, you can always select Reset windows to factory settings from the Window menu to get back to a sane and reasonable layout.

Now, back to our application!  Select the first button and use the Property Inspector to change its Text property to Go to page one and its Action property to one, as shown in the image below.  Note that the drop down box for the Action property contains the names we gave to the arrows that originate at this particular view.

Select the second button and set its Text property to Go to page two and its Action to two.

Your page should now look like the image below.  Save your work by selecting Save All from the File menu.  Also, notice that JDeveloper automatically added a Group component to hold your Output Text and two Buttons.  You can see it in the Structure view.  I have highlighted it in the image below.  This is not important right now, but we will look at it in the next post, when we start to care about the layout of our components.  For now, you might want to just take note that whenever we put multiple components in to a facet – like the center facet we got from our Oracle Three Column Layout page template, we need to put them into some kind of layout container.

Now go ahead and add an Output Text and two Buttons to page one.  Set the Value property of the Output Text component to This is page one.  For the first button, set Text to Go to home page and Action to home.  For the second button, set Text to Go to page two and Action to two.  Save your work.

Similarly, on page two, add an Output Text with Value set to This is page two, followed by a button with Text set to Go to home page and Action set to home, followed by a second button with Text set to Go to page one and Action set to one.  Save your work.

Now we are ready to run our application and try it out!  Return to the the home page and right click on the page in the design area.  Select Run from the popup menu as shown below.

After a few moments (or minutes if you have shut down your test server since you did the last exercise) the update page should appear in your browser, as shown below.

Go ahead and click on the buttons to navigate around your application.   Here is page one:

And page two:

That completes this exercise!  Now we have seen how to add additional pages to our application, and one simple way of creating navigation using buttons.  In future posts, we will look at a number of other approaches to navigation, but first, we will explore layouts.  Stay tuned!

Posted in Uncategorized | Tagged | 1 Comment

Additional configuration to allow SOA managed server to be started from Node Manager

I usually don’t start my managed servers from the Node Manager, as I like to have easy access to the console while I am developing and debugging.  But today, I needed to get it working as a prerequisite for another product.

When I simply started the Node Manager and attempted to start my SOA managed server using it, I got a bunch of ClassNotFoundExceptions and it sat there keeping one CPU busy for a long time, with nothing happening.

Turns out there is one additional piece of configuration that needs to be done to enable the managed servers to be started from the Node Manager, you need to run this script (once):

$SOA_HOME/oracle_common/common/bin/setNMProps.sh
Posted in Uncategorized | Tagged , , | 1 Comment

Creating rules in Oracle Policy Automation

As a follow up to this earlier post, we will now explore how to create a basic rulebase using Oracle Policy Automation.

This post was created using Oracle Policy Modeling 10.1.0.27 on Windows 2008 Server R2.

Unlike other rules engines, Oracle Policy Automation allows you to write your rules in (or very, very close to) human language, and that language does not have to be English.

In this post, we will create a simple set of rules to determine employee eligibility for leave, and look at how to test the rulebase, and some simple user interface improvements and analysis.

Here are our rules:

Human Resources Policy 100 – Maternity Leave 

100.1. The employee is eligible for maternity leave if

a. The employee is female and
b. Either
 i. The employee has given birth to a natural child or
 ii. The employee has taken legal custody of an adopted child
 and
c. The employee is a full time employee and
d. The employee has been employed for at least 12 months continuously

Our first step is to open up Oracle Policy Modeling and create a new project. Select New Project… from the File menu.

image

Give the project a name and select the language and folder to store the project in.  I called mine “RedStack.”

image

Rules can be stored in Word or Excel documents.  We will use Word for this example.  Right click on the Rules folder and select Add New Word Document from the popup context menu.

image

Now right click on the newly added Word document and select Rename from the popup context menu.  I renamed mine to Maternity Leave.doc as you see in the image below.

image

Now double click on the Word document to open it in Word.  Word will open up with an empty document.  Oracle Policy Automation adds a few extra buttons in the Word ribbon.  You can see these by clicking on the Add-Ins tab.

image

We are going to use the following:

  • Conclusion – this tells OPA that the highlighted text is a conclusion or decision.
  • Level 1, 2, 3, etc. – this tells OPA that the highlighted text is a rule.  Level 1 rules contribute directly to the conclusion.  Level 2 rules contribute to a Level 1 rule, and so on – this will be more clear when we look at our example.
  • Rule Name – this tells OPA that the highlighted text is the name of the rulebase.
  • image Smiley face – This tells OPA to compile the rules to check that they are correct.
  • image Running man – This tells OPA to hide the clause information.

Go ahead and type the rules into Word.  Take care to put a TAB after the numbers (100.1., a., b., etc.) as this is what tells OPA that these are numbered clauses.

image

Now we want to tell OPA what the different parts of the document are.  First highlight the first line of the document, and mark it as a Rule Name by pressing Alt+N or clicking on Rule Name in the ribbon.  Note that the formatting changes slightly to give us a visual clue as to what various parts of the document are.

image

Next, select the second line and mark it as a Conclusion.

image

Continue in this fashion marking all of the remaining lines as Level 1, except for the two that start with i. and ii.

image

Finally, mark the two remaining lines as Level 2.

image

Your document should now resemble the one shown above.  Now, save your document and then click on the image Smiley face to compile it.  A dialog box will appear to show you the new attributes that were discovered.  You can modify wording and other options here, but for now just click on OK to continue.

image

You will get another dialog box letting you know that the compilation is complete.  Again, click on OK.

image

Your document should now look like this:

image

Note that OPA has added the clause numbers in red.  You can click on image Running man to hide these.  After doing so, your document will look like this:

image

You can now close Word and return to Oracle Policy Modeling and we are ready to test our rules.  Select Build and Run… from the Build menu.

image

If you get a message telling you that you need to recompile, just click on Compile and Continue, and then OK in the next dialog box.

image

In the popup dialog box, select Run with Oracle Web Determinations and click on Run.

image

This will start up the Oracle Policy Automation server in the background and open a browser directly to the “Web Determinations” screen which will conduct an interview with a user using our rules.  Click on the Is the employee eligible for maternity leave? link to start an interview.

image

OPA will ask you the first question it needs an answer for.  You may want to walk through this interview several times, providing different answers to see what happens.

image

In this example, we will say the employee is female, has not given birth to a natural child, has taken legal custody of an adopted child, is a full time employee and has been for 12 months.

image

image

image

image

After completing the interview with these responses, OPA tells us that the employee is eligible for maternity leave.  Now click on the Why? link after the result.

image

This will cause OPA to display all of the information provided and show us how it arrived at the decision it did, with direct reference back to the policy/rules we wrote.

image

So we can see that our rules work the way expected, but the interview is a bit clunky.  Let’s take a look at how we can make it a bit nicer.

One way to do this is to group the questions together into logical groups, and display each group of questions on a separate screen, rather than having one question at a time.  This is only one of the ways the OPA provides to make our interview more appealing.

Let’s start by right clicking on the Interviews folder and selecting Add New Screens File from the popup context menu.

image

The name will be highlighted for you to enter a new name.  I called mine Leave, but you can call it whatever you like.  If you accidentally press Enter too soon, just right click on it and select Rename from the popup menu.

image

Now double click on your new Interview to open it in the main editing pane (on the right).  Next, right click on the Question Screens folder and select New Question Screen from the popup menu.

image

Enter Sex in the Screen Title field at the top, then click on the New Attribute Input button to add a question to this screen.  Select “the employee is female” from the list of available questions (on the right) and click on the Create button to add it to the screen.  Questions that you have added will appear on the left hand side.  Then click on OK.

image

Repeat this same process to create two more screens:

  • Children containing “the employee has given birth to a natural child” and “the employee has taken legal custody of an adopted child”, and
  • Employment containing the remaining two questions.

Your screen should now look like this:

image

Now run the project again (select Build and Run… from the Build menu) and observe that the questions are now grouped and labeled as we defined.

image

Finally, let’s do a little analysis to round out this exercise.  Oracle Policy Automation will perform dependency identification for us and identify unused rules and circular logic.  Hopefully we wont have any of those in this simple example!

Let’s create a visualisation of our rulebase.  Right click on the Visualizations folder and select Add New Visual Browser File from the popup menu.

image

Give the file a name, as we did before.  I called mine dependencies.  Again, you can call yours whatever you like.

image

Right click in the main editor pain (where the popup menu appears in the image below) and select New Item… from the popup menu.

image

In the dialog box, choose “the employee is eligible for maternity leave” and click on OK.  Note that this is our conclusion from our rulebase.

image

The conclusion will appear in the editor pane, as shown in the image below, as a blue box.  Right click on this box and select Generate Rule Structure… from the popup menu.  This will help us to visualise the relationships between the rules in our rulebase.

image

In the dialog box that appears, just click on OK.

image

A diagram will appear, similar to the one shown below, that shows the rules and conclusions and how they relate to each other.  This lets you see how the rules engine goes about collecting facts to arrive at the conclusion.

image

Well, that’s it for this time!  Hopefully that gives you a feel for the simplicity and power of Oracle Policy Automation.  Remember, the rules can be much more complex than this, they can be hundreds of pages of legislation or policy documents.  They can also be expressed in Excel tables.  In addition to the web based interview we saw, they can also be exposed as a service that can be consumed by other applications or by an integration layer.

Next time we will look at how to deploy this rulebase to the Oracle Policy Automation server and consume it as a web service.  See you then!

Posted in Uncategorized | Tagged , | Leave a comment

Adding location-based search to URM (or UCM) using Google Maps

Recently I was working with an organisation that manages a large collection of physical assets and wanted to add a location-based search capability to Oracle Universal Records Management. In order to carry out a ‘proof of concept’ we built some simple integration with Google Maps.

This same simple add-on could equally be done with Oracle Universal Content Management.  The only difference would be in the way the metadata are defined and accessed in the query.  If you are using UCM, not URM, the tables will be different.  If you don’t know how to work it out, add a question to the post.

This post was built using Oracle Universal Records Management 11.1.1.2 running on Windows Server 2008 DataCenter Edition with Oracle Database 10g Express Edition.

The integration is built as a Java ServerPages (JSP) add-on.  URM has a built-in JSP server, but we have to enable it.

Connect to the URM web interface at http://yourserver:16300 and click on the Login link.

Log on as an administration, such as weblogic.

Open the Administration menu and select the link for Admin Server.  Note that your menus may look different based on user preferences, e.g. they may be drop-down menus across the top of the screen, or a different colour scheme.

A new window will open for the Admin Server.  Select the General Configuration link as highlighted in the image below.

Tick the checkbox to Enable Java Server Page (JSP) support, as shown, and provide a name for the JSP Enabled Groups.  I called mine “JSP.”  Note that this needs to match the group that we will create a little later on, and also becomes part of the URL to access the JSP pages.

Save these changes, and then restart your URM server instance.

These changes tell the URM server that when we access a JSP file in the group called JSP, it should run that page on its internal JSP server and return us the output, rather than just sending us the text in the file itself.  This is a very quick and easy way to add some new functionality to URM (or UCM for that matter.)

Once the server is restarted, return to the web interface, and open the Admin Applets in the Administration menu.  Then open the User Admin applet from that page.

Note that the admin applets will require a Java enabled browser as they are Java applets that will load and run on your local machine.

When the User Admin applet opens, select Permissions by Group… from the Security menu.

This will open a list of groups.  Click on the Add Group… button.  In the popup dialog box, enter JSP as the name for your new group.  Note that this MUST match the name you specified earlier in the Admin Server General Configuration page.  Then click on OK.

Click on the Edit Permissions… button and set the permissions for admin to RWDA as shown below.

Close the User Admin applet, saving your changes.

This completes the configuration to allow us to run JSP pages.  Now we want to define some metadata to store our location information.  In this post, we will use two fields to hold the latitude and longitude where the physical item was found.

To create our metadata, we go to the Records menu and select Configure then Metadata then Metadata Sets as shown in the image below.

On the Auxiliary metadata set information page, we provide a name and other details and the add the fields we want to define.  Complete this page using the information below:

Name:          gaMetadata
Display Name:  Location Metadata
Table Name:    gametadata
Column Prefix: ga

Add fields with the following names and types:

SurveyNumber                 Text
SurveyName                   Text
SourceLocationLatitude       Text
SourceLocationLongitude      Text
SampleType                   Text
SampleOwner                  Text
EmbargoDate                  Date
CollectionDate               Date

We will use these fields later to construct the search and display information about the search results on the map.

Now we are ready to add our actual JSP search page.  As this activity was conducted as a ‘proof of concept’ this JSP does not have all the error handling that you would want in a real production system, and it does not use connection pooling, etc.  So please be aware that you should improve the code quality if you plan to use this!

Here is the source code for the JSP.  You can put this into a file, I called mine mark.jsp, that we will upload shortly.  I wont give a line by line description of this code (unless somebody asks for it) but at a high level it is a simple HTML form that posts back to itself.  If the form has data in it, the page will use JDBC to connect to the database and run a query to find items within a specified distance (uncomment this if you want it) of a given location.  It then loops through the result set and creates markers on a Google Map to display the search results, along with some hover text and a popup box.  The marker also allows you to click on the search result to go to it’s details page in the web interface.  Note that you will need to set the database URL, userid, password, and your server address correctly.  These are highlighted in bold in the code below.

Note also that the code uses the SDO_GEOM package to do the spatial calculations – in this case the distance between two points in kilometres.  These are written to work on a standard projection with the normal everyday latitude and longitude coordinate system that most people are familiar with.  The Oracle database supports many other coordinate systems, measurement scales and spatial routines.

<%@page language="java" import="java.sql.*"%>
<%
  System.out.println("+++ Entering mark.jsp");
  java.sql.Connection conn;
  java.sql.Statement stmt;
  java.sql.ResultSet rs;
  if (request.getParameter("xLat") != null) {
    try {
      // query the database
      Class.forName("oracle.jdbc.driver.OracleDriver");
      conn = DriverManager.getConnection(
        "jdbc:oracle:thin:@localhost:1521:ecm11g", "dev_urmserver", "welcome1");
      String query = "select g.did, sdo_geom.sdo_distance( SDO_GEOMETRY( 2001, "
        + "8307, SDO_POINT_TYPE(" + request.getParameter("xLong") + ", " + request.getParameter("xLat")
        + ", NULL), NULL, NULL), SDO_GEOMETRY( 2001, 8307, SDO_POINT_TYPE(gacol_4, gacol_3, "
        + "NULL), NULL, NULL), 0.001, 'UNIT=KM') distance_in_km, gacol_4, gacol_3, gacol_1, gacol_2, "
        + "gacol_5, gacol_6, gacol_7, gacol_8, x.ddocname from gametadata g, extitems x ";
        //+ "where g.did = x.did and distance_in_km < " + request.getParameter("xDist");
      stmt = conn.createStatement();
      rs = stmt.executeQuery(query);
%>
<head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/reset-fonts-grids/reset-fonts-grids.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/container/assets/container.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/treeview/assets/treeview-core.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/treeview/assets/treeview-skin.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/treeview/assets/skins/sam/treeview-skin.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/menu/assets/menu-core.css" />
<link href="/urm/resources/layouts/Trays/Oracle/skin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
  var latlng = new google.maps.LatLng(<%
  if (request.getParameter("xLat") != null) {
%><%= request.getParameter("xLat") %><%
  } else {
%>-35.282019<%
  }
%>,<%
  if (request.getParameter("xLong") != null) {
%><%= request.getParameter("xLong") %><%
  } else {
%>149.128748<%
  }
%>);
  var myOptions = {
    zoom: 12,
    center: latlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
<%
    int i = 1;
    while (rs.next()) {
%>
    var latlng<%= i %> = new google.maps.LatLng(<%= rs.getString(4) %>,<%= rs.getString(3) %>);
    var marker<%= i %> = new google.maps.Marker({
      position: latlng<%= i %>,
      map: map,
      title: "<%= rs.getString(11) %> from Survey <%= rs.getString(5) %>, <%= rs.getString(6) %>. A <%= rs.getString(7) %> submitted by <%= rs.getString(8) %>"
    });
    var contentString<%= i %> = '<div id="content">' +
      '</div>' +
      '<h1 id="firstHeading"><%= rs.getString(11) %></h1>' +
      '<div id="bodyContent">' +
      '<p><%= rs.getString(11) %> from Survey <%= rs.getString(5) %>, <%= rs.getString(6) %>.<br>A <%= rs.getString(7) %> submitted by <%= rs.getString(8) %>. </p>' +
      '<p><a href="http://yourserver:16300/urm/idcplg?IdcService=INFO_EXTERNAL_ITEM_FORM&dSource=Physical&dID=<%= rs.getString(1) %>">View details</a></p></div></div>';
    var infowindow<%= i %> = new google.maps.InfoWindow({
      content: contentString<%= i %>
    });
    google.maps.event.addListener(marker<%= i %>, 'click', function() {
      infowindow<%= i %>.open(map,marker<%= i %>);
    });
<%
    i++;
  }
%>
}
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<div >
<h1>Search by Location</h1>
<form method="POST" action="#">
Latitude: <input type="text" name="xLat" value="<%
if (request.getParameter("xLat") != null) {
%><%= request.getParameter("xLat") %><%
} else {
%>-35.282019<%
}
%>"><br/>
Longitude: <input type="text" name="xLong" value="<%
if (request.getParameter("xLong") != null) {
%><%= request.getParameter("xLong") %><%
} else {
%>149.128748<%
}
%>"<br/>
Distance: <input type="text" name="xDist" value="<%
if (request.getParameter("xDist") != null) {
%><%= request.getParameter("xDist") %><%
}
%>"<br/>
<input type="submit" value="Search">
</form>
<p/>
</div>
<div id="map_canvas" style="width: 800px; height: 450px"></div>
</body>
<%
      rs.close();
      stmt.close();
      conn.close();
    } catch (Exception e) {
%><%= e.toString() %><%
    }
  } else {
%>
<head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/reset-fonts-grids/reset-fonts-grids.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/container/assets/container.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/treeview/assets/treeview-core.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/treeview/assets/treeview-skin.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/treeview/assets/skins/sam/treeview-skin.css" />
<link rel="stylesheet" type="text/css" href="/urm/resources/yui/menu/assets/menu-core.css" />
<link href="/urm/resources/layouts/Trays/Oracle/skin.css" rel="stylesheet" type="text/css" />
<body onload="initialize()" onunload="GUnload()">
<div >
<h1>Search by Location</h1>
<form method="POST" action="#">
Latitude: <input type="text" name="xLat" value="-35.282019"><br/>
Longitude: <input type="text" name="xLong" value="149.128748"<br/>
Distance: <input type="text" name="xDist" value="50"><br/>
<input type="submit" value="Search">
</form>
<p/>
</div>
<div id="map_canvas" style="width: 800px; height: 450px"></div>
</body>
<%
}
%>

Once you have the code saved in a file, you are ready to check that file into the URM server.

From the New Check-In menu, select your URM instance and then Standard Check In.  A form similar to the one below will open.  Set the fields as shown below:

Type:            Document - Any generic document
Title:           mark
Author:          weblogic
Security Group:  JSP
Primary File:    (click on Choose File and point to your mark.jsp)
Content ID:      MARK
Revision:        1

When you have completed the fields, click on the Check In button.  Note that the Security Group MUST match the one we defined earlier, which in turn matched the one we set in the Admin Server General Configuration page.  You can use a different title or content ID if you wish, however you will need to adjust your URL (coming soon) to match the values you choose.

Now we will set up a quick link to our page so it is easy to access it from the URM web interface.  In the My Content Server menu, click on the My URLs link.  This will open a page where you can define links, as shown below.  Add a new link.  I gave mine the title Search by Location and the URL shown below.  Note that you will need to change the URL (where highlighted in bold) if you have used a different filename or security group.  You will also need to put your server name into the URL.

http://yourserver:16300/urm/groups/jsp/documents/document/mark.jsp

Press Update once you are done.  You will notice that a Search by Location link appears under the My URLs folder in your menu now.

Finally, we will need some actual physical assets in the system so that we have some search results to look at!  The image below shows two sample records I used.

Check some physical assets into your system, if you have not already.  Make sure you add the Location Metadata Auxiliary Metadata Set to your new record using the drop down box at the top right.  You might want to do this before you start filling out the other fields…

Provide some values as shown above.  Note that this item has its SurveyName, SourceLocationLatitude, SourceLocationLongitude and SampleType set.  Note the values, you will see them later in the search results.

Now we are all set to run our add-in.  Click on the Search by Location link under My URLs in the My Content Server menu.  You should see your JSP page appear in the main content pane on the right, as shown below.  Enter some search terms and press the Search button.  Here I searched for -33.8122, 151.1755, the location of a large tunnel near Oracle’s office in Sydney, Australia.

The search results will be displayed on the map, as shown in the digram below.  Note that you can hover over the markers to see details.  You can also click on the marker to make the balloon appear (as has been done below).  The View details link in the balloon will take you to the subject item’s page in the URM web interface.  Note that you can also pan and zoon the map, and select the mode (Map, Satellite, Hybrid).

That concludes the example!  Happy searching by location.

Posted in Uncategorized | Tagged , , , , | 2 Comments

Recovering an Oracle database after doing something bad to your SPFILE

Well it has been over a year since the last time I broke my database, but I did it again today!  This time I increased the sga size without also increasing some other parameter, and the database would not start, and since it would not start, I could not change the parameter.  What to do?

After a bit of hacking the SPFILE to no avail, I worked out the following process:

First, log on to Oracle as an administrator:

sqlplus / as sysdba

Next, create a nice editable plain text PFILE from the “binary” SPFILE:

create pfile from spfile;
exit

Now you can edit PFILE to change whatever parameters you need to.  Once you are done, you can start up the database from the PFILE:

sqlplus /  as sysdba
startup pfile=initSID.ora

Problem solved!

Posted in Uncategorized | Tagged , | Leave a comment

WebCenter Spaces for iPhone released in AppStore

Reposting from Peter Moskovits:

If you have a WebCenter Spaces deployment (or are thinking about getting one), you should definitely check out the free WebCenter Spaces iPhone App, that allows you to access your activity stream, your contacts, all  your Spaces along with the documents, discussion forums, lists, space members, and more.

Posted in Uncategorized | Tagged , , | Leave a comment

ADF Faces Hello World!

Note: This post was written using Oracle JDeveloper 11.1.1.3, running in 64-bit mode on 64-bit Ubuntu 10.04 LTS, but will work with JDeveloper 11.x on any platform.

This is the first in a series of posts on Oracle Application Development Framework (ADF).  This post assumes that you have got Oracle JDeveloper installed, and presents a very simple “Hello World!” application, that shows us the most basic creation and deployment of an ADF application.  Subsequent posts will build on this post with increasing, additional functionality.

Watch this post on YouTube!

First, we need to create a new application to hold our work.  With JDeveloper open, select New from the File menu.  The New Gallery will open.  Select Applications under General on the left hand side, and Fusion Web Application (ADF) on the right.  Then click on OK.

The Create Fusion Web Application (ADF) wizard will open.  You need to give your application a name.  I called mine RedStack.  Normally you could just click on Finish now, but as this is our first time, let’s click on Next instead and get a bit of background as to what this wizard is doing for us.

You will notice from the left hand side, that this wizard is creating and “Application” that contains two “Projects.”  The first project is called Model, as you can see below.  You can also see in the Selected Project Technologies area (bottom right) that this project is automatically configured to support Java and ADF Business Components.  We wont be using these until a later post.  It is worth knowing that we can add extra technologies now, or later.  Adding a technology is going to make the necessary libraries available to build and deploy artefacts built using that technology.  For example, if we knew that we wanted to call a web service, we might want to add the web services technology, which would add libraries like web services client proxies, XML libraries, JAXB, etc.  For now, just click on Next twice to continue to the second project.

Here we see the second project is called ViewController.  This is where we will be spending most of our time for the next several posts.  This project will end up being a Java EE web application, in a web archive (WAR) deployment unit.  You can see it is preconfigured with various web technologies, Java and XML.  Click on Finish.

After a few moments, our application will be created.  You can see the two projects in the Application Navigator shown on the left.  In the main (centre) pane, there is a project overview which will guide us through various steps to get our application working.  For now, we are going to close that and ignore it!  If you move your mouse to the RedStack Overview tab, a close icon will appear at the right hand end of the tab.  Click on that to close the tab.

If we use the + icons to expand out our ViewController project, you can see what artefacts are created by default.  You will notice there is a Web Content folder, where we will keep all of our pages, templates, images, etc.  Later on (in a later post), when we create Java classes, an Application Sources folder will appear as well.

Let’s start by taking a look at the adfc-config file, located in the Page Flows folder under Web Content.  Double click on it to open it in the main pane.

You will see an empty diagram, as shown below.  This diagram is used to create the pages, “Views,” in our application, and to set the rules about navigation between the pages.  We will see how to use this a lot more in later posts.

For now, we are going to drag a View from the Component Palette on the right hand side, and drop it on the diagram, as indicated by the red arrow in the diagram below.  When you drop it, the name will be highlighted, and you can type in a name for the page.  I called mine home.

If you accidentally hit enter too soon, you can double click on the name to edit it.

If you don’t see the Component Palette, you can open it using the View menu in JDeveloper.

Hint: It is a good habit to hit Save All in the File menu after each action.  In this simple example, it does not really matter, but as move on to more complex examples, it is good to make sure all of your changes are saved before you move on.  Sometimes actions that you take may update several files, not just the one you are working on.  I like to Save All after every action I take.  Once you make it a habit, you will do it without thinking about it, probably much more often than you need to, but it will save you pain later on!  It also creates more save points in the revision history that you can revert to if you do something wrong.  Try to get into the habit, I am pretty sure you will ba happy you did.

Now, double click on the home View that you just added to the diagram.  This will open the Create JSF Page dialog, as shown below.

Specify a file name for your page.  I like to make it the same as the name of the view.  You want to use jspx, not jsp, so that you can take advantage of the additional validators that are available for jspx.  Again, this will save you time later on.

Also, select a Page Template from the pulldown list.  Later we will create our own templates, but for now, select Oracle Three Column Layout.  Page templates are useful for ensuring consistency across all of our pages.  They are a good place to put things like branding, navigation, shared logic, copyright notices, menus, etc.  We will see them in later posts.  For now, just click on OK.

After a couple of moment, our new empty page will open.  You will notice that it has a logo, three columns and spaces for headers, copyright notices, etc.  You should also notice that your Component Palette (on the right) will change to show different components now.  The components that appear now are the ADF Faces components and layouts.  You may notice there is a pulldown box at the top of the component palette which lets you select different groups of components.

For now, we are going to get started with one of the simplest components, the Output Text component.  Scroll down in the Common Components section of the Component Palette and drag one across to your page.  Drop it in the centre section of the page, as indicated by the red arrow in the diagram below.

In the bottom right of your screen, you should see the Property Inspector.  If it is not there, you can open it using the View menu in JDeveloper.  It should show properties for the Output Text component that you just added.  If not, just click on the component in the centre pane to select it, and the properties for that component will be displayed.

We are going to change the Value property, as shown in the diagram below.  Let’s change it to that old favourite, Hello World! as shown.  Make sure you press Enter when you have finished typing in the new value.  Then hit Save All!

You may notice that some properties have a little green dot beside them.  This indicates that they are not set to their default value.  This is a visual clue to let you know which properties you have edited.

Now we are ready to run our humble application.  Right click on the page in the centre pane, and select Run from the popup context menu.

The first time you do this it will take up to a couple of minutes (depending on the speed of your machine) to create a WebLogic Server instance, start it up and build and deploy our application.  Once the server is running, we leave it running as we make iterative changes to our application and retest them.  So in general, you will only start the server once per development session.

Once the server is started and the application is deployed (you can watch the progress in the Log window at the bottom of the JDeveloper screen) JDeveloper will open up your application in the default browser.

You can see from the diagram below what your application should look like.  Notice the Hello World! message.

So that completes our very first, very simple ADF application.  We saw how to create an application, add pages to the application, use a page template, add components to pages, and build, deploy and run our application!  It might not have seemed like much, but it is some of the basics that we will use over and over again in subsequent posts as we build on this application to add much more functionality as we explore ADF!

See you next time.

Posted in Uncategorized | Tagged | 7 Comments