Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:hybrid_model [2020/12/31 03:13]
admin [Generate Test Cases]
tutorial:hybrid_model [2021/01/05 03:00] (current)
Line 3: Line 3:
 Learning Objectives: Learning Objectives:
   * Differences between state model and combinatorial model   * Differences between state model and combinatorial model
-  * Hybrid model+  * Hybrid model (embedding combinatorial model in state model) 
  
  
Line 185: Line 186:
 The "log" scripts above prints the current row of the data set and "Payment Type" and "CardNum" to //Script Log//. The "log" scripts above prints the current row of the data set and "Payment Type" and "CardNum" to //Script Log//.
  
-Save the changes and run the model again, and examine //Script Log// by clicking on the script log button in //RESULT// tab: +Save the changes and run the model again. Examine //Script Log// (click on the script log button {{wiki:overview:tut_DataSet_ScriptLogBtn.png?50}} in //RESULT// tab):
- +
-{{wiki:overview:tut_DataSet_ScriptLogBtn.png?75}}+
  
 Below is the first few lines from the script log: Below is the first few lines from the script log:
Line 222: Line 221:
 ==== Loop through Data Set ==== ==== Loop through Data Set ====
  
 +The data set can also be looped programmatically by scripting as follows:
 +   dataset = $SYS.getDataSet('PaymentOptions');
 +   
 +   // rewind dataset to first row
 +   dataset.rewind();
 +   
 +   // retrieve data
 +   paymentType = dataset.getData('PaymentType');
 +   
 +   // advance to next row, if rowIdx == 0, all rows exhausted
 +   rowIdx = dataset.nextRow();
  
 +Please note that the data set being looped programmatically as above can not be attached to the transition at the same time.