Skip to main content

Using Boolean Variables

Boolean variables can either be True or False. This type of variable can convey the decision of either true or false.

Variable Pane

Let us understand boolean variables with the example process. Here is an example that takes a number as input from the user and displays whether it is an even or odd number.

Come, let's create this process in Process Designer:

Step#1

Launch and create a new process in Process Designer

  • Launch Process Designer from the Windows Start menu located under IntelliBuddies Enterprise

Step#2

Create New Process

  • Click on New Process and fill in the new process details

Step#3

  • Add variables to hold the number and condition result as a boolean variable.

Step#4

In Activity panel search for Input Dialog

  • Drag and drop Input Dialog activity to main panel.
  • Add three Input Dialog
  • Takes the input number and sets to int variable number

Step#5

  • Check whether input number is divisible by 2 and set the flag isEven to true.
  • Check the flag and Writeline the output as even or odd.

Step#6

Save the process

  • From the Design tab ribbon, click on Save

Step#7

Run the process

  • From the Design tab ribbon, click on Run

Step#8

Make sure the process executes and pops up input dialogs. Enter the number and click on Ok. Then in the output window message appears as the number is even or odd.

Download Example (C#)