Create Pool & Virtual Server (BIG-IP) - Transformations
  • 05 Feb 2024
  • Dark
    Light
  • PDF

Create Pool & Virtual Server (BIG-IP) - Transformations

  • Dark
    Light
  • PDF

Article Summary

Many of the technologies that the Platform communicates with do so through APIs and JSON schema. Often times, when we reach out to a system to retrieve information, more data is returned than perhaps we need or it is in a format that we need to modify. Rather than creating a function that would modify the data for us, we can use our low-code data manipulation tool, JSON Schema Transformation or Transformation, to modify the data so that we can feed it back into our workflow.

For our next activity, let’s create a new Transformation.

Transformation Video

Step 1

From the Itential Automation Platform dashboard, click Automation Studio in the left navigation panel.

Step 2

Click the + at the top of the left navigation panel.

Step 3

Select Transformation in the What would you like to create field. Type Transformation - BIG - IP - XX in the Name field. 

 Click the CREATE button.

Step 4

The Transformation canvas loads with a lot of empty space in the center. To remove some of the white space, place your cursor near the top of the canvas, and a trash can will appear. Click the trash can to remove the extra space.

Step 5

As you can see, we have an Incoming Schema and an Outgoing Schemas. This describes how data will look before and after you manipulate it. 

Many times, you will receive data from a system and that will define your incoming schema. Your outgoing schema will be what you need the data to look like in order to feed it back into your workflow. Let’s start by creating a few incoming variables.

 Click the Add + button below Incoming Schema.

Step 6

And select Incoming Schema. 

Step 7

The Add Incoming Schema window opens.

Step 8

Type firstName between the "" on line 2 to add the required ID property.

Step 9

Type string between the double quotes on line 3 to add the required type property. Click the Save button.

Step 10

Repeat the process to add two additional incoming schema, and two outgoing schema using the data specified below:

Incoming schema

  • ID: lastName
    • type: string
  • ID: numberOfPets
    • type: number

Outgoing schema

  • ID: email
    • type: string
  • ID: petStatus
    • type: string

Step 11

Transformations offer a number of built-in Methods that will manipulate data to fit the needs of the outgoing schema. These Methods do any number of actions from converting data types to creating conditions for the way the data is manipulated. In our exercise today we will use a few of these Methods to better understand their purpose. 

Type concat in the Search field to find the method. The list will filter as you type.

Step 12

Drag the concat string method to the canvas. Concatenation is a method used for combining data. In this case, we'll combine first name input, last name input with a domain to create an email address. 

Note: For additional information about a method, click the i icon next to the method name. This will open a new browser tab and take you to the MDN web docs which can provide you with the method syntax, description, examples and additional information.

Step 13

Click the half-circle to the right of firstName string in the list. Drag a line to the half-circle for the first str parameter in the concat method.

Step 14

Type a . (period) in the str2 field. Connect lastName to the strN property.

Step 15

Type @domain.com in the strN field.

Step 16

Connect the return of the concat method to the email outgoing schema.

Step 17

Add an add (+) method to the canvas. Connect the return of the numberOfPets to the first numN property. Type in the second numN field.

Step 18

Add a greatThan (>) method to the canvas. Connect the return of the add (+) method to the a parameter of the greatThan (>) method. Type 5 in the b parameter field of the greatThan (>) method.

Step 19

Add a ternary method to the canvas. Connect the return of the greaterThan(>) method with the condition field of the ternary method. Connect the return of the ternary method with the petStatus Outgoing Schema.

Step 20

Type That’s a lot of animals! in the exprIfTrue field. Type You need another pet! in the exprIfFalse field. Click the Save icon.

Step 21

Zooming out, you can see that your transformation is now complete. 

 Click the  icon.

Step 22

Replace the null values with the following data:

  • firstName: “First”
  • lastName: “Last”
  • numberOfPets: 3

Step 23

Click the Run button.

Step 24

Review the output. When you are finished, close the JST Designer tab in your browser and navigate back to the Automation Studio view.



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.