Graphit Node Types

Node Type options define how content is structured and how a tag is presented in an output document. By default, nodes are assigned neither a Type nor a Property when they are created.

The following table lists the node types. Please refer to the files in the following table's Example column. The files can be found in the KB Demo Project under Project Tree > Web Services. We suggest that you run each Graphit file in a Debug mode and observe the response.

Node Type

Description

Examples

Field Basic node type. Defines the node as a tag in XML/JSON format. grField
Function Runs the code to determine the value of the node. Note that the code must be written in JavaScript.  grFunction
SQL Defines an SQL statement that retrieves information from Fabric or other database interfaces. Enter the SQL statement manually or hover over and then click the SQL icon to open the Query Builder.
Note: If the database is not a Fabric database, the Interface Name must be defined as described in the Node Properties section.
  • If the Query Builder is selected, the Query Builder popup opens; when it closes, the built query is copied into the Graphit node content.
  • Fields can be automatically expanded into nested nodes. When closing the Query Builder popup, you are asked about this expansion. Expanding fields can be useful in case where further manipulation is needed on the result fields, or when the fields shall be used on further nodes.
The SQL Type also enables looping results and executing nested codes on each returned row.
Note that it is recommended to set the SQL statement type to SQL to use a prepared statement and prepared binding.
To build an SQL statement for each call, set the query Type to Non-prepared SQL. For example, to build dynamic SQL, select X,Y from $table name.
grSQL
String Simple string text or some combination with variables, such as input parameters or previous field nodes .  grString
Get Defines the Fabric Get command, according to the LU and LU iid, which will be executed when invoking this Graphit file.
Enter the Get command statement manually or hover over and then click the Helper icon () to open the Command Builder. See more information later in this article.
Broadway Defines a call to a Broadway flow that will be activated.
Enter the command statement manually or hover over and then click the Helper icon () to open the Command Builder. See more information later in this article.
Condition Builds IF-ELSE statements that should include a condition. The nested nodes are/aren't executed according to the result of the condition.  grCondition
Group  Groups several elements. Used mainly with Condition nodes. grGroup
Collect Iterates multiple data sets into one unified array.  grCollect
Raw Presents data as output without manipulation. For example, a header for an XML format.  grRaw

Command Builders

Graphit Editor provides 3 builders in order to ease the creation of Graphit file content: SQL Query Builder, Get Command Builder and Broadway Command Builder. The SQL Query Builder opens the Studio's Query Builder

Get Command Builder

Upon selecting 'get' as the node type or when clicking on the icon of a node, which is already of a 'get' type, the Get Command Builder popup opens.

Select the logical unit and click 'Add'.

The popup will close and the get command will appear with the appropriate syntax.

The iid parameter is smartly acquired from the logical unit root table iid and populated; it is also automatically added as the Graphit file input parameter.

Broadway Command Builder

You can call and activate a Broadway flow from Graphit, and combine it as a part of the logic and output of the Graphit file.

Upon selecting 'Broadway' as the node type or when clicking on the icon of a node, which is already of a 'Broadway' type, the Broadway Command Builder popup opens.

  1. Select the logical unit that the required Broadway flow is located in.

  2. Select the Broadway flow.

  3. Choose whether the Broadway flow input parameters will automatically be added as the Graphit file input parameters. This is the default option and it can save you time and prevent mistakes. Yet, you can uncheck this checkbox, in cases where flow input parameters are manually pre-set in the Graphit file, as constants or according to previous query results.

Note: For simplicity, this checkbox affects all Broadway flow input parameters.

  1. Choose whether to add and reveal the Broadway flow output as fields in the Graphit, or not. This option is similar to the option provided via the SQL Query Builder Helper.

Previous

Graphit Node Types

Node Type options define how content is structured and how a tag is presented in an output document. By default, nodes are assigned neither a Type nor a Property when they are created.

The following table lists the node types. Please refer to the files in the following table's Example column. The files can be found in the KB Demo Project under Project Tree > Web Services. We suggest that you run each Graphit file in a Debug mode and observe the response.

Node Type

Description

Examples

Field Basic node type. Defines the node as a tag in XML/JSON format. grField
Function Runs the code to determine the value of the node. Note that the code must be written in JavaScript.  grFunction
SQL Defines an SQL statement that retrieves information from Fabric or other database interfaces. Enter the SQL statement manually or hover over and then click the SQL icon to open the Query Builder.
Note: If the database is not a Fabric database, the Interface Name must be defined as described in the Node Properties section.
  • If the Query Builder is selected, the Query Builder popup opens; when it closes, the built query is copied into the Graphit node content.
  • Fields can be automatically expanded into nested nodes. When closing the Query Builder popup, you are asked about this expansion. Expanding fields can be useful in case where further manipulation is needed on the result fields, or when the fields shall be used on further nodes.
The SQL Type also enables looping results and executing nested codes on each returned row.
Note that it is recommended to set the SQL statement type to SQL to use a prepared statement and prepared binding.
To build an SQL statement for each call, set the query Type to Non-prepared SQL. For example, to build dynamic SQL, select X,Y from $table name.
grSQL
String Simple string text or some combination with variables, such as input parameters or previous field nodes .  grString
Get Defines the Fabric Get command, according to the LU and LU iid, which will be executed when invoking this Graphit file.
Enter the Get command statement manually or hover over and then click the Helper icon () to open the Command Builder. See more information later in this article.
Broadway Defines a call to a Broadway flow that will be activated.
Enter the command statement manually or hover over and then click the Helper icon () to open the Command Builder. See more information later in this article.
Condition Builds IF-ELSE statements that should include a condition. The nested nodes are/aren't executed according to the result of the condition.  grCondition
Group  Groups several elements. Used mainly with Condition nodes. grGroup
Collect Iterates multiple data sets into one unified array.  grCollect
Raw Presents data as output without manipulation. For example, a header for an XML format.  grRaw

Command Builders

Graphit Editor provides 3 builders in order to ease the creation of Graphit file content: SQL Query Builder, Get Command Builder and Broadway Command Builder. The SQL Query Builder opens the Studio's Query Builder

Get Command Builder

Upon selecting 'get' as the node type or when clicking on the icon of a node, which is already of a 'get' type, the Get Command Builder popup opens.

Select the logical unit and click 'Add'.

The popup will close and the get command will appear with the appropriate syntax.

The iid parameter is smartly acquired from the logical unit root table iid and populated; it is also automatically added as the Graphit file input parameter.

Broadway Command Builder

You can call and activate a Broadway flow from Graphit, and combine it as a part of the logic and output of the Graphit file.

Upon selecting 'Broadway' as the node type or when clicking on the icon of a node, which is already of a 'Broadway' type, the Broadway Command Builder popup opens.

  1. Select the logical unit that the required Broadway flow is located in.

  2. Select the Broadway flow.

  3. Choose whether the Broadway flow input parameters will automatically be added as the Graphit file input parameters. This is the default option and it can save you time and prevent mistakes. Yet, you can uncheck this checkbox, in cases where flow input parameters are manually pre-set in the Graphit file, as constants or according to previous query results.

Note: For simplicity, this checkbox affects all Broadway flow input parameters.

  1. Choose whether to add and reveal the Broadway flow output as fields in the Graphit, or not. This option is similar to the option provided via the SQL Query Builder Helper.

Previous