### Polling Decision (Workflow) Step Spec

#### Background

A Polling Decision Step is a type of Decision Step that returns either true or false.

It is very similar to an If-Then Decision Step, with additional Polling behavior.

The Polling behavior allows the Step to operate as an Observer of another Object, and polls data from that Object according to a programmed time interval.

Once the Polling behavior acquires the needed data, it is important that Step processes the acquired data correctly, and either resets or completes the Polling Step.

This spec ensures that Polling Steps respond correctly to data received from the Polling process.

It also verifies mathematical and Boolean operators that determine whether the Step ultimately returns true or false.

#### Specification

This spec verifies the logic governing Polling behavior by verifying the following test cases:
• A Polling Decision Step:
• should update the Actual Completion date if the summary data resolves TRUE and Then field is set to COMPLETE
• should update the ExpectedCompletion date if the summary data resolves FALSE and Then field is set to COMPLETE
• should update the Expected Completion date if the summary data resolves TRUE and Then field is set to CONTINUE WAITING
• should update the Actual Completion date if the summary data resolves FALSE and Then field is set to CONTINUE WAITING
This spec also tests the following mathematical and Boolean operators that govern the True/False response of the Polling Decision Step:
• Mathematical Operators:
• returns true when right and left operand are equal across =
• returns true when right and left operand are equal across =
• returns false when left operand is greater than right operand across =
• returns false when left operand is less than right operand across =
• returns true when left operand is greater than right operand across !=
• returns true when left operand is less than right operand across !=
• returns false when left operand and right operand are equal across !=
• returns true when left operand is greater than right operand across >
• returns false when left operand is less than right operand across >
• returns false when left operand is equal to right operand across >
• returns true when left operand is less than right operand across <
• returns false when left operand is greater than right operand across <
• returns false when left operand is equal to right operand across <
• returns true when left operand is less than right operand across <=
• returns false when left operand is greater than right operand across <=
• returns true when left operand is equal to right operand across <=
• returns false when left operand is less than right operand across >=
• returns true when left operand is greater than right operand across >=
• returns true when left and right operands are equal across >=

• Boolean Operators
• returns false when left condition = false and right condition = true across AND'
• returns false when left condition = true and right condition = false across AND'
• returns false when left and right conditions are false across AND'
• returns true when right and left conditions are true across AND
• returns true when left and right conditions are true across OR
• returns true when left condition = true and right condition = false across OR
• returns true when left condition = false and right condition = true across OR
• returns false when left and right conditions are false across OR