Tour Guide

On this page:

Pass Data Between Tasks

Passing Data Between Tasks

In this section you will add another task to your automation and pass variable data to it.

Prepare the Canvas

Let's prepare the workflow canvas by adding another task.

  1. Go back to the Automation Studio tab.

    • If you closed the application tab, simply go to the IAP home screen and click the "Automation Studio" tile.
    • Select Find an Automation and search for the "EnlightenMe" automation you created previously.
  2. Click the green transition line between the FetchFact and End tasks.

  3. Either press the "delete" button on your keyboard, or click the trashcan icon in the upper-right corner of the canvas to delete the green transition line.

  4. In the Task Menu Sidebar, search for "Query" and add it to your canvas.

  5. Add a transition between the FetchFact and Query tasks, and then add another between the Query and End tasks.

You should now have four different (yet connected) tasks on your canvas:

  • FetchFact
  • Query
  • END

Figure 1. Add Query Task


Configure the Query Task

Next, let's configure the variable information.

  1. Double-click the Query task to open the configuration window for it.

  2. Change the Summary field to read "IsolateFact".

  3. Change the Description field to read "Just give me the fact".

  4. For this example, set the Reference variable for pass_on_null to False. This tells the automation to "fail" the task in Job Manager if no value is provided.

  5. Set the query Reference variable to value.joke.

    • For this step, go back to the Job Manager tab you left open. Refer to the response variable in the OUTGOING tab of the Task History. The response was provided in the form of a JSON object.
    • In the JASONPath syntax of the response, find where value.joke exists as a key-value pair.

    Note: For more information on JSONPath syntax, we recommend reading JSONPath-XPath for JSON. We also recommend the JSONPath Online Evaluator when experimenting with JSONPath data extraction.

  6. Change the obj Reference task from "static" to FetchFact and accept the default response that displays. This indicates the data you want to search through will be provided by FetchFact.

  7. Click SAVE (lower-left corner) to close the Query task configuration window.

  8. Click SAVE on the workflow canvas to save the entire automation.

  9. Hover over the Query task to show the tooltip "Just give me the fact".

Run the Automation

To test run the automation:

  1. Go to the upper-left corner of the canvas, click the blue play arrow to the right of the Automation Name. A modal window will open.

  2. Click the START button in the left corner of the modal. A green toast banner will pop-up at the bottom of the screen.

  3. Click the message link that says CLICK TO VIEW JOB.

  4. The Job Manager tab opens in your browser and shows the status of the automation you just executed. This time, two tasks are displayed:

    • IsolateFact
    • FetchFact

    Figure 2. Job Manager Details


  5. Click the book icon at the end of the IsolateFact task.

  6. The Outgoing tab in the Task History reveals the value of the return_data variable, indicating that you successfully isolated the incoming fact from the data that was returned by the Query task.

    Figure 3. Outgoing Task History


Summary Wrap-Up

Congratulations on completing this segment of the tour! By now, you should know how to:

  • Build an automation.
  • Pass variable data between tasks in an automation.
  • Use the Query task to isolate values from objects.

In the next section, you will learn how to customize the input values.