Run Python Activity

Description

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

This activity requires Python to be installed on the server.

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

Usage

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.

Environment

The Run Python activity is a server activity. It can only be used in server workflows, which require on-premises Workflow.

Offline Support

This activity does not work when the device is offline.

Inputs

Python File

Required

Type: String

The path of the Python script (.py) file on the server.

Arguments

Optional

Type: String[]

The list of arguments to pass to the Python script.

Timeout

Optional

Type: Number

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

Outputs

result

Type: String

The text output of the Python script.

success

Type: Boolean

Whether the Python script completed successfully.

Properties

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

See Also...

https://www.python.org

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.11