On this page:

Step 0. Prerequisites


  • Python.
  • Flask.


Step 1. Launch Aspire and open the Content Source Management Page


Launch Aspire (if it's not already running). See:

Step 2. Add a new Content Source


  • For this step please follow the step from the Configuration Tutorial of the connector of you choice, please refer to Connector list


Step 3. Add a new Aspire Python Bridge to the Workflow


To add an Aspire Python Bridge drag from the Aspire Python Bridge rule from the Applications Workflow Library and drop to the On Add Update Workflow Tree. This will automatically open the Aspire Python Bridge window for the configuration.






Step 4. Specify Configuration Information


In the Aspire Python Bridge window, specify the desired options for General Configuration

  1. User Virtual Environment?: Check this if scripts will be run in a specific virtual environment.
    1. Python Executable Location: If the "User Virtual Environment?" checkbox is left unchecked, the scripts will be run in the main python installation. In this case the user must enter the Python executable's location.
    2. Virtual Environment Path: If the "User Virtual Environment?" checkbox is  checked, the scripts will be run in the virtual environment specified by the user. In this case the user must enter of the location of the virtual environment to be used.
  2.  Script Type: currently, the only option available is "Script File".
    1. Script File: enter the location of your script.
  3. Thread Count: This is the number of Python server threads to be started. 
  4.  Base Port Number: this is the base port for the Python servers. The system will try to start the first server on the specified port, if it is not available will try with the specified port +1, and so on. Then, for the second server it will try the following port by adding +1 to the base port, if unavailable then it will try the next one and so on.

  5.  Enable Document Filtering: enables sending pieces of the original Aspire Object instead of the full object by using xPath. You can read about xPath here.
  6. Merge Document?: if disabled, the result of the script will be added to the Aspire Object of the job under a "pythonBridgeResponse" tag. If enabled, the results will be merged with the contents of the Aspire Object of the job.

    1. Extend: if extend is selected as the merge approach, root objects from the script will be added to the Aspire Object of the job.

    2. Replace:  if replace is selected as the merge approach, root objects from the script will replace the objects of the Aspire Object of the job, if they existed. If they didn't exist, they will be added.









Once you've clicked on the Add button, it will take a moment for Aspire to download all of the necessary components (the Jar files) from the Maven repository and load them into Aspire. Once that's done, the publisher will appear in the Workflow Tree.



The scripts to be run should be composed of one or two parts, depending on what is needed for its execution:  

  • (optional) A "init" function that must return a dictionary with any values to be used during the execution.
  • (mandatory) A "process" function which will take a first parameter "data" where the Aspire Object from the job is passed and a second parameter "dictionary" that will contain the dictionary that was returned from the "init" function described before. If there was no "init" function, an "dictionary" will be empty.

For details on using the Workflow section, please refer to Workflow introduction.