(Tabla de contenidos, TBA)
In this tutorial, we will explain how to invoke Notebook runs from the FlowEngine:.
With the new node "Notebook Launcher", we can now execute complete Notebooks or just the paragraphs that we need, in an orderly manner.
Let's see how we can use that node. To do this, we will follow the following steps:
Select the "FlowEngine Management" option from the menu:
Select the domain belonging to your user:
Once you are in the domain, drag a node of type "Notebook Launcher" to the flow and double click on it to see its properties.The following are the base properties:
Name: The name that you want the node to have when viewing it within the flow.
Onesait Platform Notebook: In this list, will select the Notebook on which you want to work.
Workflow mode: If it is active active, it allows the execution with the dependencies as they are represented in the flow. For example, take the following flow:If the "check" is active, paragraph 3 will be executed when 1 and 2 are. If it is deactivated, paragraph 3 will be executed when any of the others do.
Inputs & Execution: In this tab, select from among the execution modes:
Execute entire notebook:
If this "check" is activated, the entire notebook will be executed, following the paragraph order defined therein.
If it is deactivated, then the single paragraph execution mode is open, showing the following properties:Input Paragraph selecion: Selection of the paragraph we want to execute. The paragraph's ID will appear along with its title in parentheses (if it has been defined).Input Parameters mapping: If the paragraph has input parameters configured, they will appear for you to fill in. Their values can be informed in different ways:msg: From a field of the preeding msg.flow: From a global variable to the Flow.global: From a global variable.string: As a fixed character string.number: As a fixed number.boolean: As a fixed true/false logical value.timestamp: As a fixed timestamp.
Outputs: This tab also changes depending on whether we want to run the entire notebook or just one node.
Execution of a single paragraph: If the Execute entire notebook check is deactivated, the output configuration (outputs) is disabled. Since a single node is executed, the output will be unique.
Complete execution: If the Execute entire notebook check is marked, the following options will appear to define outputs:Enable Paragraph Output: If we mark it, it allows us to define different outputs with the results of the paragraphs we select.Split Outputs: The multi output selector is enabled.Outputs Number: It allows you to choose the number of outputs that you want in the nodeOutput Parameters mapping: For each output you have defined, you can select the paragraph whose result will be displayed by that output.The result would be the following:If we hover over the node's exit pins, we can see the paragraph to which it belongs.
Once the node is configured, we can see the defined outputs, which will have the following structure:
In the msg.payload.body, we will find the following result fields:
Title: Title of the executed paragraph..
Text: Contents of the executed paragraph.
User: User.
dateUpdated: Date of last paragraph update.
config: Paragraph configuration parameters.
settings: Displays the paragraph's input parameters and variables.
results: Contains the execution result.
code: Indicates whether the execution has been correct
msg: Array with the results of the paragraph execution. Each element will mark the type of data (type) and the result (data).
The rest of the fields are informative about when the execution was carried out and the time it took.