Salesforce Application Bundle (Aspire 2)

From wiki.searchtechnologies.com
Revision as of 23:52, 8 December 2015 by Dherrera (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

For Information on Aspire 3.1 Click Here


Salesforce Application Bundle (Aspire 2)
AppBundle Name  Salesforce Connector
Maven Coordinates  com.searchtechnologies.aspire:app-salesforce-connector
Versions  2.2.2
Type Flags  scheduled
Inputs  AspireObject from a content source submitter holding all the information required for a crawl.
Outputs  An AspireObject containing the URL, content, Connector Metadata (Aspire 2) processed for each file.
Feature only available with Aspire Enterprise

The Salesforce Connector performs full and incremental scans over a Salesforce repository and will extract security, metadata, and content from each object scanned. Each scanned object will be tagged with one of three possible actions--add, update, or delete--and can be routed to any Aspire pipeline as desired.

The connector, once started, can be stopped, paused or resumed via the Scheduler Component. Typically the start job will contain all information required by the job to perform the scan. When pausing or stopping, the connector will wait until all the jobs it published have completed before updating the statistics and status of the connector.



Configuration

This section lists all configuration parameters available to install the Salesforce Application Bundle and to execute crawls using the connector.

Property Type Default Description
snapshotDir string ${aspire.home}/snapshots The directory for snapshot files to be stored.
disableTextExtract boolean false By default, connectors use Apache Tika to extract text from downloaded documents. If you wish to apply special text processing to the downloaded document in the workflow, you should disable text extraction. The downloaded document is then available as a content stream.
workflowReloadPeriod int 15m The period after which to reload the business rules. Defaults to ms, but can be suffixed with ms, s, m, h or d to indicate the required units.
workflowErrorTolerant boolean false When set, exceptions in workflow rules will only effect the execution of the rule in which the exception occurs. Subsequent rules will be executed and the job will complete the workflow sucessfully. If not set, exceptions in workflow rules will be re-thrown and the job will be moved to the error workflow.
useGE boolean false true if group expansion is going to be used.
geSchedule string 0 0 0 * * ? Indicates how often the group expasion is going to fetch all the security groups.
url string none The url to the Jive Community.
username string none The user used to fetch the security groups.
password string none The password for the user
securityToken string none The security token for the user given by Salesforce.
consumerKey string none The consumer key of an app in salesforce with access to the chatter feed.
consumerSecret string none The consumer secret of an app in salesforce with access to the chatter feed.
debug Boolean false Controls whether debugging is enabled for the application. Debug messages will be written to the log files.


Configuration Example

To install the application bundle, add the configuration, as follows, to the <autoStart> section of the Aspire settings.xml.

  <application config="com.searchtechnologies.aspire:app-salesforce-connector">
    <properties>
      <property name="generalConfiguration">false</property>
      <property name="snapshotDir">${dist.data.dir}/${app.name}/snapshots</property>
      <property name="disableTextExtract">false</property>
      <property name="workflowReloadPeriod">15s</property>
      <property name="workflowErrorTolerant">false</property>
      <property name="useGE">true</property>
      <property name="geSchedule">0 0 12 ? * *</property>
      <property name="url">https://server.salesforce.com/</property>
      <property name="username">Admin</property>
      <property name="password">encrypted:63AA72A7708C8999DEE56A41894EBEEB</property>
      <property name="securityToken">cCvdj734569Y8Dr6x7q0B1EMlj</property>
      <property name="consumerKey">3MVG9A2kN3Bn17hur4567s9aRCfqj67yd3oQf4zbpuN4fP5eIhrQ6P6pFOHm3XFlKCUV80Dz83yOlNJ9jZsod</property>
      <property name="consumerSecret">8679403223409016057</property>
      <property name="debug">true</property>
    </properties>
  </application>

Note: Any optional properties can be removed from the configuration to use the default value described on the table above.



Source Configuration

Scanner Control Configuration

The following table describes the list of attributes that the AspireObject of the incoming scanner job requires to correctly execute and control the flow of a scan process.

Element Type Options Description
@action string start, stop, pause, resume, abort Control command to tell the scanner which operation to perform. Use start option to launch a new crawl.
@actionProperties string full, incremental When a start @action is received, it will tell the scanner to either run a full or an incremental crawl.
@normalizedCSName string Unique identifier name for the content source that will be crawled.
displayName string Display or friendly name for the content source that will be crawled.

Header Example

  <doc action="start" actionProperties="full" actionType="manual" crawlId="0" dbId="0" jobNumber="0" normalizedCSName="FeedOne_Connector"
   scheduleId="0" scheduler="##AspireSystemScheduler##" sourceName="ContentSourceName">
    ...
    <displayName>testSource</displayName>
    ...
  </doc>

All configuration properties described in this section are relative to /doc/connectorSource of the AspireObject of the incoming Job.

Element Type Default Description
url string none The url to the Salesforce repository.
username string none The name of the user that is going to be use for the crawl
password string none The password of the user.
pageSize string none The Page Size that will specify the number of elements to retrieve per request to the server.
timeOut string none Time in seconds before the connection gives a timeout.
maxRetries string none Number of attempts before the connection gives error.
sQueries string none Directory where the mapDBs for the ACLs and the Hierarchy will be placed.
mapsDBDir string none Directory where the mapDBs for the ACLs and the Hierarchy will be placed.
timestampDir string none Directory where timestamp will be placed.
fetchAttach string none Check if you want fetch all the available attachments.
fileNamePatterns/include/@pattern regex none Optional. A regular expression pattern to evaluate file urls against; if the file name matches the pattern, the file is included by the scanner. Multiple include nodes can be added.
fileNamePatterns/exclude/@pattern regex none Optional. A regular expression pattern to evaluate file urls against; if the file name matches the pattern, the file is excluded by the scanner. Multiple exclude nodes can be added.


Scanner Configuration Example

  <doc action="start" actionProperties="full" normalizedCSName="testFile">
    <connectorSource type="salesforce">
      <url>https://na15.salesforce.com</url>
      <useGE>false</useGE>
      <username>e.raizen@gmail.com</username>
      <password>encrypted:0DA6E11EA40804BADERA6B234704BE1A</password>
      <securityToken>encrypted:792C58539917465DFRS349B392ED871094EF7F7A7097008F8A9AEC5743DD2ACF</securityToken>
      <pageSize>500</pageSize>
      <timeOut>5</timeOut>
      <maxRetries>3</maxRetries>
      <fileNamePatterns>
        <include pattern=".*pattern.*"/>
        <exclude pattern=".*pattern.*"/>
      </fileNamePatterns>
      <sQueries>C:\Lasith\MyWork\CSL\ST\salesforce\2.22\target\dist-1.0-SNAPSHOT-distribution/cache/appbundles/com.searchtechnologies.aspire/app-salesforce-connector/2.1-SNAPSHOT/config/xml/sQueries.xml</sQueries>
      <mapsDBDir>C:\Lasith\MyWork\CSL\ST\salesforce\2.22\target\dist-1.0-SNAPSHOT-distribution\data/salesforce001/mapsDB</mapsDBDir>
      <timestampDir>C:\Lasith\MyWork\CSL\ST\salesforce\2.22\target\dist-1.0-SNAPSHOT-distribution\data/salesforce001/timestamp</timestampDir>
      <fetchAttach>true</fetchAttach>
      <indexSpecific>false</indexSpecific>
      <chatterFeed>false</chatterFeed>
      <displayName>salesforce001</displayName>
    </connectorSource>
    <displayName>testFile</displayName>
  </doc>

Note: To launch a crawl, the job should be sent (processed/enqueued) to the "/SalesforceConnector/Main" pipeline.


Output


<doc>
  <docType>item</docType>
  <url>https://na15.salesforce.com/006i000000GjvaTAAR</url>
  <fetchUrl>https://na15.salesforce.com/006i000000GjvaTAAR</fetchUrl>
  <displayUrl>https://na15.salesforce.com/006i000000GjvaTAAR</displayUrl>
  <snapshotUrl>001 https://na15.salesforce.com/006i000000GjvaTAAR</snapshotUrl>
  <id>006i000000GjvaTAAR</id>
  <repItemType>aspire/Opportunity</repItemType>
  <createdBy>Esteban Alvarado</createdBy>
  <modifiedBy>Esteban Alvarado</modifiedBy>
  <owner>Esteban Alvarado</owner>
  <lastModified>2014-02-25T23:04:36Z</lastModified>
  <connectorSpecific>
    <field name="Name">United Oil Plant Standby Generators</field>
    <field name="Type">Existing Customer - Upgrade</field>
    <field name="OwnerName">Esteban Alvarado</field>
    <field name="StageName">Needs Analysis</field>
    <field name="AccountId">001i000000eI1a6AAC</field>
    <field name="AccountName">United Oil & Gas Corp.</field>
    <field name="CreatedByName">Esteban Alvarado</field>
    <field name="OwnerId">005i0000002wz4tAAA</field>
    <field name="CreatedById">005i0000002wz4tAAA</field>
    <field name="CreatedDate">2014-02-25T23:04:36Z</field>
    <field name="LastModifiedByName">Esteban Alvarado</field>
    <field name="LastModifiedById">005i0000002wz4tAAA</field>
    <field name="LastModifiedDate">2014-02-25T23:04:36Z</field>
    <field name="SystemModstamp">2014-02-25T23:04:36Z</field>
    <field name="IsDeleted">false</field>
    <field name="IsPrivate">false</field>
    <field name="ExpectedRevenue">135000.0</field>
    <field name="IsClosed">false</field>
    <field name="Amount">675000.0</field>
    <field name="CloseDate">2012-02-05T18:30:00Z</field>
    <field name="Fiscal">2007 3</field>
    <field name="FiscalQuarter">3</field>
    <field name="FiscalYear">2007</field>
    <field name="ForecastCategory">Pipeline</field>
    <field name="ForecastCategoryName">Pipeline</field>
    <field name="HasOpportunityLineItem">false</field>
    <field name="IsWon">false</field>
    <field name="Probability">20.0</field>
  </connectorSpecific>
  <acls>
    <acl access="allow" entity="group" fullname="System Administrator" name="00ei0000001DtOLAA0" scope="global"/>
    <acl access="allow" entity="user" fullname="Esteban Alvarado" name="005i0000002wz4tAAA" scope="global"/>
  </acls>
  <connectorSource type="salesforce">
    <url>https://na15.salesforce.com</url>
    <useGE>false</useGE>
    <username>e.raizen@gmail.com</username>
    <password>encrypted:0DA6E11EA40804SFRX1A6B234704BE1A</password>
    <securityToken>encrypted:792C58539917465DD61349B392DFRS1094EF7F7A7097008F8A9AEC5743DD2ACF</securityToken>
    <pageSize>500</pageSize>
    <timeOut>5</timeOut>
    <maxRetries>3</maxRetries>
    <sQueries>C:\Lasith\MyWork\CSL\ST\salesforce\2.22\target\dist-1.0-SNAPSHOT-distribution/cache/appbundles/com.searchtechnologies.aspire/app-salesforce-connector/2.1-SNAPSHOT/config/xml/sQueries.xml</sQueries>
    <mapsDBDir>C:\Lasith\MyWork\CSL\ST\salesforce\2.22\target\dist-1.0-SNAPSHOT-distribution\data/salesforce001/mapsDB</mapsDBDir>
    <timestampDir>C:\Lasith\MyWork\CSL\ST\salesforce\2.22\target\dist-1.0-SNAPSHOT-distribution\data/salesforce001/timestamp</timestampDir>
    <fetchAttach>true</fetchAttach>
    <indexSpecific>false</indexSpecific>
    <chatterFeed>false</chatterFeed>
    <displayName>salesforce001</displayName>
  </connectorSource>
  <action>add</action>
  <hierarchy>
    <item id="20679D3C4992C1C8392B3F22402E2212" level="1" url="https://na15.salesforce.com/006i000000GjvaTAAR"/>
  </hierarchy>
</doc>