19 August 2008

Installing Business Objects Web Services

We recently installed the Business Objects Enterprise at this client to get web access to crystal reports.  One of the excellent features (of many) of this software is the ability to incorporate the web application into other applications. 

Reports are exposed in two ways:

  • The Enterprise Server can launch reports via URL, which is an easy way to launch reports directly from inside any application.  The disadvantage is that the URLs are static and have to be coded every time the BOE repository is updated.  For example, if a new report is added for an application, the new URL has to be added to the list and possibly coded back into the application.  The advantage to URL access is that it's simple to implement and works with no further server modification.
  • Business Objects publish an extensive web services API.  However, the instructions for installation that ship with BOE can be pretty confusing and daunting.  In the end, I found the instructions incomplete and difficult to follow.  I think installation complexity is the biggest implementation impediment.  However, if one can get through the installation, the improved functionality is well worth the pain.

The installation steps I followed can be found by clicking here.  (The directions here are for XI R2/Windows Server 2003.)

Start by installing Business Objects and making sure Tomcat is installed.  In our case, Tomcat was installed by default.

The BOE web services installation instructions are found by opening the Dev Library and navigating to Web Services SDK > Web Services Server Components > Administrator Guide > Installing Business Objects web services.  There are several steps worth reviewing in this document, but I have found a simpler way as follows.

Then do the following: 

  1. Ensure that the Java SDK is installed.  On the server, open the command prompt and type java -fullversion.  If Java is installed, the version is returned.  If not, follow the instructions for downloading the Java SDK.
  2. Locate the dswsbobje.war file.  This is the file that creates the web services.  The file automatically installed in following directory on Windows servers:   [install_dir]\BusinessObjects Enterprise 11.5\Web Services\en\
  3. Deploy the .war file.  Copy the .war file into the [install]\Tomcat\webapps directory.  If a directory with the same name of the .war file already exists (in this case dswsbobje), rename it to 'zdswsbobje' as the installation will not overwrite the existing files.  Restart the Tomcat service, either through the Tomcat management console or the Business Objects Central Configuration Manager (CMC).  Tomcat will create a directory in the webapps folder with the same name as the .war file.
  4. Confirm the installation.  Before testing the service, run access the happydsws.jsp page to make sure all the services installed correctly.   The page will display a list of found components and any missing components.  The page can be found at http://[server name]:[port]/dswsbobje/happydsws.jsp.
  5. Access the services.  If the services are working properly, they can be accessed at http://[server name]:[port]/services.

29 July 2008

Executing a stored procedure in Charles River (CRD) via the Workflow Monitor

My current client has a requirement for updating the Charles River blotter intra-day with a dup/contra indicator. The process for implementing this is easy but not straightforward. The purpose of this post is to enumerate the steps for registering a procedure with the monitor and make some guidelines for a successful implementation.

Step 1: Write the stored procedure

The method for implementing a dynamic procedure to run with a workflow starts with a successful stored procedure. The procedure should have the following attributes:

  • Cache as much data as possible in table variables. My rule of thumb is if I need to scan a table twice, I cache the table. I take care to only retrieve the rows and columns necessary for local processing.
  • Take care to only update the rows necessary. This may seem obvious but extra testing will go a long way to keep table locks to a minimum and performance up.
  • The last statement in the query should return a count(*) statement of the elements that may be updated by your procedure. This number will appear in the Workflow Monitor screen.
  • Choose a blotter field that is not currently being used for processing. For our query, we chose the USR_CLASS_CD field as the field to display our indicator.

Step 2: Register the Stored Query

Open the Charles River System Administration application. Choose Setup > Stored Queries from the menus. Name the stored query and register it with the proper Data window.

In the query field execute the query by typing exec proc_name where proc_name is the name of the procedure to be executed.

Make sure the proper groups can see the procedure and that the description is properly populated.

Step 3: Register the Workflow Monitor

Create a Workflow Monitor in the Charles River Administration from Setup > Workflow Monitor Setup. Create your worklfow monitor.

We added (no click) to the monitor name to indicate to our users that clicking on the monitor would not retrieve any records.

The SQL Query field is populated the same as in the Stored Query field, exec proc_name where proc_name is the name of the procedure to be executed.

The privilege filter should be set to 'NONE'. The value message fields should be left blank.

Set the refresh frequency to the maximum time that allows for traders to work and still see timely information. Remember that Workflow Monitors are client-driven. That is, they run at the refresh frequency of each client. As a result, the greater the number of users, the greater you can (theoretically) set your refresh frequency.

Step 4: Create a shadow Workflow Monitor (optional step)

For our process, we created a view that returns the same order records updated by our procedure. This allows the users to quickly drill down to the updated records.

If you follow the steps above and pay close attention to performance, the procedure should execute automatically and give your users a dynamic blotter.