Part 2 - integrate a child into a parent pathway
Part 2 - integrate a child pathway to a parent#
Complete the relationship between parent and child pathways.
Before you begin#
- Learn about writing expressions in Ensemble nodes
- Learn about data mapping using expressions
- Learn about parent-child pathways
- Part 1 - create a child pathway
- Add a parent pathway
- Choose a trigger node to start the parent pathway
Step 1 - Add Execute pathway node to parent#
Note
The Manual trigger node is added automatically when the pathway is empty.
- Open the parent pathway
- Click > Search for Execute pathway
- Select Execute pathway > Actions > Call another pathway
Step 2 - Specify Source parameters#
You can specify source parameters using Fixed (absolute) values, or JSON expressions.
Specify parameters using fixed (absolute) values#
- Choose a Source setting then click Fixed for the Required value field:
| Source | Description | Required value | Additional information |
|---|---|---|---|---|
| Database | Load child pathway from Ensemble instance | Pathway ID | Learn where to find a pathway ID |
| Local file | Load child pathway from export file | Pathway path | Learn how to export a pathway |
| Parameter | Load child pathway using JSON parameters | Pathway JSON | | |
| URL | Load child pathway from URL | Pathway URL | https://app.ensemble.ai/<ensemble-instance-id>/pathway/<pathway-id>
| Learn where to find a pathway URL |
Specify parameters using JSON expressions#
- Choose a Source setting then click Expression for the Required value field:
Source | Description | Required value | Additional information |
---|---|---|---|
Database | Load child pathway from Ensemble instance | Pathway ID | |
Local file | Load child pathway from export file | Pathway path | |
Parameter | Load child pathway using JSON parameters | Pathway JSON | |
URL | Load child pathway from URL | Pathway URL |
- You can now:
- Enter a value directly in the field, OR
- Click at the bottom right of the field to open the editor
Panel | Description | Additional information |
---|---|---|
Variable selector | Choose parameters from the current node or input nodes | Learn how to connect nodes |
Expression | Write JavaScript to configure variables and the node behaviour | |
Result | Dynamically generated results from expression |
- Click close to return to the node editor.
Step 3 - Choose how data is passed to and from a child pathway#
- Choose how data is passed to the child pathway:
| Mode | Description | Repeats? | Additional information |
|---|---|---|
| Run once with all items | All input data is passed to the child pathway in a batch | No | |
| Run once for each item | Each input item is passed to the child pathway | Until no input remains | When Source = Database
AND Required value = Expression
the first input item is used to calculate the child <pathway-id>
where data is passed |
| Wait for sub-Pathway completion | Click Add option then toggle on to pause parent pathway execution until child pathway passes data back |
Step 4 - Save parent pathway data to pass to child#
- Click > Settings
- Change the following settings:
Setting | Description | Additional information |
---|---|---|
Save successful production executions | Set to Save so when the parent Pathway is run, data is loaded and ready for use by the sub-pathway | Learn how to load data from previous executions |
- Click Save when finished
Step 5 - save parent-child changes#
- Click Save