Bonita Open Solution 5.x Essentials
上QQ阅读APP看书,第一时间看更新

The text variable

The text variable is used to hold text of all kinds in Bonita. Note that this variable is of the type string of Java, found in java.lang.String. The Multiplicity option is used to select whether the variable is a single string variable or an array of strings. We can also state the default value that this variable will take. If left blank, the variable will be initialized to null, the way Java Strings are initialized. This variable is used to store any kind of text value in Bonita.

The variable List of Options... contains a list of text variables that can be used in drop-down boxes or radio buttons. When we select the List of Options... as the data type, a box appears where we define the list that we want to populate. Let's name this list Smartphones. Click on the Add... button, type in Apple, and click on OK. Similarly, add more options. such as Samsung, HTC, and Nokia. We can also rearrange the list options by clicking on the Up and Down tabs. After we have created the list, we can click on OK to save the list. Note that the next time we want to add a variable, the option Smartphones also appears in the drop-down menu.

Figure 2.1: The List of Options variable