Configuring the Script

To add an Extend Python Script to a workflow, open the Workflow Editor and drag and drop the script onto the workflow. The resulting custom component will have the same name as the file name.

In the Workflow Editor, when you click on a component it opens up a configuration panel.

The Extend Python script component has the following elements:

  1. Python Script File — Contains the path to the script to run, but empty for embedded scripts. The Browse button can be used to open a file explorer to select a Python Script for the component to run.

  2. Embedding File — Copies the script into the workflow. As the workflow has its own copy, changes to the original script file do not affect the embedded version and vice versa. If a script is already embedded, this button will become a Clear Embedded option, which will permanently delete the embedded script.

  3. Edit Script — Opens the script for editing. The default editor is Visual Studio Code if installed, otherwise the Workflow Editor uses the Workbench Text Editor. You can also use this button to edit an embedded script. Note that, the temporary file used to edit embedded scripts is deleted when the workflow is run. Therefore, if you wish to edit the script, you will need to press the Edit button again. Also note that compiled python files (Files with the “.pyc” extension) cannot be edited.

  4. Generate Connectors — Deletes all of the connectors on the workflow component and generates a fresh set from the selected Python Script. Useful if you have changed the configuration of the connectors and want to reset it. Can also be used to generate the connectors if the generation failed during drag and drop.

  5. Open Shell Window — Allows input and output to be provided to the running Python script. Actively discouraged, as inputs and outputs should be added using the connectors.