Post to Fileshare SharePoint 2013 (Aspire 2)

From wiki.searchtechnologies.com
Jump to: navigation, search

For Information on Aspire 3.1 Click Here


Post to Fileshare SharePoint 2013 (Aspire 2)
Factory Name  com.searchtechnologies.aspire:aspire-post-fileshare-sp2013
subType  default
Inputs  An Aspire Object with the metadata of each document to be posted.
Outputs  A transformed XML batch, which is then posted to a Fileshare via a JCIFS

The Post Fileshare SharePoint Stage stage applies an XSLT transform to the input batch of AspireObjects and then posts the resulting transformed XML batch to a Fileshare repository and send a notification to the SharePoint Notification Service. The Fileshare repository is indicated by a URL in the following format, smb://<Folder>/<Folder>/..., and the endpoint is indicated by a standard URL, http://localhost/Enspoint.svc

If the Notification Service returns something other than HTTP 200 or 201 (in the HTTP headers), it will retry the notification, sleeping 1 second between each try and failing the notification after a set number of tries, the batch of documents will still be saved in the repository.


NOTE: Post Fileshare SharePoint 2013 has malfunctions when a CIFS Connector is installed on the same server and configure for another server on another domain


Configuration

Element Type Default Description
repository string The URL for the Fileshare repository in which the batches will be posted. The URL of the repository must start with smb://
repDomain string Domain of the username with write permissions to the Fileshare repository.
repUsername string Username with write permissions to the Fileshare repository.
repPassword string Password of the username of the Fileshare repository.
claimIssuer String windows Claim issuer for the acls applied to each document.
useFullName boolean false True if you want to index the full name (domain\user) as the ACL rather than just the username
notificationUrl string URL to the SharePoint Notification Service. must start with a protocol http:// or https://
endDomain string Domain of the username with access permissions to the SharePoint Notification Service.
endUsername string Username with access permissions to the SharePoint Notification Service.
endPassword string Password of the username of the SharePoint Notification Service.
searchApp  (2.1 Release)   string Search Service Application The name of the SharePoint search service.
aspireBDC  (2.2 Release)   String The URL to the Aspire BDC Service
bdcsApp  (2.2 Release)   String Business Data Connectivity Service The name of the SharePoint BDC service
saxonProcessor boolean true True if you want to use saxon as the transformer for the XSL transformation file, else Java standard transformer will be used.
connectNotificationService boolean false Flag that indicates if the Post Fileshare SharePoint 2013 must connect to a SharePoint Notification Service. In case the it does not need to connect to the service, it will still post bathes to a Fileshare repository.
postXsl string   The XSL transform file to be used to transform the incoming Aspire Object document into the XML which is posted to the remote server. There is no default. It must be specified unless postString is specified. Note that this file will be made to be relative to ASPIRE_HOME.
cleanupEnable  (2.2 Release)   boolean false True if you want to enable the CleanUP to delete processed batches on the Intermediate Folder
cleanUpFrequency  (2.2 Release)   integer 10 The frequency (minutes) of the CleanUp to look for processed batches and delete them
readTimeout int 300000ms (5 minutes) Specifies the read timeout for the HTTP Connection - how long to wait before the server responds.
maxTries int 3 The number of times to try submitting the document. If a submit fails, a different URL will be selected from the list of URLs (if the number of URLs is greater than on) and the document will be resubmitted.
retryWait int 1000ms (1 second) The time to sleep between submissions of failed documents.

