Description

The CaseActionGen Generator emulates multiple if-then-else cases.


In This Article


Video Training

The following video can be used to see a quick tutorial on how to use the CaseActionGen Generator:



Generator Parameters

The following parameters may be configured for the CaseActionGen Generator. Items with an asterisk* are required.   

  • default* - Defines the value selected if no cases are met.
  • caseList - Defines a list of cases whose value should be Boolean.
  • actionList - Defines a list of actions with each action matching one case.


Example - Generate User's Mode of Transportation based on Random Case

Determine the mode of a user's transportation based on the random case the falls into:

  1. if case 1 is true, then take a Car
  2. if case 2 is true, then take a Train
  3. if case 3 is true, then take a Plane
  4. else Walk  


Generation Sequence From Left To Right

  1. Randomly generate a true or false value.
  2. Randomly generate a true or false value.
  3. Randomly generate a true or false value.
  4. Choose a final result based on the precedence of which case is true or choose the default case if none are true.


Note: This example shows the configuration with linked generators; however, users can also reference Attributes.

Step 1 - Assign the Required Generators to Attribute

  1. BooleanValueGen - car
  2. BooleanValueGen - plane
  3. BooleanValueGen - train
  4. CaseActionGen - generates output based on values generated by other linked generators



Step 2 - Enter 'walk' for Default Value

When all generated boolean values are 'false', the generated value will be 'walk'.


Step 3 - Enter Corresponding Actions for each Case

The generated value is based on the first generated boolean, 'true'. For example: 

  • value1 = false
  • value 2 = true
  • value 3 = true

The generated value will be based on value 2, and value 3 is ignored. 


Sample Output