Learn about Jython API

| April 22, 2015 | 0 Comments

There is no quick way to learn Jython API but to experiment with it. The easiest way is to start with Jytutor extension for XL Deploy.

Now you can also use the code snippet for exposing jython/python context in XL Deploy environment by running it directly in Jytutor

Here’s how you can go ahead with that

  1. Download the Jytutor extension referring to the Jytutor Blog or from the following link https://github.com/xebialabs-community/xld-jytutor-plugin/releases
  2. Shutdown your XL Deploy server and drop the extension jar file under XLD_HOME/plugins folder
  3. Restart the server and log back in
  4. You should be able to see Jytutor as the last option in top menu. Click to open that
  5. Now refer to the code snippet in XL Deploy Variables Demystified : Part 2
  6. Once you copy the snippet in Commands section and submit it, this is how it looks.Jython-API-XLD

 

The Standard output  box shows all the complex objects and services that are exposed in the jython context.  You can use this to type your complete script for xl-rules and custom-rest-endpoints , test it without rebuilding/restarting server and then put in your code.

Enjoy!!

 


About the Author ()

Amit is the Lead Pre-Sales Solution Architect managing US Pre-Sales Team at XebiaLabs.