Please enable JavaScript to view this site.

Version:

Navigation: Activities > Activity Reference

Run Python Activity

Prev Top Next More

Description

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.

Python must be installed for all users. For more information, refer to the Python documentation.

The python configuration should be supplied before using this activity.

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.

Inputs

Python File

Required

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.

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.

error

Type: String

Any error messages written by the script.

exitCode

Type: Number

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

Properties

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...

https://www.python.org

© 2024 VertiGIS North America Ltd. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 5.42 (58a5caf5)