- 18 Oct 2024
-
DarkLight
-
PDF
Software Upgrade (EOS) - Transformation
- Updated on 18 Oct 2024
-
DarkLight
-
PDF
Next we will build a Transformation (or JSON Schema Transformation) to manipulate the data from form input to the Itential Pre-Built. We know that users will be submitting data using our form, but when doing that the values are not sent to the workflow individually; they are sent in as a single variable called formData. To handle this, we will need to transform the data. To do that, we will build a transformation.
For this module, we will leverage the JSON Form created in the Software Upgrade (EOS) - JSON Form module. If you have not yet, please complete that module first. We will be using the JSON Preview form data for our Transformation in this module.
JSON Transformation Video
Step 1
Open the JSON Form you just created, Lab – Software Upgrade – IOS Form - XX. Click the eye icon in the upper right.
Step 2
Populate the preview form with the following:
- Auto Approve – True
- Device –EOS
- Image - CloudEOS-4.24.swi
- Flashmemory – flash:
- Version - 4.24
Then click the Show Form Data button in the lower left of the form.
Step 3
Hover your cursor next to the “5 items” text, click on the clipboard icon to copy the data to Clipboard/Text Editor. Then click Close to close the Preview Form.
Step 4
Click the + at the top of the left navigation panel.
Step 5
The Create window opens, Click the drop down and select Transformation.
Step 6
Enter Lab - Software Upgrade - EOS - JST - XX for the name and click CREATE.
Step 7
A fresh transformation canvas loads with a lot of empty space in the center
Step 8
To remove some of the white space, place your cursor near the top of the canvas and click the delete (trash can) icon that displays.
Step 9
Click the Add+ button under Incoming Schema. And Select Incoming Schema.
Step 10
Paste the example data from your JSON Form into the field on the right. Then click the Infer Schema From Example JSON button on the left.
Step 11
By clicking Infer Schema from Example JSON, IAP digests the sample JSON, parses the data, determines the appropriate data types and creates a JSON schema for it. We just need to add an ID.
In line 2 in the “$id” field, enter formData between the double quotes. Click Save at the bottom.
Step 12
Now that you have created an Incoming Schema, you will need to take the data and break it out into the individual variables that the Child Job needs in the workflow. To do that, click the half-circle for the autoApprove value in the Incoming Schema and then click the Add + under Outgoing Schemas. Click on the first option Outgoing Schema.
Step 13
Perform the same steps for the remaining variables. We've now transformed our incoming schema into the structure that the automation requires.
Click the Save Icon in the upper left corner of the screen to save the transformation.