Don't let OLE DB slow you down

Out-of-the-box sounds good to most, but to a trained ear it screams "poor performance".  It could be the root cause of users receiving a "timed out" response when searching, or sluggish response when scrolling through search results.  A quick way to try and resolve this poor performance is to use a native driver.

When creating a dataset within the Content Manager Enterprise Studio we can either pick SQL Server or Oracle as our database platform.  Making a selection tells the solution which flavor of SQL to use, but not which driver to use.  You get to pick that on the connections tab, as shown below. 

Connection tab of my dataset properties

Connection tab of my dataset properties

The very first thing written in that text box is the provider (driver) to be used when connecting to the database.  You can see here I'm using the SQLOLEDB.1 driver.  That's the default.  If I click the blue KwikSelect icon I can see the datalink properties dialog.  

Initial view of connection string properties

Initial view of connection string properties

Clicking onto the Provider tab will show all of the available drivers.  The highlighted one is the currently selected one for the connection string.  So that "SQLOLEDB.1" equals the "Microsoft OLE DB Provider for SQL Server".  That's the generic one that comes with Windows.  It works but won't contain the unique features and refinements of your SQL Server version. 

Since I have the SQL Server Native Client available, I should be picking that!

List of drivers available on the local machine

List of drivers available on the local machine

Picking the native client forces me to click next and then re-enter my database details.  That's because I'll have new options and features available for my connection.  The interface changes slightly (and more options are available off the advanced tab).  I'll just re-enter what I had before and click OK.

2017-10-11_0-43-06.png

Now if I save and deploy all is well.  If I have multiple workgroup servers I have to deploy the native client onto all of them.  I also have to match the native client version to the SQL server instance build (you should not use mixed builds).    Same goes for Oracle environments.

Don't take my word for it though.  Try it in your development environment and see for yourself (use a load test tool to simulate DB activity).

Renumbering Classification/Category Items

Another question over on the forum!  You can't easily renumber classifications via the thick client.  And you can't accomplish this particular change via DataPort (because it uses the level number as the unique Id), so time to break out powershell!

Add-Type -Path "D:\Program Files\Hewlett Packard Enterprise\Content Manager\HP.HPTRIM.SDK.dll"
 
$db = New-Object HP.HPTRIM.SDK.Database
$db.Connect
$classifications = New-Object HP.HPTRIM.SDK.TrimMainObjectSearch -ArgumentList $db, Classification
$classifications.SearchSTring = "top"
foreach ( $obj in $classifications ) {
    $classification = [HP.HPTRIM.SDK.Classification]$obj
    $newId = ([System.Int32]::Parse($classification.IdNumber)-1).ToString("000")
    $classification.SetProperty([HP.HPTRIM.SDK.PropertyIds]::ClassificationLevelNumberUncompressed, $newId)
    $classification.Save
}

In the script above, I find all top-level classifications and renumber everything down one number.  It works because I know my top-level numbering pattern. Here is my top-level pattern.

2017-10-05_17-34-14.png

You can see on line 9 of my code that I am reducing the existing level number by one and then formatting that change to have leading zeros (for a maximum length needed by my pattern).  You'd need to work out the appropriate method for determining the uncompressed number, otherwise it's pretty straight forward.

This should give the OP some ideas as to how to accomplish his goal.

Kicking off a workflow from an online form submission

I should be drinking the kool-aid, right?  Meaning, I should be using the features of the product suite to my advantage.  I started to go down the route of trying to figure out how to effectively track when someone "Requests More Information" from my website.  I surely don't want to use 4 different products to manage that process.  Why can't I take the form submission from squarespace and have it kick-off a workflow within Content Manager?  

Once my email link server was configured it took all of about 5 minutes to get this setup.


Here's the workflow I want to kick-off....

 
2017-10-03_13-07-35.png
 

First I went into squarespace and created a submission form.  It sends me an email with the contents of the form.  That email looks like the image below.

2017-10-03_11-56-48.png

Next I went into Content Manager and created myself a new check-in style.  I'm doing this via the webclient, but the process is the same for the thick client.  

 
Web-client

Web-client

 
 

I then gave the check-in style a name and chose my "Request for Information" record type.  

 
2017-10-03_12-03-20.png
 
 

Then I gave it a default workflow template for my process

 
2017-10-03_12-05-04.png
 
 

I then clicked into the processing section and checked the first two check boxes: Automatically create server-side email capture folders and Keep email in the mail system.  By keeping it in there I'm hoping my conversations can be automatically related and captured down the road.

2017-10-03_12-56-40.png

Now after I click save, it shows me my new check-in style

 
2017-10-03_12-07-16.png
 

If I go back to my gmail inbox I can now see this folder available

 
2017-10-03_12-08-57.png
 

Next I create a new filter for my inbox, so that all incoming form submissions are automatically labeled into this folder.

 
2017-10-03_11-34-12.png
 

I know the sender and receiver of the messages I care about, so I define those on the filter like shown below.

 
2017-10-03_12-11-58.png
 

In the other options dialog I indicate the new label name and then click save

 
2017-10-03_11-37-03.png
 

Now I go visit my website and complete the form...

2017-10-03_12-28-15.png

Now if I check my workflows worklist, I can see my workflow has been kicked-off & assigned automatically!

 
2017-10-03_13-09-39.png
 

The things we can accomplish with the newest versions are pretty cool.  I can see lots of useful ways to leverage these features.  Keep in mind that once the form data is within Content Manager, I can apply scripts, code, and add-ons to do anything necessary (like harvest the form data, initiate an integration, etc).

The integration with gmail is secure.  It works.  And it's free (if you have both G Suite and Content Manager).  You just need to configure it.  :)