Run Python Activity


The Run Python activity runs a Python script on the server.

Depending on the Python script specified, an array of input arguments to the script may be required.

This activity requires Python to be installed on the server and accessible to the Workflow application.


A workflow in a client application could use the Run Workflow activity to run a server workflow. The server workflow could use the Run Python activity to perform a computation, business operation, or some other analysis using a Python script, followed by a Set Workflow Output activity to return the result of the Python script to the client application. Finally, the client application could use the Python result to update the application or present information to the end user.


Python File


Type: String

The path of the Python script (.py) file on the server. It must contain a function called main that accepts an array of strings and returns a string. For more information, see Execute Python scripts.



Type: String[]

The list of arguments to pass to the Python script.



Type: Number

The time span in milliseconds to wait for the Python script to complete. The default is 60000 (one minute).



Type: String

The text output of the Python script.


Type: Boolean

Whether the Python script completed successfully.


Type: String

Any error messages written by the script.


Type: Number

The exit code returned by the script. An exit code other than zero usually indicates a failure.


For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Connectivity Requirements

This activity does not work when the device has intermittent connectivity to the network.

See also...