Example File (Builder project E2E Action Language/BaseTypes):

<your example path>\E2E Action Language\BaseTypes\uml\boolean.xml

In the picture below, an activity diagram with Boolean operations and statements is shown. The action state Boolean statements, expressions, and operations takes the input object bIn with Boolean attributes and two strings as input. The output of the Boolean statements and operations will be stored in the output object bOut.

Figure: Boolean Operations

create bOut;
set bOut.out1 = true;
set bOut.out2 = false;
set bOut.out3 = bIn.in1 and bIn.in2 and bIn.in3 and bIn.in4 and bIn.in5;
set bOut.out4 = bIn.in1 or bIn.in2 or bIn.in3 or bIn.in4 or bIn.in5;
set bOut.out5 = bIn.in1 and (bIn.in2 or bIn.in3) or bIn.in4 and (bIn.in5 or bIn.in6 and (bIn.in7 or bIn.in8));
set bOut.out6 = 2<1;
set bOut.out7 = (bIn.in1 and (bIn.in2 or bIn.in3) or bIn.in4 and (bIn.in5 or bIn.in6 and (bIn.in7 or bIn.in8))) and bIn.in5;
set bOut.out7 = not(bIn.in1);
set bOut.existsFlag1 = existsString.exists();

// The following operation evaluates to NULL (testing only):
set bOut.existsFlag2 = exists(NULL);
set bOut.likeFlag1 = likeString like "abc";
set bOut.likeFlag2 = likeString like "[a-z]+";
set bOut.conditionString1 = condition (bIn.in1 and bIn.in2, "abc", "xyz");

// The following operation evaluates to NULL, if in1 is true and in2 is false (testing only):
set bOut.conditionString2 = condition (bIn.in1 and bIn.in2, "abc", NULL);

In the SOAP Test Tool, you can create a test case to test the Boolean statements and operations of the following action script that has been defined in the action state Boolean statements, expressions, and operations.

The condition bIn.in1 and bIn.in2 in the last condition statement above evaluates to false, and NULL will be assigned to the attribute bOut.conditionString2. Null values are not included in SOAP responses, so this attribute will not be returned by the Bridge (compare Response tab in the picture below, where the attribute bOut.conditionString2 is not listed in the response). For more details refer to page NULL Values.

Enter the input values on the Request tab of the SOAP Test Tool.

The result returned by the Runtime is displayed on the Response tab of the SOAP Test Tool.