About: This article introduces the Subroutine node, a Special node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The Subroutine node allow users to call on and make use of the processes within other jobs from the current job. When a job containing a Subroutine node is run, the data processes through the workflow until the point of the Subroutine when the data is passed outside of the current job and through a workflow in a different job.
The two main uses of the Subroutine node are:
- Placing it at the beginning of a process to act as an input table.
- Placing it mid-stream in a job to act as a macro.
Note: Subroutine nodes must always be paired with an Output Proxy node, and optionally an Input Proxy node.
A Subroutine node is always used with a Proxy Out node in another job, and the two jobs are linked through the configuration of the Subroutine node. We will call these two jobs the "Subroutine job" and the "Proxy job".
Subroutines as an Input Table
A common use of a Subroutine node is as an input table. When this node is placed at the beginning of a workflow, the Proxy job (Job 1 below) is call immediately. The Proxy job runs, and then pushes the data across jobs from the point of the Proxy Out node to the point of the Subroutine node in the Subroutine job (Job 2 below). Therefore data is entering and being pulled from the Subroutine job just like it would from any other Input node.
Configuring a Subroutine Node as an Input
To configure a Subroutine node:
- Use the ellipsis [...] next to the Job Name to browse to the job that the Subroutine should call (the Proxy job).
- If the Proxy job does not contain any parameters, no additional configuration is required.
- If the Proxy job contains parameters, they will be listed in the Job Parameters section with the option to type a New Value or to specify parameters from the current job to fill those required parameter values in the Proxy job.
Subroutines as a Macro
Subroutine nodes can be used mid-stream as a representation of another job process, condensed into a single node in the current workflow. A Subroutine used this way must also use a Proxy In node. The Subroutine sends the data to the Proxy job at the point of the Proxy In node. The data is then processed through the Proxy job and then sent back to the Subroutine job from the point of the Proxy Out node to the point of the Subroutine node.
Configuring a Subroutine as a Macro
To configure a Subroutine node as a macro:
- Follow steps 1-3 above.
- Ensure that all required by proxy columns are present in the source
Comments
0 comments
Article is closed for comments.