Console Operator
Overview
The Console operator watches data passing through the other Data Workflow operators. When connected to another operator, the Console operator logs its data in the DevTools Console. It lets you watch your workflow and determine if it's working correctly.
Without the Console operator, you can only view data at the start (input) or end (output) of your Data Workflow. This limited view skips all the steps between. Adding a Console operator after each step of the workflow lets you inspect the effects of the other operators. Watching your workflow is helpful when you need to troubleshoot your Data Workflows.
What You'll Learn
In this article, you'll learn:
About the Info Window
Here's what the Console operator looks like, along with its Info window:
And here's a breakdown of each setting in the Info window:
Setting |
Description |
---|---|
Label |
Sets the label for your operator. The label you enter here shows beneath your operator on your Data Workflow canvas. This field is optional, but set a label if you use more than one of the same operator type. A label helps you identify your operators without opening any Info windows. Labels are especially helpful with Console operators. This is because you see these labels logged in DevTools. |
Adding a Console Operator
To demonstrate adding a Console operator, you can create a simple module populating 2 fields with Not Applicable. The Console operator lets you see the effect in the DevTools Console.
Here's how the completed use case looks in the Module Builder:
What You Need
To set up this use case, you need:
-
2 Text Field components
-
1 Button component
-
1 Data Workflow component
To set up your Data Workflow, you need:
-
1 Create Value operator
-
1 Set Outputs operator
-
1 Console operator
Configure the Text Field Components
First, add 2 Text Fields to serve as the Output components.
1. | Drag and drop 2 Text Field components onto your canvas. |
2. | Enter the following Property IDs and Label Text: |
Property ID |
Label Text |
---|---|
jobTitle |
Job Title |
salary |
Salary |
3. | Save each component as you add it. |
Configure the Data Workflow Component
Next, set up the Data Workflow itself.
1. | Drag and drop a Data Workflow component onto your canvas. Place it under the Text Fields. |
2. | In the Label and Property Name fields, enter dwfValue. |
3. | From the Trigger Type drop-down, select Manual. |
Configure the Create Value Operator
1. | Drag and drop a Create Value operator onto your Data Workflow canvas. |
2. | Configure the Input operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Create Value |
Label |
Create GO Value |
Expression/Value |
"yes" |
Configure the Set Outputs Operator
1. | Drag and drop a Set Outputs operator onto your Data Workflow canvas. |
2. | Configure the Set Outputs operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Set Outputs |
Component |
jobTitle |
Component 1 |
salary |
Action |
Value |
setValue |
Not Applicable |
3. | Connect the output port (right) of the Create Value operator to the input port (left) of the Set Outputs operator. |
Configure the Console Operator
1. | Drag and drop a Console operator onto the Data Workflow canvas. |
2. | In the Label Text field, enter Not Applicable. |
3. | Connect the output port (right) of the Create Value operator to the input port (left) of the Console operator. |
4. | Click Save. |
Configure the Button Component
Finally, to trigger the Data Workflow, add a Button component.
1. | Drag and drop a Button component onto your canvas. Place it above your Data Workflow component. |
2. | In the Property ID field, enter btnValue. |
3. | In the Label Text field, enter Not Applicable. |
4. | Set the Button Action Type to Event. |
5. | In the Trigger on Click field, enter dwfValue. |
6. | Click Save. |
7. | Save your module. |
Now, preview the module in Express View. Open DevTools and click the Console tab. When you click the Not Applicable button, you immediately see the operator logged in the Console.
Changing a Console Operator Settings
You can revisit and make changes to this operator.
1. | Click the Data Workflow component. |
A 5-button toolbar displays above the component on hover-over.
2. | Click the (Settings) button to open the Data Workflow canvas. |
3. | Click the operator to open its Info Window. |
4. | Make changes to the operator's settings as needed. |
5. | Click Save. |
6. | Save your module. |
Copying a Console Operator
You can make a copy of your operator using familiar keyboard settings. You can copy and paste an exact copy of your operator, matching all settings.
1. | Hover over the Data Workflow component. |
A 5-button toolbar displays above the component on hover-over.
2. | Click the (Settings) button to open the Data Workflow canvas. |
3. | Click the operator you want to duplicate. |
4. | On your keyboard, press Command + C (Mac OS) or Ctrl + C (Windows/Linux) to copy the operator. |
You can copy more than one operator at a time. Hold Command or Ctrl on your keyboard and click all the operators you want to copy. Follow the rest of the steps as usual.
5. | On your keyboard, press Command + V (Mac OS) or Ctrl + V (Windows/Linux) to paste the copied operator(s) to the Data Workflow canvas. |
6. | Click Save. |
7. | Save your module. |
Did you know you can copy an operator and paste it into a different Data Workflow? You'll use the same steps outlined above.
Removing a Console Operator
Lastly, you can delete this operator from your Data Workflow canvas. You can also use these same steps to delete a connection between two operators.
1. | Hover over the Data Workflow component. |
A 5-button toolbar displays above the component on hover-over.
2. | Click the (Settings) button to open the Data Workflow canvas. |
3. | Click the operator you want to delete. |
4. | On your keyboard, press Delete. |
Once you delete this operator, make sure to connect your remaining operators. If your Data Workflow path doesn't end with an Output or Console operator, your Data Workflow won't work. So, once you delete an operator, make sure to update any remaining paths to end at an Output or Console operator.
5. | Click Save. |
6. | Save your module. |
Resources
-
Console Operator Use Case: Finding an Issue in a Multi-step Data Workflow
-
Is it Possible to Show Console Operators from a Remote Execute Module?
Lab
You can view the complete use case here: https://training.unqork.io/#/form/5f5b951d4715a90222be839c/edit.