68584

Call Python Method

Purpose

Calls a Python method.

Description

The Call Python Method activity calls a Python method. In the given example, the Call Python Method activity calls a method calls a user-defined method named as sum that is designed to add two numbers. The two numbers are passed to the method as arguments and the result is assigned to Result.



Properties

Property

Data Type

Description

General

 

 

Display Name

String

Display name of the component.

Enable Pause

-NA-

Option to pause the activity (related to the component) during a job execution after receiving a pause control signal from the Cockpit application. The checkbox is selected by default.

Input

 

 

Method Name*

String

Python method can either be a user-defined method that should be available within the Python object or it can be a native Python method like print().

Note: To see the method details, check the Python Script property of the Execute Python Script activity from which the the Python Object is returned.

Python Object^

PythonObject

A python object that contains a set of user defined methods. This object is returned as a result of the Execute Python Script activity.

Note: An object is not required if a native python method like print is called.

Misc

 

 

Enable Bookmark

-NA-

Option to set a bookmark.

Is Reserved

-NA-

Option to disable data tracing related to the component.

TypeArgument*

-NA-

Indicates the variable type of the result.

Output

 

 

Result

Based on TypeArgument variable type

Result as returned by the Python method.

Preferences

 

 

Arguments^

IEnumerable<Object>

Arguments that are needed by the Python method. The variable type of the arguments and their numbers should match the parameter list defined in the Python method.

For example, if method has been defined as sum(a,b), where a and b are method parameters, then two integer numbers should be passed as arguments to the method.

Fields marked with * sign are the mandatory.

Fields marked with ^ sign are needed in special cases. Refer respective note provided in the field description.