Add Triggers to Determine When Your Pipelines Run

About Triggers

Triggers control pipeline and component activation based on the incoming request (caller plus the input data).

  • Triggers can be specified for any/all of the AutoClassifier components and pipelines.

  • By default, all of the triggers that are listed in the UI are called.

  • You can choose to select one or more filters within the features that you add.

Important! If the trigger evaluation for multiple pipelines determined that processing should be done, only one (the first one) pipeline will be processing the item. 

Specify Trigger Settings

Use the following steps to specify your pipeline or component trigger settings.

  1. On the Pipeline page, select a your pipeline and expand the Trigger section:
  2. To turn on triggers, click Enable. You must enable turn on this setting before you can select any specific Triggers. If this is not enabled, the Pipeline is always called.
  3. Triggers (Optional): If no specific triggers are selected, the Pipeline is always called. Select one or more specific triggers and if the trigger evaluates to True, the pipeline is called: 
    TriggerDescription
    AutoClassifier Annotator

    This is triggered when scheduled annotation service from the SharePoint add-in is initiated.

    For example, when an admin configures the annotation scheduler for the SharePoint add-in and specifies the scheduled time when annotation occurs, this trigger is initiated when the scheduled time is met.

    Connector DocLoader

    This is triggered when the Connectivity Hub doc-loader service is called.

    For example, when an admin is defining the data to be extracted and pushed into their target with doc-loader to download a specific item from the content source, this trigger is initiated when the doc-loader request is sent.

    Connector Test Bench

    This is triggered when Connectivity Hub Test Bench is used for a content source that is integrated with AutoClassifier.

    For example, when an admin integrates AutoClassifier and Connectivity Hub to return metadata to a content source from pipeline stages, then in Connectivity Hub, the admin selects the content source for testing in Test Bench, this trigger is initiated when the test is started.

    Suggestions

    This is triggered when suggestions are generated by through the taxonomy editor.

    For example, when an admin Extends their taxonomy to enrich query results, this trigger is initiated when the term suggestion is generated.

    Connector Crawler

    This is triggered when a crawl from the Connectivity Hub crawl service is initiated for a content source that is integrated with AutoClassifier.

    For example, when an admin integrates AutoClassifier and Connectivity Hub to return metadata to a content source from pipeline stages, then in Connectivity Hub, the admin starts a crawl task, this trigger is initiated when the crawl is started.

    CustomThis is triggered when a customized script is triggered. For example, when an admin configures the script component, this trigger is initiated whenever the specified trigger parameters are met.
    Playback or TestingThis is triggered when pipeline testing is used for the specified pipeline. For example, when an admin selects Pipeline Testing and specifies the pipeline or component that you configured, this trigger is initiated when the test is started.
    SharePoint CrawlerThis is triggered when crawling mode is used for the SharePoint on-premise add-in. For example, when an admin enables crawling mode, this trigger is initiated when a SharePoint on-premise crawl is started.
  4. Trigger Script (optional): Enter a C# or a VB script.
    • Return True in the trigger script to run the pipeline stage. 
    • Return False to skip running the pipeline stage.

Configure Your Triggers Using Scripts

  1. On the Pipeline page, select a your pipeline and expand the Trigger section.
  2. Trigger is enabled: Click. You must select Trigger is enabled before you can make any selections/entries.
  3. In the Trigger Script section, select C# or VB.NET as the script language.
  4. Type in the script.
  5. Compile: Click to verify the validity of the script.

See the following scripting examples:

Example: Retrieving an Item Property

Example: Property Values

Example: Item Raw Data

Example: Logging

Example: Prevent calls for deleted items