When you create a flow on the Client Services Designer, Neutrinos creates a flow level variable of object reference called bh to access input, local, error, and system properties of the flow. The properties include:
The input and local variables are defined by the user, system variables are generated by theNeutrinos Platform, and the error variable is created when an exception occurs. 


Warning

 You should not override the bh object. For example, you should not assign the following values to the bh object:

  • bh = null
  • bh = undefined
  • bh = empty object

Create an input or local flow variable 

You can create any number of input or local variables in the Start and Script nodes of a flow. 

Create input or local variables in the Start Node

To create input or local variables in the Start node, create a service or open an existing service, and perform the following steps:

  1. Drag and drop a Start node.
  2. To create an input variable, in the Input Variables field specify the input variables for the flow.
  3. To create a local variable, in the Local Variables field:
    1. Enter a local key
    2. Enter a value to be associated with the key. The value can be of type JSON, String, and number. 
    3. If you want to access the local variable outside the flow, assign it to be an output variable by toggling Output to True 
    4. Click the Add icon to add the variable to the list.
Information    If you want to set an input or local variable as an output variable (so that the variable can be accessed outside the flow), then you have to create the property only in the Start node and toggle the Output to True.

Create input or local variables in the Script node

To create input or local variables in the Script node, create a service or open an existing service, and perform the following steps:

  1. Drag and drop a Script node.
  2. To create an input or local variables, In the Code Editor, add the code to create one or more variables. If the variable already exists, its value will be updated, else a new variable will be created. For example:
    JavaScript
    bh.input.modelrApiURL='http://localhost:24483/';
    bh.local.city='Goa';
You cannot set input or local variables as output variables from the Script node. You have to use the Start node to do this operation.