Pyhton Component Reference With Mule ESB

 

Python is a general-purpose, versatile and popular programming language and it is also high-level, interpreted, interactive and object-oriented scripting language.

 

  • Python is Beginners Language.
  • Python is Interpreted.
  • Python is Interactive.
  • Python is Object Oriented Language.

Mule ESB provides the component known as Python Component Reference, it allows you to write the Python code and even you can call the python code from files.
Python also allows the developer to configure interceptors and alter the values or references of particular properties in a script. Interceptors are configured to provide additional services to a message as it flows through a component. For example, a developer can configure an interceptor to execute scheduling or logging of a particular event while a message is being processed. The Python component also includes a custom interceptor which allows you to configure settings for Spring elements.

Configuration

Basically you can find the Python component in Mule Palette. Under General tab, you can provide python script or python script file location.

  • Display Name is unique name for your python component.
  • Script can be provide directly into component or it can be loaded from some file system.Script Text is type of component that loaded script directly into your workspace. Script File is used to load the python script file from the path which you specified.

Under Advanced tab, you can define the interceptors and properties.

Interceptors alter the values or references of particular properties in a script. They are configured to provide additional services to a message as it flows through a component. For example, you can configure an interceptor to execute scheduling or logging of a particular event while a message is being processed. The Script component also includes a custom interceptor which allows you to configure settings for Spring elements.

Script Properties is used to configure these parameters to define the attribute keys and their associated values. This enables the script component to quickly look up a value associated with a key.

Here is the video tutorial.

Add a Comment

Your email address will not be published. Required fields are marked *