Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Feature only available with Aspire Premium

Introduction


About the SharePoint 2013 CEWS Listener for Aspire, how it works, features, etc.


Prerequisites


SharePoint 2013 CEWS user access and other requirements

Aspire Workflow Configuration

Workflow

Image Removed
CEWS Workflow Section

Once the SP2013 Content Enrichment service has been created, you can modify the workflow responsible for populating the properties/fields returned to SharePoint. Only the onProcess workflow is available, but all Aspire workflow functions may be used.

Aspire 2.1 and before

Once the SP2013 Content Enrichment application has been created you will need to add a connector with the name specified in the contentSource parameter. This can be any type of connector and all configurations except the workflow OnAddUpdate are ignored so it is recommended that it is left inactive.

  1. Open the aspire Administration UI
  2. Click "Add Source"
  3. Enter the Source Name previously specified
  4. Click on the Connector tab
  5. Populate any required fields so that the source can be saved.
    1. These parameters will not be used by the CEWS listener so they do not have to be valid for any source.
  6. Click on the WorkFlow Tab
  7. The onProcess workflow is automatically selected (there is no other).
  8. Add any appropriate workflow steps
  9. Save

Populating Return Values

CEWS allows different types of return values. These must be defined when adding them to the Aspire object, for example an array of strings:

Code Block
languagejava
themeFadeToGrey
import java.util.Arrays;

def CEWSString = doc.add("CEWSString").setAttribute("type", "PropertyOfArrayOfstring");
CEWSString.setContent(Arrays.asList("External SharePoint", "External SharePoint|External Teamsites"));

Integer values should be handled as the following example suggests:

Code Block
languagejava
themeFadeToGrey
def CEWSInteger = doc.add("CEWSInteger").setAttribute("type", "PropertyOfint");
CEWSInteger.setContent(11);

Numeric arrays (Integer and Double) should be handled as the following example:

Code Block
languagejava
themeFadeToGrey
def CEWSArrayInteger = doc.add("CEWSArrayInteger").setAttribute("type", "PropertyOfArrayOfint");
Arrays.asList("750", "850").each() { val ->
	CEWSArrayInteger.add("value", val);
}

def CEWSArrayDouble = doc.add("CEWSArrayDouble").setAttribute("type", "PropertyOfArrayOfdouble");
Arrays.asList("750.8888", "850.4444").each() { val ->
	CEWSArrayDouble.add("value", val);
}

Possible value types are:

  • PropertyOfArrayOfdouble
  • PropertyOfArrayOfint
  • PropertyOfArrayOfstring
  • PropertyOfboolean
  • PropertyOfdateTime
  • PropertyOfdouble
  • PropertyOfint
  • PropertyOfstring

Default Return Values

The Aspire CEWS service returns those fields by default:

NameTypeValueaspireCEEndpointPropertyOfstringAddress of Aspire CEWS endpoint, e.g. http://dehensve79.henkelgroup.net:62028/CEWebService.svcaspireCESchemaPropertyOfstringhttp://schemas.microsoft.com/office/server/search/contentprocessing/2012/01/ContentProcessingEnrichmentaspireFeederLabelPropertyOfstringceWebService


How to Configure


SharePoint 2013 CEWS configuration steps and examples

Additionally, all fields passed into the service are returned as well.

Those fields must be defined when configuring SharePoint:

$cec = New-SPEnterpriseSearchContentEnrichmentConfiguration
$cec.OutputProperties = "aspireCEEndpoint", "aspireCESchema", "aspireFeederLabel", ...
...
As an alternative, configure the Aspire CEWS Service to return only certain fields.



Sharepoint configuration

On the SharePoint box we need to configure CEWS to communicate with the our new Aspire endpoint

We need to specify which properties Aspire will be consuming and which properties we will be returning.

We also can configure how to handle the raw document.

Below are the PowerShell commands required to update the CEWS configuration:

# Get the Search Service Application for later
$ssa = Get-SPEnterpriseSearchServiceApplication

# Create a new CEWS config
$config = New-SPEnterpriseSearchContentEnrichmentConfiguration

# Set the endpoint value
$config.Endpoint = "<URLToWebService>"

# Set the Debug value
$config.DebugMode = $False

##############################################################
# IMPORTANT! if you set debug on then the next two parameters#
# are ignored!                                               #
# Debug sends all managed properties instead of the ones you #
# are requesting. It will also ignore any response you send! #
##############################################################

# Set all properties you will send to CEWS, 
# You can also use $config.InputProperties.add("xxx")
$config.InputProperties = "Author", "Filename", "Title"

# Set properties you will export Same process as import properties
$config.OutputProperties = "Author", "Title"

# Do you want the full document to be sent via CEWS (this is a relatively significant performance impact.) ?
$config.SendRawData = $True

# Set the max size of the raw document to 8MB or as desired.
$config.MaxRawDataSize = 8192

# Update the configuration sending the Config and The SSA you just defined
Set-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa -ContentEnrichmentConfiguration $config

The configuration can be removed with:

# Get the Search Service Application for later
$ssa = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa 

You can get the current configuration for review or update with:

Get-SPEnterpriseSearchContentEnrichmentConfiguration 

Known Issues


The service cannot be browsed at http[s]://aspireserver:<port>/<endpoint> if Java 1.8 is installed. The best way to verify that the service is running is browsing http[s]://aspireserver:<port>/<endpoint>?wsdl which should return the CEWS wsdl. Despite the fact that the service is not browsable, it works as expected.


Administration FAQ


The Manage Properties defined in SharePoint 2010 have decimal as one of its data types, however in order to get working values of this type, the Aspire Groovy Script should be defined on the OnProcess satege with the PropertyOfdouble or the PropertyOfArraydouble in case of an array.