Summary:
MassTransit supports running a variety of program and scripts as action tasks when events occur in MassTransit. There are some important details and limitations about how MassTransit launches these programs and scripts that need to be taken into account when configuring this feature on Windows.
For information about how to ensure proper operation of Launch Process actions on MassTransit 7 and later, please refer to Actions page.
Description:
Programs and scripts launched by MassTransit launch process actions run in the same fashion as the MassTransit Engine. They run as the same user as the MassTransit service, with the same permissions. They do not have any user interface to display dialogs and prompts. You should not configure processes and scripts which that have any user interface or require user input of any kind to complete.
When running interpreted scripts (e.g. Perl scripts, Python scripts, PHP scripts) using this feature, your Windows file associations will need to be properly configured to ensure that MassTransit can call the appropriate file interpreter for the script.
A good way to test that the associations are set correctly is to run the script at the Windows command line and see if the script runs properly.
1. Find the path to the script (e.g. c:\scripts\myscript.py).
2. Open the Windows command line.
3. Enter the full path to the script in quotes and press enter (e.g. "c:\scripts\myscript.py").
If the script runs correctly, MassTransit action tasks for that script should work properly. If the script does not run or runs unexpectedly, you can use the following commands to determine and set the file associations:
4. Enter "assoc [EXTENSION]" at the command line, where [EXTENSION] is the extension of your script (e.g. assoc .py).
You should see the type of the file as recognized by Windows (e.g. .py=Python.File).
5. To determine the actual command used to launch that file type, enter "ftype [FILETYPE]" where [FILETYPE] is the type listed by the assoc command (e.g. ftype Python.File).
You should see the command that will be used to launch files of that type (e.g. "Python.File="C:\Python\python.exe "%1" %*).
If your association or file type are not set or are incorrect, you should try reinstalling your script interpreter. The interpreter installer generally has an option for configuring file associations. If this does not solve the problem, you can use the assoc and ftype commands to manually set associations.
If you follow these instructions and are still having problems getting your scripts and programs to run as MassTransit action tasks, please contact Group Logic technical support.