Vulcan-Style Scripts
Extend Plugins 2022 added an option to the Extend Python Script workflow component to enable running scripts “Vulcan-style”. This can be enabled by setting the run style to “Vulcan (Legacy)” as shown in the below screenshot:
This instructs the Extend Python Script workflow component to emulate the behaviour of the Python Script component which is shipped with Vulcan. Thus it will:
-
Open Vulcan before the component runs.
-
The “Generate Connectors” button will be disabled.
-
Running scripts Vulcan-style does not use WorkflowArgumentParser, so there is no way to generate connectors.
-
-
Attributes are available in the script as their name, prefixed with an underscore.
-
Unlike in Vulcan, there is no option to suppress prefixing attribute names with an underscore.
-
-
Any variable defined which does not start with an underscore is set as an output attribute.
-
Use Python’s del keyword to delete unwanted variables.
-
-
The built-in items list is available as the special variable _items. Changes to this will be propagated to the workflow.
Note that:
-
Running scripts Vulcan-style is intended to ease porting scripts from Vulcan’s Python script workflow component. It should not be used for new workflows.
-
Vulcan-style scripts typically cannot be run outside of a workflow because they rely on the workflow to define their inputs. This can make them difficult to develop and debug.
-
Any variable defined in a Vulcan-style script which does not start with an underscore becomes an output of the component. This can cause surprising and difficult to debug behaviour.
For example, if a workflow uses i as a loop variable and runs a Vulcan-style script which contains a loop with uses i as the loop variable, the Vulcan-style script will overwrite the workflow’s i with the value of i in the script, thus changing the number of times the workflow loops. In the worst case scenario, this could cause the workflow to enter an infinite loop.
-
Running a script Vulcan-style will use the Python distribution configured in the Python preferences. To use the Vulcan Python SDK, you will need to configure this to be Vulcan’s distribution of Python until the Vulcan Python SDK can be installed into external Python distributions.