Example Configuration

  <component name="SharePoint" subType="default" factoryName="aspire-post-fileshare-sp2013">
        <repDomain>${repDomain}</repDomain>
        <repUsername>${repUsername}</repUsername>
        <repPassword>${repPassword}</repPassword>
        <claimIssuer>${claimIssuer}</claimIssuer>
        <useFullName>${useFullName}</useFullName>
        <repository>${repository}</repository>
        <postXsl>${aspireToSPXsl}</postXsl>
        <connectNotificationService>${connectNotificationService}</connectNotificationService>
        <endDomain>${endDomain}</endDomain>
        <endUsername>${endUsername}</endUsername>
        <endPassword>${endPassword}</endPassword>
        <notificationUrl>${notificationUrl}</notificationUrl>
        <aspireBDC>${aspireBDC}</aspireBDC>
        <bdcsApp>${bdcsApp}</bdcsApp>
        <searchApp>${searchApp}</searchApp>
        <bgThread>${bgThread}</bgThread>
        <saxonProcessor>true</saxonProcessor>
        <cleanupEnable>${cleanupEnable}</cleanupEnable>
        <cleanUpFrequency>${cleanUpFrequency}</cleanUpFrequency>
	<debug>${debug}</debug>
  </component>

No Notification Service Configuration Example

  <component name="SharePoint" subType="default" factoryName="aspire-post-fileshare-sp2013">
	<repDomain>your-domain</repDomain>
	<repUsername>your-username</repUsername>
	<repPassword>your-password</repPassword>
	<repository>smb://Repository</repository>
	<postXsl>${appbundle.home}/config/xsl/aspireToSP2013.xsl</postXsl>
	<connectNotificationService>false</connectNotificationService>
  </component>

Batching XML

All you need, is to set up the Branch Handler to use batching. All jobs that get to the stage (for example they come from a sub job extractor) will be ready to be batched when they get to PostHTTP.

Once you set up the branch handler, then set this two additional parameters on PostHTTP:

Element Type Default Description
batchHeader String <batch> String that is wrote in the stream before the first document is received. This consists of the required feed headers for the target search engine or application.
batchFooter String </batch> String that is wrote in the stream after closing the batch. This consists of the required feed footer for the target search engine or application.

Example

Sample application XML configuration:


<?xml version="1.0" encoding="UTF-8"?>
<application name="FeedOneExample">
  
  <components>
    <component name="StandardPipeManager" subType="pipeline" factoryName="aspire-application">
      <components>
        <component name="FetchUrl" subType="default" factoryName="aspire-fetch-url" />

        <component name="WaitForSubJobs" subType="waitForSubJobs" factoryName="aspire-tools"/>

        <component name="XMLSubJobExtract" subType="xmlSubJobExtractor" factoryName="aspire-xml-files">
        <branches>
          <branch event="onSubJob" pipelineManager="." 
                  pipeline="subJobs-process" 
                  batching="true"
                  batchSize="1000"
                  batchTimeout="1000"
                  simultaneousBatches="2"  />
          </branches>
        </component>

        <component name="PostToSharePoint" subType="default" factoryName="aspire-post-fileshare-sp2013">
          <repDomain>${repDomain}</repDomain>
          <repUsername>${repUsername}</repUsername>
          <repPassword>${repPassword}</repPassword>
          <claimIssuer>${claimIssuer}</claimIssuer>
          <useFullName>${useFullName}</useFullName>
          <repository>${repository}</repository>
          <postXsl>${aspireToSPXsl}</postXsl>
          <connectNotificationService>${connectNotificationService}</connectNotificationService>
          <endDomain>${endDomain}</endDomain>
          <endUsername>${endUsername}</endUsername>
          <endPassword>${endPassword}</endPassword>
          <notificationUrl>${notificationUrl}</notificationUrl>
          <aspireBDC>${aspireBDC}</aspireBDC>
          <bdcsApp>${bdcsApp}</bdcsApp>
          <searchApp>${searchApp}</searchApp>
          <bgThread>${bgThread}</bgThread>
          <saxonProcessor>true</saxonProcessor>
          <cleanupEnable>${cleanupEnable}</cleanupEnable>
          <cleanUpFrequency>${cleanUpFrequency}</cleanUpFrequency>
          <debug>${debug}</debug>
	</component>
          
      </components>
      <pipelines>

        <pipeline name="doc-process" default="true">
          <stages>
            <stage component="XMLSubJobExtract" />
          </stages>
        </pipeline>
		  
        <pipeline name="subJobs-process">
          <stages>
            <stage component="PostToSharePoint" />			  
          </stages>
        </pipeline>
      </pipelines>
    </component>
  </components>
</application>