Install the Python engine
In order to use Python in OL Connect Workflow, the Python engine needs to be installed and registered as follows:
-
Stop all OL Connect Messenger services.
-
With an admin command line, install
pywin32using the method documented at https://github.com/mhammond/pywin32?tab=readme-ov-file#installing-via-pip:-
Installing via PIP.
-
python -m pip install --upgrade pywin32
-
-
Installing globally.
-
python Scripts/pywin32_postinstall.py -install
-
-
-
With an admin command line, go to
C:\Program Files (x86)\Python312-32\Lib\site-packages\win32comext\axscript\clientand runpython pyscript.py -
Test by running a Python script through the Windows Script Host, e.g.
C:\Windows\SysWOW64\cscript.exe gou.pys. -
With this procedure, the following script runs successfully in Workflow:
myvar = Watch.GetJobFileName()
Watch.Log("File name is: "+myvar, 2)
-
Restart OL Messenger services.
Note: Python scripts need to have the .pys file extension to be recognized as such by the Windows Script Host.
Python 3.11 is required due to https://github.com/mhammond/pywin32/pull/2113. Python 3.12 with pywin32 is not compatible with ActiveScript a.k.a. Windows Script Host.
This install is tested for OL Connect 2024.1.
Newer versions of Python have not been tested and may not be fully compatible with OL Connect Workflow.