Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

You open the Python Connector agent configuration dialog from a workflow configuration: you can right-click the agent icon and select Configuration..., or double-click the agent icon.

The Python Connector agent configuration has three tabs: General, API, and MIM.

General Tab

The Python Connector agent - General tab


Setting
Description

Host

The IP address or hostname to which the Python Connector will bind. If left empty, the Python Connector binds to all IP addresses available on the system.

Port

The port number on which the Python Connector will bind. Ensure that the port is not used by other applications.

Allow Multiple ConnectionsIf enabled, several connections are allowed simultaneously. If disabled, only one at a time is allowed.
Number of Connections AllowedIf Allow Multiple Connections is enabled, the maximum number of simultaneous connections is specified as a number between 0 and 99999.
Use Connection Control

Select this option if you want to control connection requests individually. If you select this option, you may need to make a selection for Route Connection Requests on. See the description below.

Route Connection Requests onSelect on which route you want to route connection requests when a user requests to connect. Select one of the possible routes listed in the drop-down list.
Use per Connection RoutingSelect this check box if you want to control what each individual connection is routing.
Use TLS

Select this check box if you want to use TLS. When you select this check box, the fields under Security are enabled.

If you want connections to use SSL, see 9.62.6.3.5 Connecting Using SSL.

Keystore PathEnter the path to the keystore in this field.
Keystore PasswordEnter the password for the keystore in this field.
Key AliasEnter the alias for the key in the keystore in this field. This field is optional
Key PasswordEnter the password for the key alias in this field. This field is optional.
Require Client AuthenticationSelect this check box if you require client authentication from all connecting clients.

Accepted Types

Select which data types are to be accepted by the Python Connector agent. You can select UDR types or bytearrays.

Output RoutesEnter which route accepts what data type.

API Tab

The API tab allows you to define your own agent API exposed to your connecting users.

You can use __all__ = ['<name1>', '<name2>', ..] to only expose the names listed as the API instead of adding to the default API. See the example shown in the image below. The Python Language Service tool must be running to enable the Compilation Test. For further information, see 9.50.4 Python Language Service.

For further information on writing code in the API tab, see 9.63.5 Python Writer's Guide.

Python Connector agent - API tab

MIM Tab

In the MIM tab you can set the MIMs that you want the the Python Connector agent to publish.

Python Connector agent - MIM tab

ParameterDescription
AssignedSelect the type of MIM assigned. Only MIMs of the global type are available.
NameEnter the MIM resource name.
TypeSelect the data type of MIM resource.

Connecting with an Exploration Tool using Python

To be able to connect the exploration tool of your choice to the Python Connector agent, you must first import the connector Python module: mzconnector.py. The connector module, mzconnector.py, is extracted to MZ_HOME/python during installation. For easy access, you can copy this module to a directory on your local machine, which you will connect from.

All the Python code, which also includes the Python code in the API tab and the code imported from the Python Module profile, is executed by the Python process that connects on your local machine, while the APL code is executed on the EC server.

After you have configured a Python Connector agent within a real-time workflow, you must start the workflow before you can start to interact using an exploration tool.

You can then start to run your script. In the following example, Jupyter Notebook is used to connect to a simple workflow.

Example - Interaction via Python Connector agent

The Python Connector agent is configured to accept DRUDR types.

The Analysis agent is configured to debug the input and send UDRs to route r_2 back to the Python Connector agent.

As shown below, you can trigger activity in the workflow using an exploration tool, Jupyter Notebook is used in this example.



  • No labels