[-]
 [+]
  
 
[-]
  
  
  
  
  
  
  
  
  
  
  
 
 
Updated on 9/27/2019
Service Designer User's Guide
Script Node
Direct link to topic in this publication:

Script Node

A Script node is used to write business logic depending on the app requirement. The logic is written in TypeScript in the TS editor of the Attributes window. 

How to Use

  • Open the Services editor window.
  • Click the Add Service button to add a new service or open an existing service.
  • In the Nodes Palette, drag and drop a Script node to the workspace.
  • Drag and drop other nodes to create a flow.

Associated Attributes

Script node  properties
  • Name: Unique name for the node. This field accepts only string values of length 5 - 50 characters.
  • Code Editor: Allows you to add the JavaScript code and write the business logic of the Script node. For example, to call the function greet (with a string) and show a greeting message to the user, add this code: greet("hello world");

You can also use the bh object in the editor to access all the local, input, and system properties. For example, to access the information of the current logged in user, use this line of code: bh.system.currentUser.

See Properties for a complete list of system properties.

  • Add your business logic using the editor and click the button.

Example

See UI Services Example.


Start Node                                                                                                                  Http Request Node  >