You are here

while_test_export.txt in Conditional Rules 8

Same filename and directory in other branches
  1. 7 tests/while_test_export.txt
{ "while_test" : {
    "PLUGIN" : "action set",
    "REQUIRES" : [ "rules", "rules_conditional", "rules_conditional_test" ],
    "ACTION SET" : [
      { "variable_add" : {
          "USING" : { "type" : "integer", "value" : 0 },
          "PROVIDE" : { "variable_added" : { "count" : "Count" } }
        }
      },
      {
        "WHILE" : { "NOT data_is" : { "data" : [ "count" ], "op" : "\u003E", "value" : 10 } },
        "DO" : [
          { "data_set" : {
              "data" : [ "count" ],
              "value" : { "select" : "count", "num_offset" : { "value" : 1 } }
            }
          }
        ]
      },
      { "rules_conditional_test_throw" : { "message" : [ "count" ] } }
    ]
  }
}

File

tests/while_test_export.txt
View source
  1. { "while_test" : {
  2. "PLUGIN" : "action set",
  3. "REQUIRES" : [ "rules", "rules_conditional", "rules_conditional_test" ],
  4. "ACTION SET" : [
  5. { "variable_add" : {
  6. "USING" : { "type" : "integer", "value" : 0 },
  7. "PROVIDE" : { "variable_added" : { "count" : "Count" } }
  8. }
  9. },
  10. {
  11. "WHILE" : { "NOT data_is" : { "data" : [ "count" ], "op" : "\u003E", "value" : 10 } },
  12. "DO" : [
  13. { "data_set" : {
  14. "data" : [ "count" ],
  15. "value" : { "select" : "count", "num_offset" : { "value" : 1 } }
  16. }
  17. }
  18. ]
  19. },
  20. { "rules_conditional_test_throw" : { "message" : [ "count" ] } }
  21. ]
  22. }
  23. }