From 97fafd6dbd483a596f161c718d30986eab86c363 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Fri, 23 Aug 2024 17:40:46 +0000 Subject: [PATCH 1/2] Simplify functions for loading flows in tests and move flows used by legacy migration tests into their own directory --- media/test_flows/dual_webhook.json | 132 ----- .../favorites_bad_group_name_v10.json | 432 ----------------- .../favorites_bad_group_name_v4.json | 342 ------------- .../favorites_bad_group_name_v5.json | 449 ----------------- .../favorites_bad_group_name_v6.json | 450 ----------------- .../favorites_bad_group_name_v7.json | 446 ----------------- .../favorites_bad_group_name_v8.json | 420 ---------------- .../favorites_bad_group_name_v9.json | 419 ---------------- media/test_flows/ivr_v3.json | 161 ------ .../legacy/invalid/no_base_language_v8.json | 44 ++ .../legacy/invalid/non_localized_ruleset.json | 39 ++ .../invalid/non_localized_with_language.json | 326 +++++++++++++ .../legacy/invalid/not_fully_localized.json | 31 ++ .../legacy/migrations/dual_webhook.json | 132 +++++ .../legacy/migrations/favorites.json | 315 ++++++++++++ .../favorites_bad_group_name_v10.json | 430 ++++++++++++++++ .../favorites_bad_group_name_v4.json | 352 ++++++++++++++ .../favorites_bad_group_name_v5.json | 421 ++++++++++++++++ .../favorites_bad_group_name_v6.json | 422 ++++++++++++++++ .../favorites_bad_group_name_v7.json | 418 ++++++++++++++++ .../favorites_bad_group_name_v8.json | 418 ++++++++++++++++ .../favorites_bad_group_name_v9.json | 417 ++++++++++++++++ .../legacy/migrations/favorites_v4.json | 332 +++++++++++++ .../test_flows/legacy/migrations/ivr_v3.json | 161 ++++++ .../legacy/migrations/malformed_groups.json | 49 ++ .../migrations/malformed_single_message.json | 31 ++ .../legacy/migrations/migrate_to_11_0.json | 42 ++ .../legacy/migrations/migrate_to_11_10.json | 239 +++++++++ .../legacy/migrations/migrate_to_11_11.json | 107 ++++ .../legacy/migrations/migrate_to_11_12.json | 197 ++++++++ .../migrations/migrate_to_11_12_one_node.json | 38 ++ .../migrate_to_11_12_other_org.json | 39 ++ .../legacy/migrations/migrate_to_11_3.json | 84 ++++ .../legacy/migrations/migrate_to_11_4.json | 168 +++++++ .../legacy/migrations/migrate_to_11_5.json | 398 +++++++++++++++ .../legacy/migrations/migrate_to_11_6.json | 252 ++++++++++ .../legacy/migrations/migrate_to_11_7.json | 246 ++++++++++ .../legacy/migrations/migrate_to_11_8.json | 341 +++++++++++++ .../legacy/migrations/migrate_to_11_9.json | 458 ++++++++++++++++++ .../legacy/migrations/migrate_to_9.json | 148 ++++++ .../migrations/multi_language_flow.json | 176 +++++++ .../legacy/migrations/old_expressions.json | 118 +++++ .../single_message_bad_localization.json | 25 + .../legacy/migrations/type_flow.json | 394 +++++++++++++++ media/test_flows/malformed_groups.json | 44 -- .../test_flows/malformed_single_message.json | 31 -- media/test_flows/migrate_to_11_0.json | 42 -- media/test_flows/migrate_to_11_10.json | 239 --------- media/test_flows/migrate_to_11_11.json | 107 ---- media/test_flows/migrate_to_11_12.json | 197 -------- .../test_flows/migrate_to_11_12_one_node.json | 38 -- .../migrate_to_11_12_other_org.json | 35 -- media/test_flows/migrate_to_11_3.json | 84 ---- media/test_flows/migrate_to_11_4.json | 168 ------- media/test_flows/migrate_to_11_5.json | 398 --------------- media/test_flows/migrate_to_11_6.json | 252 ---------- media/test_flows/migrate_to_11_7.json | 246 ---------- media/test_flows/migrate_to_11_8.json | 341 ------------- media/test_flows/migrate_to_11_9.json | 458 ------------------ media/test_flows/migrate_to_9.json | 148 ------ media/test_flows/multi_language_flow.json | 176 ------- media/test_flows/no_base_language_v8.json | 50 -- media/test_flows/non_localized_ruleset.json | 45 -- .../non_localized_with_language.json | 332 ------------- media/test_flows/not_fully_localized.json | 37 -- media/test_flows/old_expressions.json | 118 ----- .../single_message_bad_localization.json | 29 -- media/test_flows/type_flow.json | 394 --------------- temba/api/v2/tests.py | 6 +- temba/campaigns/tests.py | 29 +- temba/flows/legacy/tests.py | 96 ++-- temba/flows/tests.py | 44 +- temba/orgs/tests.py | 36 +- temba/tests/base.py | 36 +- 74 files changed, 7934 insertions(+), 7381 deletions(-) delete mode 100644 media/test_flows/dual_webhook.json delete mode 100644 media/test_flows/favorites_bad_group_name_v10.json delete mode 100644 media/test_flows/favorites_bad_group_name_v4.json delete mode 100644 media/test_flows/favorites_bad_group_name_v5.json delete mode 100644 media/test_flows/favorites_bad_group_name_v6.json delete mode 100644 media/test_flows/favorites_bad_group_name_v7.json delete mode 100644 media/test_flows/favorites_bad_group_name_v8.json delete mode 100644 media/test_flows/favorites_bad_group_name_v9.json delete mode 100644 media/test_flows/ivr_v3.json create mode 100644 media/test_flows/legacy/invalid/no_base_language_v8.json create mode 100644 media/test_flows/legacy/invalid/non_localized_ruleset.json create mode 100644 media/test_flows/legacy/invalid/non_localized_with_language.json create mode 100644 media/test_flows/legacy/invalid/not_fully_localized.json create mode 100644 media/test_flows/legacy/migrations/dual_webhook.json create mode 100644 media/test_flows/legacy/migrations/favorites.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v10.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v4.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v5.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v6.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v7.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v8.json create mode 100644 media/test_flows/legacy/migrations/favorites_bad_group_name_v9.json create mode 100644 media/test_flows/legacy/migrations/favorites_v4.json create mode 100644 media/test_flows/legacy/migrations/ivr_v3.json create mode 100644 media/test_flows/legacy/migrations/malformed_groups.json create mode 100644 media/test_flows/legacy/migrations/malformed_single_message.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_0.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_10.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_11.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_12.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_12_one_node.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_12_other_org.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_3.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_4.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_5.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_6.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_7.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_8.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_11_9.json create mode 100644 media/test_flows/legacy/migrations/migrate_to_9.json create mode 100644 media/test_flows/legacy/migrations/multi_language_flow.json create mode 100644 media/test_flows/legacy/migrations/old_expressions.json create mode 100644 media/test_flows/legacy/migrations/single_message_bad_localization.json create mode 100644 media/test_flows/legacy/migrations/type_flow.json delete mode 100644 media/test_flows/malformed_groups.json delete mode 100644 media/test_flows/malformed_single_message.json delete mode 100644 media/test_flows/migrate_to_11_0.json delete mode 100644 media/test_flows/migrate_to_11_10.json delete mode 100644 media/test_flows/migrate_to_11_11.json delete mode 100644 media/test_flows/migrate_to_11_12.json delete mode 100644 media/test_flows/migrate_to_11_12_one_node.json delete mode 100644 media/test_flows/migrate_to_11_12_other_org.json delete mode 100644 media/test_flows/migrate_to_11_3.json delete mode 100644 media/test_flows/migrate_to_11_4.json delete mode 100644 media/test_flows/migrate_to_11_5.json delete mode 100644 media/test_flows/migrate_to_11_6.json delete mode 100644 media/test_flows/migrate_to_11_7.json delete mode 100644 media/test_flows/migrate_to_11_8.json delete mode 100644 media/test_flows/migrate_to_11_9.json delete mode 100644 media/test_flows/migrate_to_9.json delete mode 100644 media/test_flows/multi_language_flow.json delete mode 100644 media/test_flows/no_base_language_v8.json delete mode 100644 media/test_flows/non_localized_ruleset.json delete mode 100644 media/test_flows/non_localized_with_language.json delete mode 100644 media/test_flows/not_fully_localized.json delete mode 100644 media/test_flows/old_expressions.json delete mode 100644 media/test_flows/single_message_bad_localization.json delete mode 100644 media/test_flows/type_flow.json diff --git a/media/test_flows/dual_webhook.json b/media/test_flows/dual_webhook.json deleted file mode 100644 index 0ed7a034442..00000000000 --- a/media/test_flows/dual_webhook.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "campaigns": [], - "version": 9, - "site": "https://textit.in", - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "0aabad42-3ec6-40c7-a4cc-c5190b8b4465", - "uuid": "ff642bb5-14fa-4bb6-8040-0ceec395a164", - "actions": [ - { - "msg": { - "eng": "This is the first message" - }, - "type": "reply" - } - ] - }, - { - "y": 310, - "x": 129, - "destination": "6304e1d5-3c0c-44ea-9519-39389227e3c0", - "uuid": "d7523614-1b39-481f-a451-4c4ac9201095", - "actions": [ - { - "msg": { - "eng": "Great, your code is @extra.code. Enter your name" - }, - "type": "reply" - } - ] - } - ], - "version": 9, - "flow_type": "F", - "entry": "ff642bb5-14fa-4bb6-8040-0ceec395a164", - "rule_sets": [ - { - "uuid": "0aabad42-3ec6-40c7-a4cc-c5190b8b4465", - "webhook_action": "POST", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "d7523614-1b39-481f-a451-4c4ac9201095", - "uuid": "1717d336-6fb3-4da0-ac51-4588792e46d2", - "destination_type": "A" - } - ], - "webhook": "http://localhost:49999/code", - "ruleset_type": "webhook", - "label": "Webhook", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 169, - "x": 286, - "config": {} - }, - { - "uuid": "6304e1d5-3c0c-44ea-9519-39389227e3c0", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "8ad78c14-7ebe-4968-82dc-b66dc27d4d96", - "uuid": "da800d48-b1c8-44cf-8e2c-b6c6d5c98aa3", - "destination_type": "R" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Name", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 457, - "x": 265, - "config": {} - }, - { - "uuid": "8ad78c14-7ebe-4968-82dc-b66dc27d4d96", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "uuid": "4dd0f3e7-cc15-41fa-8a84-d53d76d46d66" - } - ], - "webhook": "http://localhost:49999/success", - "ruleset_type": "webhook", - "label": "Webhook 2", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 617, - "x": 312, - "config": {} - } - ], - "metadata": { - "expires": 10080, - "revision": 16, - "uuid": "099d0d1e-3769-472f-9ea7-f3bd5a11c8ff", - "name": "Webhook Migration", - "saved_on": "2016-08-16T16:34:56.351428Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v10.json b/media/test_flows/favorites_bad_group_name_v10.json deleted file mode 100644 index 5b3795fb0b9..00000000000 --- a/media/test_flows/favorites_bad_group_name_v10.json +++ /dev/null @@ -1,432 +0,0 @@ -{ - "version":10, - "flows":[ - { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", - "actions": [ - { - "msg": { - "base": "What is your favorite color?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type": "add_group", - "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups": [ - { - "uuid": "0fdffdb4-3ca4-4d35-b6a7-129b0dfc7d39", - "name": "< 25" - } - ] - }, - { - "type": "del_group", - "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups": [ - { - "uuid": "e5e7bfaf-7c35-4590-8039-c33da2b98d8c", - "name": "> 100" - } - ] - } - ] - }, - { - "y": 437, - "x": 131, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions": [ - { - "msg": { - "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y": 8, - "x": 456, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions": [ - { - "msg": { - "base": "I don't know that color. Try again." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y": 835, - "x": 191, - "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions": [ - { - "msg": { - "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y": 465, - "x": 512, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions": [ - { - "msg": { - "base": "I don't know that one, try again please." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y": 1105, - "x": 191, - "destination": null, - "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions": [ - { - "msg": { - "base": "Thanks @flow.name, we are all done!" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "flow_type": "F", - "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", - "rule_sets": [ - { - "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", - "rules": [ - { - "test": { - "test": { - "base": "Red" - }, - "type": "contains_any" - }, - "category": { - "base": "Red" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "663f667d-561a-4920-9375-3ce367615bdc", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Green" - }, - "type": "contains_any" - }, - "category": { - "base": "Green" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Blue" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Navy" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Cyan" - }, - "type": "contains_any" - }, - "category": { - "base": "Cyan" - }, - "destination": null, - "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type": null - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": null, - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": "expression", - "label": "Color", - "operand": "@extra.value", - "finished_key": null, - "y": 329, - "x": 98, - "config": {} - }, - { - "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", - "rules": [ - { - "test": { - "test": { - "base": "Mutzig" - }, - "type": "contains_any" - }, - "category": { - "base": "Mutzig" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Primus" - }, - "type": "contains_any" - }, - "category": { - "base": "Primus" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Turbo King" - }, - "type": "contains_any" - }, - "category": { - "base": "Turbo King" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Skol" - }, - "type": "contains_any" - }, - "category": { - "base": "Skol" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": "expression", - "label": "Beer", - "y": 687, - "finished_key": null, - "operand": "@(LOWER(step.value))", - "x": 112, - "config": {} - }, - { - "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type": "A" - } - ], - "ruleset_type": "wait_message", - "label": "Name", - "y": 1002, - "finished_key": null, - "operand": "@step.value", - "x": 191, - "config": {} - }, - { - "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": "wait_message", - "label": "Color Response", - "y": 129, - "finished_key": null, - "operand": "@step.value", - "x": 98, - "config": {} - }, - { - "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "rules": [ - { - "category": { - "base": "Success" - }, - "test": { - "status": "success", - "type": "webhook_status" - }, - "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - }, - { - "category": { - "base": "Failure" - }, - "test": { - "status": "failure", - "type": "webhook_status" - }, - "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid": "cb902a40-780f-4e9b-a31e-e7d1021d05ed", - "destination_type": null - } - ], - "ruleset_type": "webhook", - "label": "Color Webhook", - "y": 229, - "finished_key": null, - "operand": "@step.value", - "x": 98, - "config": { - "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "webhook_action": "POST" - } - }, - { - "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": "wait_message", - "label": "Beer Response", - "operand": "@step.value", - "finished_key": null, - "y": 587, - "x": 112, - "config": {} - } - ], - "metadata": { - "uuid": null, - "notes": [], - "expires": 720, - "name": "Favorites", - "saved_on": null, - "revision": 1 - } - } - ], - "triggers":[ - - ] -} \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v4.json b/media/test_flows/favorites_bad_group_name_v4.json deleted file mode 100644 index c545eed0e39..00000000000 --- a/media/test_flows/favorites_bad_group_name_v4.json +++ /dev/null @@ -1,342 +0,0 @@ -{ - "version": 4, - "flows": [ - { - "definition": { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", - "actions": [ - { - "msg": { - "base": "What is your favorite color?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type": "add_group", - "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups": [{"name": "< 25", "id": 15572}] - }, - { - "type": "del_group", - "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups": [{"name": "> 100", "id": 15573}] - } - ] - }, - { - "y": 237, - "x": 131, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions": [ - { - "msg": { - "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y": 8, - "x": 456, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions": [ - { - "msg": { - "base": "I don't know that color. Try again." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y": 535, - "x": 191, - "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions": [ - { - "msg": { - "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y": 265, - "x": 512, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions": [ - { - "msg": { - "base": "I don't know that one, try again please." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y": 805, - "x": 191, - "destination": null, - "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions": [ - { - "msg": { - "base": "Thanks @flow.name, we are all done!" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "rule_sets": [ - { - "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules": [ - { - "test": { - "test": { - "base": "Red" - }, - "type": "contains_any" - }, - "category": { - "base": "Red" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "663f667d-561a-4920-9375-3ce367615bdc", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Green" - }, - "type": "contains_any" - }, - "category": { - "base": "Green" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Blue" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Navy" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Cyan" - }, - "type": "contains_any" - }, - "category": { - "base": "Cyan" - }, - "destination": null, - "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type": null - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": null, - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": null, - "label": "Color", - "finished_key": null, - "response_type": "C", - "y": 129, - "x": 98, - "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "webhook_action": "POST", - "operand": "@extra.value", - "config": {} - }, - { - "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules": [ - { - "test": { - "test": { - "base": "Mutzig" - }, - "type": "contains_any" - }, - "category": { - "base": "Mutzig" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Primus" - }, - "type": "contains_any" - }, - "category": { - "base": "Primus" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Turbo King" - }, - "type": "contains_any" - }, - "category": { - "base": "Turbo King" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Skol" - }, - "type": "contains_any" - }, - "category": { - "base": "Skol" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": null, - "label": "Beer", - "operand": "@step.value|lower_case", - "finished_key": null, - "response_type": "C", - "y": 387, - "x": 112, - "config": {} - }, - { - "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type": "A" - } - ], - "ruleset_type": null, - "label": "Name", - "operand": "@step.value", - "finished_key": null, - "response_type": "C", - "y": 702, - "x": 191, - "config": {} - } - ], - "metadata": { - "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", - "notes": [], - "expires": 720, - "name": "Favorites", - "revision": 1, - "saved_on": "2017-08-16T23:10:18.579169Z" - } - }, - "version": 4, - "flow_type": "F", - "name": "Favorites", - "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v5.json b/media/test_flows/favorites_bad_group_name_v5.json deleted file mode 100644 index 50a3d96cc81..00000000000 --- a/media/test_flows/favorites_bad_group_name_v5.json +++ /dev/null @@ -1,449 +0,0 @@ -{ - "version":5, - "flows":[ - { - "definition":{ - "base_language":"base", - "rule_sets":[ - { - "uuid":"c564c56f-0341-471e-8bb1-e303090fea6a", - "rules":[ - { - "test":{ - "test":{ - "base":"Red" - }, - "type":"contains_any" - }, - "category":{ - "base":"Red" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"663f667d-561a-4920-9375-3ce367615bdc", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Green" - }, - "type":"contains_any" - }, - "category":{ - "base":"Green" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Blue" - }, - "type":"contains_any" - }, - "category":{ - "base":"Blue" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Navy" - }, - "type":"contains_any" - }, - "category":{ - "base":"Blue" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Cyan" - }, - "type":"contains_any" - }, - "category":{ - "base":"Cyan" - }, - "destination":null, - "uuid":"cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type":null - }, - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"Other" - }, - "destination":null, - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "ruleset_type":"expression", - "label":"Color", - "operand":"@extra.value", - "finished_key":null, - "y":329, - "x":98, - "config":{ - - } - }, - { - "uuid":"8b941374-1b65-4154-afa3-27b871f7be6b", - "rules":[ - { - "test":{ - "test":{ - "base":"Mutzig" - }, - "type":"contains_any" - }, - "category":{ - "base":"Mutzig" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Primus" - }, - "type":"contains_any" - }, - "category":{ - "base":"Primus" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Turbo King" - }, - "type":"contains_any" - }, - "category":{ - "base":"Turbo King" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Skol" - }, - "type":"contains_any" - }, - "category":{ - "base":"Skol" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type":"A" - }, - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"Other" - }, - "destination":"7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid":"fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type":"A" - } - ], - "ruleset_type":"expression", - "label":"Beer", - "y":687, - "finished_key":null, - "operand":"@step.value|lower_case", - "x":112, - "config":{ - - } - }, - { - "uuid":"c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid":"cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type":"A" - } - ], - "ruleset_type":"wait_message", - "label":"Name", - "y":1002, - "finished_key":null, - "operand":"@step.value", - "x":191, - "config":{ - - } - }, - { - "uuid":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "ruleset_type":"wait_message", - "label":"Color Response", - "y":129, - "finished_key":null, - "operand":"@step.value", - "x":98, - "config":{ - - } - }, - { - "uuid":"c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "webhook_action":"POST", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "webhook":"http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "ruleset_type":"webhook", - "label":"Color Webhook", - "y":229, - "finished_key":null, - "operand":"@step.value", - "x":98, - "config":{ - - } - }, - { - "uuid":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"8b941374-1b65-4154-afa3-27b871f7be6b", - "uuid":"fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type":"A" - } - ], - "ruleset_type":"wait_message", - "label":"Beer Response", - "operand":"@step.value", - "finished_key":null, - "y":587, - "x":112, - "config":{ - - } - } - ], - "action_sets":[ - { - "y":0, - "x":100, - "destination":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid":"a6676605-332a-4309-a8b8-79b33e73adcd", - "actions":[ - { - "msg":{ - "base":"What is your favorite color?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type":"add_group", - "uuid":"5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups":[ - { - "name":"< 25", - "id":15572 - } - ] - }, - { - "type":"del_group", - "uuid":"2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups":[ - { - "name":"> 100", - "id":15573 - } - ] - } - ] - }, - { - "y":437, - "x":131, - "destination":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions":[ - { - "msg":{ - "base":"Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y":8, - "x":456, - "destination":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid":"37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions":[ - { - "msg":{ - "base":"I don't know that color. Try again." - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y":835, - "x":191, - "destination":"c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions":[ - { - "msg":{ - "base":"Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y":465, - "x":512, - "destination":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid":"7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions":[ - { - "msg":{ - "base":"I don't know that one, try again please." - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y":1105, - "x":191, - "destination":null, - "uuid":"fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions":[ - { - "msg":{ - "base":"Thanks @flow.name, we are all done!" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "metadata":{ - "uuid":"77ae372d-a937-4d9b-a703-cc1c75c4c6f1", - "notes":[ - - ], - "expires":720, - "name":"Favorites", - "saved_on":"2017-08-16T23:10:18.579169Z", - "revision":1 - } - }, - "version":5, - "flow_type":"F", - "name":"Favorites", - "entry":"a6676605-332a-4309-a8b8-79b33e73adcd" - } - ], - "triggers":[ - - ] - } \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v6.json b/media/test_flows/favorites_bad_group_name_v6.json deleted file mode 100644 index 8ac98bf704f..00000000000 --- a/media/test_flows/favorites_bad_group_name_v6.json +++ /dev/null @@ -1,450 +0,0 @@ -{ - "version":6, - "flows":[ - { - "definition":{ - "base_language":"base", - "rule_sets":[ - { - "uuid":"c564c56f-0341-471e-8bb1-e303090fea6a", - "rules":[ - { - "test":{ - "test":{ - "base":"Red" - }, - "type":"contains_any" - }, - "category":{ - "base":"Red" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"663f667d-561a-4920-9375-3ce367615bdc", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Green" - }, - "type":"contains_any" - }, - "category":{ - "base":"Green" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Blue" - }, - "type":"contains_any" - }, - "category":{ - "base":"Blue" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Navy" - }, - "type":"contains_any" - }, - "category":{ - "base":"Blue" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Cyan" - }, - "type":"contains_any" - }, - "category":{ - "base":"Cyan" - }, - "destination":null, - "uuid":"cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type":null - }, - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"Other" - }, - "destination":null, - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "ruleset_type":"expression", - "label":"Color", - "y":329, - "finished_key":null, - "operand":"@extra.value", - "x":98, - "config":{ - - } - }, - { - "uuid":"8b941374-1b65-4154-afa3-27b871f7be6b", - "rules":[ - { - "test":{ - "test":{ - "base":"Mutzig" - }, - "type":"contains_any" - }, - "category":{ - "base":"Mutzig" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Primus" - }, - "type":"contains_any" - }, - "category":{ - "base":"Primus" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Turbo King" - }, - "type":"contains_any" - }, - "category":{ - "base":"Turbo King" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Skol" - }, - "type":"contains_any" - }, - "category":{ - "base":"Skol" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type":"A" - }, - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"Other" - }, - "destination":"7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid":"fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type":"A" - } - ], - "ruleset_type":"expression", - "label":"Beer", - "operand":"@step.value|lower_case", - "finished_key":null, - "y":687, - "x":112, - "config":{ - - } - }, - { - "uuid":"c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid":"cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type":"A" - } - ], - "ruleset_type":"wait_message", - "label":"Name", - "operand":"@step.value", - "finished_key":null, - "y":1002, - "x":191, - "config":{ - - } - }, - { - "uuid":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "ruleset_type":"wait_message", - "label":"Color Response", - "operand":"@step.value", - "finished_key":null, - "y":129, - "x":98, - "config":{ - - } - }, - { - "uuid":"c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "webhook_action":"POST", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "webhook":"http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "ruleset_type":"webhook", - "label":"Color Webhook", - "operand":"@step.value", - "finished_key":null, - "y":229, - "x":98, - "config":{ - - } - }, - { - "uuid":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"8b941374-1b65-4154-afa3-27b871f7be6b", - "uuid":"fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type":"A" - } - ], - "ruleset_type":"wait_message", - "label":"Beer Response", - "y":587, - "finished_key":null, - "operand":"@step.value", - "x":112, - "config":{ - - } - } - ], - "action_sets":[ - { - "y":0, - "x":100, - "destination":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid":"a6676605-332a-4309-a8b8-79b33e73adcd", - "actions":[ - { - "msg":{ - "base":"What is your favorite color?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type":"add_group", - "uuid":"5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups":[ - { - "name":"< 25", - "id":15572 - } - ] - }, - { - "type":"del_group", - "uuid":"2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups":[ - { - "name":"> 100", - "id":15573 - } - ] - } - ] - }, - { - "y":437, - "x":131, - "destination":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions":[ - { - "msg":{ - "base":"Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y":8, - "x":456, - "destination":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid":"37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions":[ - { - "msg":{ - "base":"I don't know that color. Try again." - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y":835, - "x":191, - "destination":"c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions":[ - { - "msg":{ - "base":"Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y":465, - "x":512, - "destination":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid":"7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions":[ - { - "msg":{ - "base":"I don't know that one, try again please." - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y":1105, - "x":191, - "destination":null, - "uuid":"fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions":[ - { - "msg":{ - "base":"Thanks @flow.name, we are all done!" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "entry":"a6676605-332a-4309-a8b8-79b33e73adcd", - "metadata":{ - "uuid":"77ae372d-a937-4d9b-a703-cc1c75c4c6f1", - "notes":[ - - ], - "expires":720, - "name":"Favorites", - "saved_on":"2017-08-16T23:10:18.579169Z", - "revision":1 - } - }, - "version":6, - "flow_type":"F", - "name":"Favorites", - "entry":"a6676605-332a-4309-a8b8-79b33e73adcd" - } - ], - "triggers":[ - - ] - } \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v7.json b/media/test_flows/favorites_bad_group_name_v7.json deleted file mode 100644 index d573c0524cb..00000000000 --- a/media/test_flows/favorites_bad_group_name_v7.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "version":7, - "flows":[ - { - "base_language":"base", - "action_sets":[ - { - "y":0, - "x":100, - "destination":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid":"a6676605-332a-4309-a8b8-79b33e73adcd", - "actions":[ - { - "msg":{ - "base":"What is your favorite color?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type":"add_group", - "uuid":"5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups":[ - { - "name":"< 25", - "id":15572 - } - ] - }, - { - "type":"del_group", - "uuid":"2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups":[ - { - "name":"> 100", - "id":15573 - } - ] - } - ] - }, - { - "y":437, - "x":131, - "destination":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions":[ - { - "msg":{ - "base":"Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y":8, - "x":456, - "destination":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid":"37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions":[ - { - "msg":{ - "base":"I don't know that color. Try again." - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y":835, - "x":191, - "destination":"c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions":[ - { - "msg":{ - "base":"Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y":465, - "x":512, - "destination":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid":"7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions":[ - { - "msg":{ - "base":"I don't know that one, try again please." - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y":1105, - "x":191, - "destination":null, - "uuid":"fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions":[ - { - "msg":{ - "base":"Thanks @flow.name, we are all done!" - }, - "media":{ - - }, - "send_all":false, - "type":"reply", - "uuid":"512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "flow_type":"F", - "entry":"a6676605-332a-4309-a8b8-79b33e73adcd", - "rule_sets":[ - { - "uuid":"c564c56f-0341-471e-8bb1-e303090fea6a", - "rules":[ - { - "test":{ - "test":{ - "base":"Red" - }, - "type":"contains_any" - }, - "category":{ - "base":"Red" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"663f667d-561a-4920-9375-3ce367615bdc", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Green" - }, - "type":"contains_any" - }, - "category":{ - "base":"Green" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Blue" - }, - "type":"contains_any" - }, - "category":{ - "base":"Blue" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Navy" - }, - "type":"contains_any" - }, - "category":{ - "base":"Blue" - }, - "destination":"00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid":"08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Cyan" - }, - "type":"contains_any" - }, - "category":{ - "base":"Cyan" - }, - "destination":null, - "uuid":"cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type":null - }, - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"Other" - }, - "destination":null, - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "ruleset_type":"expression", - "label":"Color", - "operand":"@extra.value", - "finished_key":null, - "y":329, - "x":98, - "config":{ - - } - }, - { - "uuid":"8b941374-1b65-4154-afa3-27b871f7be6b", - "rules":[ - { - "test":{ - "test":{ - "base":"Mutzig" - }, - "type":"contains_any" - }, - "category":{ - "base":"Mutzig" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Primus" - }, - "type":"contains_any" - }, - "category":{ - "base":"Primus" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Turbo King" - }, - "type":"contains_any" - }, - "category":{ - "base":"Turbo King" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type":"A" - }, - { - "test":{ - "test":{ - "base":"Skol" - }, - "type":"contains_any" - }, - "category":{ - "base":"Skol" - }, - "destination":"92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid":"c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type":"A" - }, - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"Other" - }, - "destination":"7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid":"fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type":"A" - } - ], - "ruleset_type":"expression", - "label":"Beer", - "y":687, - "finished_key":null, - "operand":"@step.value|lower_case", - "x":112, - "config":{ - - } - }, - { - "uuid":"c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid":"cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type":"A" - } - ], - "ruleset_type":"wait_message", - "label":"Name", - "y":1002, - "finished_key":null, - "operand":"@step.value", - "x":191, - "config":{ - - } - }, - { - "uuid":"0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "ruleset_type":"wait_message", - "label":"Color Response", - "y":129, - "finished_key":null, - "operand":"@step.value", - "x":98, - "config":{ - - } - }, - { - "uuid":"c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "webhook_action":"POST", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid":"955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type":null - } - ], - "webhook":"http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "ruleset_type":"webhook", - "label":"Color Webhook", - "y":229, - "finished_key":null, - "operand":"@step.value", - "x":98, - "config":{ - - } - }, - { - "uuid":"58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules":[ - { - "test":{ - "test":"true", - "type":"true" - }, - "category":{ - "base":"All Responses" - }, - "destination":"8b941374-1b65-4154-afa3-27b871f7be6b", - "uuid":"fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type":"A" - } - ], - "ruleset_type":"wait_message", - "label":"Beer Response", - "operand":"@step.value", - "finished_key":null, - "y":587, - "x":112, - "config":{ - - } - } - ], - "metadata":{ - "uuid":null, - "notes":[ - - ], - "expires":720, - "name":"Favorites", - "saved_on":null, - "id":null, - "revision":1 - } - } - ], - "triggers":[ - - ] -} \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v8.json b/media/test_flows/favorites_bad_group_name_v8.json deleted file mode 100644 index 54be9f6846a..00000000000 --- a/media/test_flows/favorites_bad_group_name_v8.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "version":8, - "flows":[ - { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", - "actions": [ - { - "msg": { - "base": "What is your favorite color?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type": "add_group", - "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups": [ - { - "name": "< 25", - "id": 15572 - } - ] - }, - { - "type": "del_group", - "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups": [ - { - "name": "> 100", - "id": 15573 - } - ] - } - ] - }, - { - "y": 437, - "x": 131, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions": [ - { - "msg": { - "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y": 8, - "x": 456, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions": [ - { - "msg": { - "base": "I don't know that color. Try again." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y": 835, - "x": 191, - "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions": [ - { - "msg": { - "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y": 465, - "x": 512, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions": [ - { - "msg": { - "base": "I don't know that one, try again please." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y": 1105, - "x": 191, - "destination": null, - "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions": [ - { - "msg": { - "base": "Thanks @flow.name, we are all done!" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "flow_type": "F", - "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", - "rule_sets": [ - { - "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", - "rules": [ - { - "test": { - "test": { - "base": "Red" - }, - "type": "contains_any" - }, - "category": { - "base": "Red" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "663f667d-561a-4920-9375-3ce367615bdc", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Green" - }, - "type": "contains_any" - }, - "category": { - "base": "Green" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Blue" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Navy" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Cyan" - }, - "type": "contains_any" - }, - "category": { - "base": "Cyan" - }, - "destination": null, - "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type": null - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": null, - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": "expression", - "label": "Color", - "y": 329, - "finished_key": null, - "operand": "@extra.value", - "x": 98, - "config": {} - }, - { - "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", - "rules": [ - { - "test": { - "test": { - "base": "Mutzig" - }, - "type": "contains_any" - }, - "category": { - "base": "Mutzig" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Primus" - }, - "type": "contains_any" - }, - "category": { - "base": "Primus" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Turbo King" - }, - "type": "contains_any" - }, - "category": { - "base": "Turbo King" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Skol" - }, - "type": "contains_any" - }, - "category": { - "base": "Skol" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": "expression", - "label": "Beer", - "operand": "@(LOWER(step.value))", - "finished_key": null, - "y": 687, - "x": 112, - "config": {} - }, - { - "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type": "A" - } - ], - "ruleset_type": "wait_message", - "label": "Name", - "operand": "@step.value", - "finished_key": null, - "y": 1002, - "x": 191, - "config": {} - }, - { - "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": "wait_message", - "label": "Color Response", - "operand": "@step.value", - "finished_key": null, - "y": 129, - "x": 98, - "config": {} - }, - { - "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "webhook_action": "POST", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "ruleset_type": "webhook", - "label": "Color Webhook", - "operand": "@step.value", - "finished_key": null, - "y": 229, - "x": 98, - "config": {} - }, - { - "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": "wait_message", - "label": "Beer Response", - "y": 587, - "finished_key": null, - "operand": "@step.value", - "x": 112, - "config": {} - } - ], - "metadata": { - "uuid": null, - "notes": [], - "expires": 720, - "name": "Favorites", - "revision": 1, - "id": null, - "saved_on": null - } - } - ], - "triggers":[ - - ] -} \ No newline at end of file diff --git a/media/test_flows/favorites_bad_group_name_v9.json b/media/test_flows/favorites_bad_group_name_v9.json deleted file mode 100644 index 1ff3e4354f8..00000000000 --- a/media/test_flows/favorites_bad_group_name_v9.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "version":9, - "flows":[ - { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", - "actions": [ - { - "msg": { - "base": "What is your favorite color?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" - }, - { - "type": "add_group", - "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "groups": [ - { - "uuid": "0fdffdb4-3ca4-4d35-b6a7-129b0dfc7d39", - "name": "< 25" - } - ] - }, - { - "type": "del_group", - "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", - "groups": [ - { - "uuid": "e5e7bfaf-7c35-4590-8039-c33da2b98d8c", - "name": "> 100" - } - ] - } - ] - }, - { - "y": 437, - "x": 131, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "actions": [ - { - "msg": { - "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" - } - ] - }, - { - "y": 8, - "x": 456, - "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", - "actions": [ - { - "msg": { - "base": "I don't know that color. Try again." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" - } - ] - }, - { - "y": 835, - "x": 191, - "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "actions": [ - { - "msg": { - "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" - } - ] - }, - { - "y": 465, - "x": 512, - "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "actions": [ - { - "msg": { - "base": "I don't know that one, try again please." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" - } - ] - }, - { - "y": 1105, - "x": 191, - "destination": null, - "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "actions": [ - { - "msg": { - "base": "Thanks @flow.name, we are all done!" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" - } - ] - } - ], - "flow_type": "F", - "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", - "rule_sets": [ - { - "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", - "rules": [ - { - "test": { - "test": { - "base": "Red" - }, - "type": "contains_any" - }, - "category": { - "base": "Red" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "663f667d-561a-4920-9375-3ce367615bdc", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Green" - }, - "type": "contains_any" - }, - "category": { - "base": "Green" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Blue" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Navy" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", - "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Cyan" - }, - "type": "contains_any" - }, - "category": { - "base": "Cyan" - }, - "destination": null, - "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", - "destination_type": null - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": null, - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": "expression", - "label": "Color", - "y": 329, - "finished_key": null, - "operand": "@extra.value", - "x": 98, - "config": {} - }, - { - "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", - "rules": [ - { - "test": { - "test": { - "base": "Mutzig" - }, - "type": "contains_any" - }, - "category": { - "base": "Mutzig" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Primus" - }, - "type": "contains_any" - }, - "category": { - "base": "Primus" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Turbo King" - }, - "type": "contains_any" - }, - "category": { - "base": "Turbo King" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Skol" - }, - "type": "contains_any" - }, - "category": { - "base": "Skol" - }, - "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", - "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": "expression", - "label": "Beer", - "operand": "@(LOWER(step.value))", - "finished_key": null, - "y": 687, - "x": 112, - "config": {} - }, - { - "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", - "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", - "destination_type": "A" - } - ], - "ruleset_type": "wait_message", - "label": "Name", - "operand": "@step.value", - "finished_key": null, - "y": 1002, - "x": 191, - "config": {} - }, - { - "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "ruleset_type": "wait_message", - "label": "Color Response", - "operand": "@step.value", - "finished_key": null, - "y": 129, - "x": 98, - "config": {} - }, - { - "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", - "webhook_action": "POST", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", - "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", - "destination_type": null - } - ], - "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", - "ruleset_type": "webhook", - "label": "Color Webhook", - "operand": "@step.value", - "finished_key": null, - "y": 229, - "x": 98, - "config": {} - }, - { - "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", - "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", - "destination_type": "A" - } - ], - "ruleset_type": "wait_message", - "label": "Beer Response", - "y": 587, - "finished_key": null, - "operand": "@step.value", - "x": 112, - "config": {} - } - ], - "metadata": { - "uuid": null, - "notes": [], - "expires": 720, - "name": "Favorites", - "revision": 1, - "saved_on": null - } - } - ], - "triggers":[ - - ] -} \ No newline at end of file diff --git a/media/test_flows/ivr_v3.json b/media/test_flows/ivr_v3.json deleted file mode 100644 index d4b3aec48fc..00000000000 --- a/media/test_flows/ivr_v3.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "entry": "d1dd7b53-dafe-493f-a267-62301e76ee85", - "rule_sets": [ - { - "uuid": "c939d4cf-0294-4478-952b-a630ba972ba1", - "webhook_action": null, - "response_type": "C", - "rules": [ - { - "test": { - "test": "1", - "type": "eq" - }, - "category": "Yes", - "destination": "92367194-924b-4c47-9250-e47363855e32", - "uuid": "4cdf62ea-5cba-4261-992c-246c34667dc3" - }, - { - "test": { - "test": "2", - "type": "eq" - }, - "category": "No", - "destination": "866e80ae-128e-4e49-98b9-51317ec847e3", - "uuid": "a9b6086e-a423-4790-a342-df2c9972fc8c" - }, - { - "test": { - "test": "3", - "type": "eq" - }, - "category": "Maybe", - "destination": "096de08e-b260-4025-a2fd-f61996a3f4eb", - "uuid": "a4e661de-9ec1-424d-a383-362a456925e0" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": "13549d38-f341-4ad5-ad44-1e4e5cedd032", - "uuid": "f8d4e9b0-846a-4508-a3d7-2f910fa04fc0" - } - ], - "webhook": null, - "label": "Call Me", - "operand": "@step.value", - "finished_key": null, - "y": 165, - "x": 204 - } - ], - "action_sets": [ - { - "y": 91, - "x": 655, - "destination": "c939d4cf-0294-4478-952b-a630ba972ba1", - "uuid": "13549d38-f341-4ad5-ad44-1e4e5cedd032", - "actions": [ - { - "recording": null, - "msg": "Press one, two, or three. Thanks.", - "type": "say", - "uuid": "6d8d0bd4-7b72-4a91-ad78-2ac3a5220637" - } - ] - }, - { - "y": 294, - "x": 531, - "destination": null, - "uuid": "096de08e-b260-4025-a2fd-f61996a3f4eb", - "actions": [ - { - "recording": null, - "msg": "This might be crazy.", - "type": "say", - "uuid": "80cd8158-6e2a-4adb-8ddc-f9b5b036a7ad" - } - ] - }, - { - "y": 294, - "x": 310, - "destination": null, - "uuid": "866e80ae-128e-4e49-98b9-51317ec847e3", - "actions": [ - { - "recording": null, - "msg": "Fine, this is the last time we shall speak.", - "type": "say", - "uuid": "14849fb6-3a7d-41c8-9595-9e97cf17f9dd" - } - ] - }, - { - "y": 291, - "x": 91, - "destination": null, - "uuid": "92367194-924b-4c47-9250-e47363855e32", - "actions": [ - { - "recording": null, - "msg": "Great, I can't wait to give you a call later.", - "type": "say", - "uuid": "cc6c5044-ec52-4861-ba66-b2ee741b668c" - } - ] - }, - { - "y": 0, - "x": 101, - "destination": "c939d4cf-0294-4478-952b-a630ba972ba1", - "uuid": "d1dd7b53-dafe-493f-a267-62301e76ee85", - "actions": [ - { - "recording": null, - "msg": "Would you like me to call you? Press one for yes, two for no, or three for maybe.", - "type": "say", - "uuid": "03290af7-4748-46e7-ac8d-1967375de33a" - } - ] - } - ], - "metadata": { - "notes": [] - } - }, - "id": 100, - "flow_type": "V", - "name": "Call me maybe" - } - ], - "triggers": [ - { - "flow": { - "name": "Call me maybe", - "id": 100 - }, - "groups": [], - "keyword": "callme", - "trigger_type": "K" - }, - { - "flow": { - "name": "Call me maybe", - "id": 100 - }, - "groups": [], - "keyword": null, - "trigger_type": "V" - } - ] -} diff --git a/media/test_flows/legacy/invalid/no_base_language_v8.json b/media/test_flows/legacy/invalid/no_base_language_v8.json new file mode 100644 index 00000000000..69c4cfcea53 --- /dev/null +++ b/media/test_flows/legacy/invalid/no_base_language_v8.json @@ -0,0 +1,44 @@ +{ + "base_language": null, + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": null, + "uuid": "f614e8c9-eeb6-4c94-bd07-b4bbe8a95b47", + "actions": [ + { + "type": "add_group", + "groups": [ + { + "name": "A New Group", + "id": 44899 + } + ] + }, + { + "field": "location", + "type": "save", + "value": "Seattle, WA", + "label": "Location" + }, + { + "lang": "eng", + "type": "lang", + "name": "English" + } + ] + } + ], + "version": 8, + "flow_type": "F", + "entry": "f614e8c9-eeb6-4c94-bd07-b4bbe8a95b47", + "rule_sets": [], + "metadata": { + "expires": 720, + "saved_on": "2015-11-19T00:30:09.477009Z", + "id": 42104, + "name": "Join New Group", + "revision": 6 + } +} \ No newline at end of file diff --git a/media/test_flows/legacy/invalid/non_localized_ruleset.json b/media/test_flows/legacy/invalid/non_localized_ruleset.json new file mode 100644 index 00000000000..746d7dda4cf --- /dev/null +++ b/media/test_flows/legacy/invalid/non_localized_ruleset.json @@ -0,0 +1,39 @@ +{ + "base_language": "eng", + "action_sets": [], + "version": 8, + "flow_type": "F", + "entry": "99696ed8-2555-4d18-ac0b-f9b9d85abf30", + "rule_sets": [ + { + "uuid": "99696ed8-2555-4d18-ac0b-f9b9d85abf30", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": "All Responses", + "uuid": "9b31bbfe-23d7-4838-806a-1a3989de3f37" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Response 1", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 0, + "x": 100, + "config": {} + } + ], + "metadata": { + "expires": 10080, + "revision": 1, + "id": 42135, + "name": "Empty", + "saved_on": "2015-11-19T22:31:15.972687Z" + } +} \ No newline at end of file diff --git a/media/test_flows/legacy/invalid/non_localized_with_language.json b/media/test_flows/legacy/invalid/non_localized_with_language.json new file mode 100644 index 00000000000..60169c3cba0 --- /dev/null +++ b/media/test_flows/legacy/invalid/non_localized_with_language.json @@ -0,0 +1,326 @@ +{ + "base_language": "eng", + "action_sets": [ + { + "y": 991, + "x": 389, + "destination": "7d1b7019-b611-4132-9ba4-af36cc167398", + "uuid": "49189b3e-8e2b-473f-bec2-10378f5a7c06", + "actions": [ + { + "msg": "Thanks @extra.name, we'll be in touch ASAP about order # @extra.order.", + "type": "reply" + }, + { + "msg": "Customer @extra.name has a problem with their order @extra.order for @extra.description. Please look into it ASAP and call them back with the status.\n \nCustomer Comment: \"@flow.comment\"\nCustomer Name: @extra.name\nCustomer Phone: @contact.tel ", + "type": "email", + "emails": [ + "name@domain.com" + ], + "subject": "Order Comment: @flow.lookup: @extra.order" + } + ] + }, + { + "y": 574, + "x": 612, + "destination": "6f550596-98a2-44fb-b769-b3c529f1b963", + "uuid": "8618411e-a35e-472b-b867-3339aa46027a", + "actions": [ + { + "msg": "Uh oh @extra.name! Our record indicate that your order for @extra.description was cancelled on @extra.cancel_date. If you think this is in error, please reply with a comment and our orders department will get right on it!", + "type": "reply" + } + ] + }, + { + "y": 572, + "x": 389, + "destination": "6f550596-98a2-44fb-b769-b3c529f1b963", + "uuid": "32bb903e-44c2-40f9-b65f-c8cda6490ee6", + "actions": [ + { + "msg": "Hi @extra.name. Hope you are patient because we haven't shipped your order for @extra.description yet. We expect to ship it by @extra.ship_date though. If you have any questions, just reply and our customer service department will be notified.", + "type": "reply" + } + ] + }, + { + "y": 572, + "x": 167, + "destination": "6f550596-98a2-44fb-b769-b3c529f1b963", + "uuid": "bf36a209-4e21-44ac-835a-c3d5889aa2fb", + "actions": [ + { + "msg": "Great news @extra.name! We shipped your order for @extra.description on @extra.ship_date and we expect it will be delivered on @extra.delivery_date. If you have any questions, just reply and our customer service department will be notified.", + "type": "reply" + } + ] + }, + { + "y": 99, + "x": 787, + "destination": "69c427a4-b9b6-4f67-9e35-f783b3e81bfd", + "uuid": "7f4c29e3-f022-420d-8e2f-6165c572b991", + "actions": [ + { + "msg": "Sorry that doesn't look like a valid order number. Maybe try: CU001, CU002 or CU003?", + "type": "reply" + } + ] + }, + { + "y": 0, + "x": 409, + "destination": "69c427a4-b9b6-4f67-9e35-f783b3e81bfd", + "uuid": "4f79034a-51e0-4210-99cc-17f385de4de8", + "actions": [ + { + "msg": "Thanks for contacting the ThriftShop order status system. Please send your order # and we'll help you in a jiffy!", + "type": "reply" + } + ] + }, + { + "y": 854, + "x": 776, + "destination": "2cb5adcd-31b1-4d21-a0df-c5375cea1963", + "uuid": "6f550596-98a2-44fb-b769-b3c529f1b963", + "actions": [ + { + "msg": "@flow.lookup_response", + "type": "reply" + } + ] + }, + { + "y": 1430, + "x": 233, + "destination": "ad1d5767-8dfd-4c5d-b2e8-a997adb3a276", + "uuid": "81613e37-414c-4d73-884b-4ee7ae0fd913", + "actions": [ + { + "msg": "asdf", + "type": "reply" + } + ] + } + ], + "version": 8, + "flow_type": "F", + "entry": "4f79034a-51e0-4210-99cc-17f385de4de8", + "rule_sets": [ + { + "uuid": "2cb5adcd-31b1-4d21-a0df-c5375cea1963", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": "All Responses", + "destination": "49189b3e-8e2b-473f-bec2-10378f5a7c06", + "uuid": "088470d7-c4a9-4dd7-8be4-d10faf02fcea", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Comment", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 955, + "x": 762, + "config": {} + }, + { + "uuid": "69c427a4-b9b6-4f67-9e35-f783b3e81bfd", + "webhook_action": null, + "rules": [ + { + "category": "All Responses", + "uuid": "c85136c2-dcdd-4c4b-835d-a083ebde5e07", + "destination": "b3bd5abb-3f70-4af5-85eb-d07900f9cb85", + "destination_type": "R", + "test": { + "test": "true", + "type": "true" + }, + "config": { + "type": "true", + "verbose_name": "contains anything", + "name": "Other", + "operands": 0 + } + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Lookup Responses", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 198, + "x": 356, + "config": {} + }, + { + "uuid": "7d1b7019-b611-4132-9ba4-af36cc167398", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": "All Responses", + "destination": "81613e37-414c-4d73-884b-4ee7ae0fd913", + "uuid": "124f3266-bc62-4743-b4b1-79fee0d45ad9", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Extra Comments", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 1252, + "x": 389, + "config": {} + }, + { + "uuid": "6baa1d6b-ee70-4d7c-85b3-22ed94281227", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "Shipped", + "type": "contains" + }, + "category": "Shipped", + "destination": "bf36a209-4e21-44ac-835a-c3d5889aa2fb", + "uuid": "bb336f83-3a5f-4a2e-ad42-757a0a79892b", + "destination_type": "A" + }, + { + "test": { + "test": "Pending", + "type": "contains" + }, + "category": "Pending", + "destination": "32bb903e-44c2-40f9-b65f-c8cda6490ee6", + "uuid": "91826255-5a81-418c-aadb-3378802a1134", + "destination_type": "A" + }, + { + "test": { + "test": "Cancelled", + "type": "contains" + }, + "category": "Cancelled", + "destination": "8618411e-a35e-472b-b867-3339aa46027a", + "uuid": "1efa73d0-e30c-4495-a5c8-724b48385839", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": "Other", + "destination": "7f4c29e3-f022-420d-8e2f-6165c572b991", + "uuid": "c85136c2-dcdd-4c4b-835d-a083ebde5e07", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "expression", + "label": "Lookup", + "operand": "@extra.status", + "finished_key": null, + "response_type": "", + "y": 398, + "x": 356, + "config": {} + }, + { + "uuid": "b3bd5abb-3f70-4af5-85eb-d07900f9cb85", + "webhook_action": "POST", + "rules": [ + { + "category": "All Responses", + "uuid": "c85136c2-dcdd-4c4b-835d-a083ebde5e07", + "destination": "6baa1d6b-ee70-4d7c-85b3-22ed94281227", + "destination_type": "R", + "test": { + "test": "true", + "type": "true" + }, + "config": { + "type": "true", + "verbose_name": "contains anything", + "name": "Other", + "operands": 0 + } + } + ], + "webhook": "https://api.textit.in/demo/status/", + "ruleset_type": "webhook", + "label": "Lookup Webhook", + "operand": "@extra.status", + "finished_key": null, + "response_type": "", + "y": 298, + "x": 356, + "config": {} + }, + { + "uuid": "ad1d5767-8dfd-4c5d-b2e8-a997adb3a276", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": "All Responses", + "config": { + "type": "true", + "verbose_name": "contains anything", + "name": "Other", + "operands": 0 + }, + "uuid": "439c839b-f04a-4394-9b8b-be91ca0991bd" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Boo", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 1580, + "x": 362, + "config": {} + } + ], + "metadata": { + "uuid": "2ed28d6a-61cd-436a-9159-01b024992e78", + "notes": [ + { + "body": "This flow demonstrates looking up an order using a webhook and giving the user different options based on the results. After looking up the order the user has the option to send additional comments which are forwarded to customer support representatives.\n\nUse order numbers CU001, CU002 or CU003 to see the different cases in action.", + "x": 59, + "y": 0, + "title": "Using Your Own Data" + } + ], + "expires": 720, + "name": "Sample Flow - Order Status Checker", + "saved_on": "2015-11-19T19:32:17.523441Z", + "id": 42133, + "revision": 1 + } +} \ No newline at end of file diff --git a/media/test_flows/legacy/invalid/not_fully_localized.json b/media/test_flows/legacy/invalid/not_fully_localized.json new file mode 100644 index 00000000000..bff2bfbe74e --- /dev/null +++ b/media/test_flows/legacy/invalid/not_fully_localized.json @@ -0,0 +1,31 @@ +{ + "version": 7, + "flow_type": "F", + "base_language": "eng", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": null, + "uuid": "127f3736-77ce-4006-9ab0-0c07cea88956", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "type": "reply" + } + ] + } + ], + "last_saved": "2015-09-15T02:37:08.805578Z", + "entry": "127f3736-77ce-4006-9ab0-0c07cea88956", + "rule_sets": [], + "metadata": { + "notes": [], + "name": "Not fully localized", + "id": 35559, + "expires": 720, + "revision": 1 + } +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/dual_webhook.json b/media/test_flows/legacy/migrations/dual_webhook.json new file mode 100644 index 00000000000..bd081f6ba4b --- /dev/null +++ b/media/test_flows/legacy/migrations/dual_webhook.json @@ -0,0 +1,132 @@ +{ + "campaigns": [], + "version": 9, + "site": "https://textit.in", + "flows": [ + { + "base_language": "eng", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0aabad42-3ec6-40c7-a4cc-c5190b8b4465", + "uuid": "ff642bb5-14fa-4bb6-8040-0ceec395a164", + "actions": [ + { + "msg": { + "eng": "This is the first message" + }, + "type": "reply" + } + ] + }, + { + "y": 310, + "x": 129, + "destination": "6304e1d5-3c0c-44ea-9519-39389227e3c0", + "uuid": "d7523614-1b39-481f-a451-4c4ac9201095", + "actions": [ + { + "msg": { + "eng": "Great, your code is @extra.code. Enter your name" + }, + "type": "reply" + } + ] + } + ], + "version": 9, + "flow_type": "F", + "entry": "ff642bb5-14fa-4bb6-8040-0ceec395a164", + "rule_sets": [ + { + "uuid": "0aabad42-3ec6-40c7-a4cc-c5190b8b4465", + "webhook_action": "POST", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "eng": "All Responses" + }, + "destination": "d7523614-1b39-481f-a451-4c4ac9201095", + "uuid": "1717d336-6fb3-4da0-ac51-4588792e46d2", + "destination_type": "A" + } + ], + "webhook": "http://localhost:49999/code", + "ruleset_type": "webhook", + "label": "Webhook", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 169, + "x": 286, + "config": {} + }, + { + "uuid": "6304e1d5-3c0c-44ea-9519-39389227e3c0", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "eng": "All Responses" + }, + "destination": "8ad78c14-7ebe-4968-82dc-b66dc27d4d96", + "uuid": "da800d48-b1c8-44cf-8e2c-b6c6d5c98aa3", + "destination_type": "R" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 457, + "x": 265, + "config": {} + }, + { + "uuid": "8ad78c14-7ebe-4968-82dc-b66dc27d4d96", + "webhook_action": "GET", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "eng": "All Responses" + }, + "uuid": "4dd0f3e7-cc15-41fa-8a84-d53d76d46d66" + } + ], + "webhook": "http://localhost:49999/success", + "ruleset_type": "webhook", + "label": "Webhook 2", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 617, + "x": 312, + "config": {} + } + ], + "metadata": { + "expires": 10080, + "revision": 16, + "uuid": "099d0d1e-3769-472f-9ea7-f3bd5a11c8ff", + "name": "Webhook Migration", + "saved_on": "2016-08-16T16:34:56.351428Z" + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites.json b/media/test_flows/legacy/migrations/favorites.json new file mode 100644 index 00000000000..8e328ddbd18 --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites.json @@ -0,0 +1,315 @@ +{ + "version": 7, + "flows": [ + { + "version": 7, + "flow_type": "M", + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "2bff5c33-9d29-4cfc-8bb7-0a1b9f97d830", + "uuid": "127f3736-77ce-4006-9ab0-0c07cea88956", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "type": "reply" + } + ] + }, + { + "y": 237, + "x": 131, + "destination": "a5fc5f8a-f562-4b03-a54f-51928f9df07e", + "uuid": "44471ade-7979-4c94-8028-6cfb68836337", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "type": "reply" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "2bff5c33-9d29-4cfc-8bb7-0a1b9f97d830", + "uuid": "f9adf38f-ab18-49d3-a8ac-db2fe8f1e77f", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "type": "reply" + } + ] + }, + { + "y": 535, + "x": 191, + "destination": "ba95c5cd-e428-4a15-8b4b-23dd43943f2c", + "uuid": "89c5624e-3320-4668-a066-308865133080", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @flow.color|lower_case @flow.beer.category! Lastly, what is your name?" + }, + "type": "reply" + } + ] + }, + { + "y": 265, + "x": 512, + "destination": "a5fc5f8a-f562-4b03-a54f-51928f9df07e", + "uuid": "a269683d-8229-4870-8585-be8320b9d8ca", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "type": "reply" + } + ] + }, + { + "y": 805, + "x": 191, + "destination": null, + "uuid": "10e483a8-5ffb-4c4f-917b-d43ce86c1d65", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "type": "reply" + } + ] + } + ], + "last_saved": "2015-09-15T02:37:08.805578Z", + "entry": "127f3736-77ce-4006-9ab0-0c07cea88956", + "rule_sets": [ + { + "uuid": "2bff5c33-9d29-4cfc-8bb7-0a1b9f97d830", + "webhook_action": null, + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "44471ade-7979-4c94-8028-6cfb68836337", + "uuid": "8cd25a3f-0be2-494b-8b4c-3a4f0de7f9b2", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "44471ade-7979-4c94-8028-6cfb68836337", + "uuid": "db2863cf-7fda-4489-9345-d44dacf4e750", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "44471ade-7979-4c94-8028-6cfb68836337", + "uuid": "2f462678-b176-49c1-bb5c-6e152502b0db", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "44471ade-7979-4c94-8028-6cfb68836337", + "uuid": "ecaeb59a-d7f1-4c21-a207-b2a29cc2488f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "6f463a78-b176-49c1-bb5c-6e152502b0db", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "f9adf38f-ab18-49d3-a8ac-db2fe8f1e77f", + "uuid": "df4455c2-806b-4af4-8ea9-f40278ec10e4", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Color", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 129, + "x": 98, + "config": {} + }, + { + "uuid": "a5fc5f8a-f562-4b03-a54f-51928f9df07e", + "webhook_action": null, + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "89c5624e-3320-4668-a066-308865133080", + "uuid": "ea304225-332e-49d4-9768-1e804cd0b6c2", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "89c5624e-3320-4668-a066-308865133080", + "uuid": "57f8688e-c263-43d7-bd06-bdb98f0c58a8", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "89c5624e-3320-4668-a066-308865133080", + "uuid": "670f0205-bb39-4e12-ae95-5e29251b8a3e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "89c5624e-3320-4668-a066-308865133080", + "uuid": "2ff4713f-c62f-445c-880c-de8f6532d090", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "a269683d-8229-4870-8585-be8320b9d8ca", + "uuid": "1fc4c133-d038-4f75-a69e-6e7e3190e5d8", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Beer", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 387, + "x": 112, + "config": {} + }, + { + "uuid": "ba95c5cd-e428-4a15-8b4b-23dd43943f2c", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "10e483a8-5ffb-4c4f-917b-d43ce86c1d65", + "uuid": "c072ecb5-0686-40ea-8ed3-898dc1349783", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "wait_message", + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 702, + "x": 191, + "config": {} + } + ], + "metadata": { + "notes": [], + "name": "Favorites", + "id": 35559, + "expires": 720, + "revision": 1 + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v10.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v10.json new file mode 100644 index 00000000000..3b28a37b65a --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v10.json @@ -0,0 +1,430 @@ +{ + "version": 10, + "flows": [ + { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "uuid": "0fdffdb4-3ca4-4d35-b6a7-129b0dfc7d39", + "name": "< 25" + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "uuid": "e5e7bfaf-7c35-4590-8039-c33da2b98d8c", + "name": "> 100" + } + ] + } + ] + }, + { + "y": 437, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 835, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 465, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 1105, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "flow_type": "F", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", + "rule_sets": [ + { + "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "expression", + "label": "Color", + "operand": "@extra.value", + "finished_key": null, + "y": 329, + "x": 98, + "config": {} + }, + { + "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "expression", + "label": "Beer", + "y": 687, + "finished_key": null, + "operand": "@(LOWER(step.value))", + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Name", + "y": 1002, + "finished_key": null, + "operand": "@step.value", + "x": 191, + "config": {} + }, + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "wait_message", + "label": "Color Response", + "y": 129, + "finished_key": null, + "operand": "@step.value", + "x": 98, + "config": {} + }, + { + "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "rules": [ + { + "category": { + "base": "Success" + }, + "test": { + "status": "success", + "type": "webhook_status" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + }, + { + "category": { + "base": "Failure" + }, + "test": { + "status": "failure", + "type": "webhook_status" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "cb902a40-780f-4e9b-a31e-e7d1021d05ed", + "destination_type": null + } + ], + "ruleset_type": "webhook", + "label": "Color Webhook", + "y": 229, + "finished_key": null, + "operand": "@step.value", + "x": 98, + "config": { + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "webhook_action": "POST" + } + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Beer Response", + "operand": "@step.value", + "finished_key": null, + "y": 587, + "x": 112, + "config": {} + } + ], + "metadata": { + "uuid": null, + "notes": [], + "expires": 720, + "name": "Favorites", + "saved_on": null, + "revision": 1 + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v4.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v4.json new file mode 100644 index 00000000000..4463ede5a9d --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v4.json @@ -0,0 +1,352 @@ +{ + "version": 4, + "flows": [ + { + "definition": { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "name": "< 25", + "id": 15572 + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "name": "> 100", + "id": 15573 + } + ] + } + ] + }, + { + "y": 237, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 535, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 265, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 805, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "rule_sets": [ + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": null, + "label": "Color", + "finished_key": null, + "response_type": "C", + "y": 129, + "x": 98, + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "webhook_action": "POST", + "operand": "@extra.value", + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": null, + "label": "Beer", + "operand": "@step.value|lower_case", + "finished_key": null, + "response_type": "C", + "y": 387, + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": null, + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "response_type": "C", + "y": 702, + "x": 191, + "config": {} + } + ], + "metadata": { + "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", + "notes": [], + "expires": 720, + "name": "Favorites", + "revision": 1, + "saved_on": "2017-08-16T23:10:18.579169Z" + } + }, + "version": 4, + "flow_type": "F", + "name": "Favorites", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v5.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v5.json new file mode 100644 index 00000000000..cb95631ce7d --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v5.json @@ -0,0 +1,421 @@ +{ + "version": 5, + "flows": [ + { + "definition": { + "base_language": "base", + "rule_sets": [ + { + "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "expression", + "label": "Color", + "operand": "@extra.value", + "finished_key": null, + "y": 329, + "x": 98, + "config": {} + }, + { + "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "expression", + "label": "Beer", + "y": 687, + "finished_key": null, + "operand": "@step.value|lower_case", + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Name", + "y": 1002, + "finished_key": null, + "operand": "@step.value", + "x": 191, + "config": {} + }, + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "wait_message", + "label": "Color Response", + "y": 129, + "finished_key": null, + "operand": "@step.value", + "x": 98, + "config": {} + }, + { + "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "webhook_action": "POST", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "ruleset_type": "webhook", + "label": "Color Webhook", + "y": 229, + "finished_key": null, + "operand": "@step.value", + "x": 98, + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Beer Response", + "operand": "@step.value", + "finished_key": null, + "y": 587, + "x": 112, + "config": {} + } + ], + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "name": "< 25", + "id": 15572 + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "name": "> 100", + "id": 15573 + } + ] + } + ] + }, + { + "y": 437, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 835, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 465, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 1105, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "metadata": { + "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", + "notes": [], + "expires": 720, + "name": "Favorites", + "saved_on": "2017-08-16T23:10:18.579169Z", + "revision": 1 + } + }, + "version": 5, + "flow_type": "F", + "name": "Favorites", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v6.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v6.json new file mode 100644 index 00000000000..9025e045606 --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v6.json @@ -0,0 +1,422 @@ +{ + "version": 6, + "flows": [ + { + "definition": { + "base_language": "base", + "rule_sets": [ + { + "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "expression", + "label": "Color", + "y": 329, + "finished_key": null, + "operand": "@extra.value", + "x": 98, + "config": {} + }, + { + "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "expression", + "label": "Beer", + "operand": "@step.value|lower_case", + "finished_key": null, + "y": 687, + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "y": 1002, + "x": 191, + "config": {} + }, + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "wait_message", + "label": "Color Response", + "operand": "@step.value", + "finished_key": null, + "y": 129, + "x": 98, + "config": {} + }, + { + "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "webhook_action": "POST", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "ruleset_type": "webhook", + "label": "Color Webhook", + "operand": "@step.value", + "finished_key": null, + "y": 229, + "x": 98, + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Beer Response", + "y": 587, + "finished_key": null, + "operand": "@step.value", + "x": 112, + "config": {} + } + ], + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "name": "< 25", + "id": 15572 + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "name": "> 100", + "id": 15573 + } + ] + } + ] + }, + { + "y": 437, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 835, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 465, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 1105, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", + "metadata": { + "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", + "notes": [], + "expires": 720, + "name": "Favorites", + "saved_on": "2017-08-16T23:10:18.579169Z", + "revision": 1 + } + }, + "version": 6, + "flow_type": "F", + "name": "Favorites", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v7.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v7.json new file mode 100644 index 00000000000..14407c17a5c --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v7.json @@ -0,0 +1,418 @@ +{ + "version": 7, + "flows": [ + { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "name": "< 25", + "id": 15572 + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "name": "> 100", + "id": 15573 + } + ] + } + ] + }, + { + "y": 437, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 835, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 465, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 1105, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "flow_type": "F", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", + "rule_sets": [ + { + "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "expression", + "label": "Color", + "operand": "@extra.value", + "finished_key": null, + "y": 329, + "x": 98, + "config": {} + }, + { + "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "expression", + "label": "Beer", + "y": 687, + "finished_key": null, + "operand": "@step.value|lower_case", + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Name", + "y": 1002, + "finished_key": null, + "operand": "@step.value", + "x": 191, + "config": {} + }, + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "wait_message", + "label": "Color Response", + "y": 129, + "finished_key": null, + "operand": "@step.value", + "x": 98, + "config": {} + }, + { + "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "webhook_action": "POST", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "ruleset_type": "webhook", + "label": "Color Webhook", + "y": 229, + "finished_key": null, + "operand": "@step.value", + "x": 98, + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Beer Response", + "operand": "@step.value", + "finished_key": null, + "y": 587, + "x": 112, + "config": {} + } + ], + "metadata": { + "uuid": null, + "notes": [], + "expires": 720, + "name": "Favorites", + "saved_on": null, + "id": null, + "revision": 1 + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v8.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v8.json new file mode 100644 index 00000000000..0d512ae8ef2 --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v8.json @@ -0,0 +1,418 @@ +{ + "version": 8, + "flows": [ + { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "name": "< 25", + "id": 15572 + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "name": "> 100", + "id": 15573 + } + ] + } + ] + }, + { + "y": 437, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 835, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 465, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 1105, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "flow_type": "F", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", + "rule_sets": [ + { + "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "expression", + "label": "Color", + "y": 329, + "finished_key": null, + "operand": "@extra.value", + "x": 98, + "config": {} + }, + { + "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "expression", + "label": "Beer", + "operand": "@(LOWER(step.value))", + "finished_key": null, + "y": 687, + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "y": 1002, + "x": 191, + "config": {} + }, + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "wait_message", + "label": "Color Response", + "operand": "@step.value", + "finished_key": null, + "y": 129, + "x": 98, + "config": {} + }, + { + "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "webhook_action": "POST", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "ruleset_type": "webhook", + "label": "Color Webhook", + "operand": "@step.value", + "finished_key": null, + "y": 229, + "x": 98, + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Beer Response", + "y": 587, + "finished_key": null, + "operand": "@step.value", + "x": 112, + "config": {} + } + ], + "metadata": { + "uuid": null, + "notes": [], + "expires": 720, + "name": "Favorites", + "revision": 1, + "id": null, + "saved_on": null + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_bad_group_name_v9.json b/media/test_flows/legacy/migrations/favorites_bad_group_name_v9.json new file mode 100644 index 00000000000..ee7c978446d --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_bad_group_name_v9.json @@ -0,0 +1,417 @@ +{ + "version": 9, + "flows": [ + { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + }, + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "groups": [ + { + "uuid": "0fdffdb4-3ca4-4d35-b6a7-129b0dfc7d39", + "name": "< 25" + } + ] + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "groups": [ + { + "uuid": "e5e7bfaf-7c35-4590-8039-c33da2b98d8c", + "name": "> 100" + } + ] + } + ] + }, + { + "y": 437, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 835, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 465, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 1105, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "flow_type": "F", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd", + "rule_sets": [ + { + "uuid": "c564c56f-0341-471e-8bb1-e303090fea6a", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "expression", + "label": "Color", + "y": 329, + "finished_key": null, + "operand": "@extra.value", + "x": 98, + "config": {} + }, + { + "uuid": "8b941374-1b65-4154-afa3-27b871f7be6b", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "expression", + "label": "Beer", + "operand": "@(LOWER(step.value))", + "finished_key": null, + "y": 687, + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "y": 1002, + "x": 191, + "config": {} + }, + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": "wait_message", + "label": "Color Response", + "operand": "@step.value", + "finished_key": null, + "y": 129, + "x": 98, + "config": {} + }, + { + "uuid": "c7dae7c5-129d-44f7-8c05-c32a0efc6058", + "webhook_action": "POST", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "c564c56f-0341-471e-8bb1-e303090fea6a", + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "webhook": "http://localhost:49999/echo?content=%7B%20%22status%22%3A%20%22valid%22%20%7D", + "ruleset_type": "webhook", + "label": "Color Webhook", + "operand": "@step.value", + "finished_key": null, + "y": 229, + "x": 98, + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "8b941374-1b65-4154-afa3-27b871f7be6b", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": "wait_message", + "label": "Beer Response", + "y": 587, + "finished_key": null, + "operand": "@step.value", + "x": 112, + "config": {} + } + ], + "metadata": { + "uuid": null, + "notes": [], + "expires": 720, + "name": "Favorites", + "revision": 1, + "saved_on": null + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/favorites_v4.json b/media/test_flows/legacy/migrations/favorites_v4.json new file mode 100644 index 00000000000..eb1e13ec4f0 --- /dev/null +++ b/media/test_flows/legacy/migrations/favorites_v4.json @@ -0,0 +1,332 @@ +{ + "version": 4, + "flows": [ + { + "definition": { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "msg": { + "base": "What is your favorite color?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "98388930-7a0f-4eb8-9a0a-09be2f006420" + } + ] + }, + { + "y": 237, + "x": 131, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "actions": [ + { + "msg": { + "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "cf57f270-c9d7-4826-b3cc-7bfc22ac4ef6" + } + ] + }, + { + "y": 8, + "x": 456, + "destination": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "uuid": "37f62180-025e-4360-a72b-59af7ac6d1ab", + "actions": [ + { + "msg": { + "base": "I don't know that color. Try again." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "d6aee40b-3710-4358-b0a6-c0ddc1d7734e" + } + ] + }, + { + "y": 535, + "x": 191, + "destination": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "uuid": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "actions": [ + { + "msg": { + "base": "Mmmmm... delicious @flow.beer.category. If only they made @(LOWER(flow.color)) @flow.beer.category! Lastly, what is your name?" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "ca798d2d-2c95-468a-a857-74797a4d5301" + } + ] + }, + { + "y": 265, + "x": 512, + "destination": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "uuid": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "actions": [ + { + "msg": { + "base": "I don't know that one, try again please." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "be5c0c50-b3a4-486f-9e2e-335bdb542385" + } + ] + }, + { + "y": 805, + "x": 191, + "destination": null, + "uuid": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "actions": [ + { + "msg": { + "base": "Thanks @flow.name, we are all done!" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "512aa0ca-0c57-4b99-a7ad-e67d290e0c2c" + } + ] + } + ], + "rule_sets": [ + { + "uuid": "0ecf7914-05e0-4b71-8816-495d2c0921b5", + "rules": [ + { + "test": { + "test": { + "base": "Red" + }, + "type": "contains_any" + }, + "category": { + "base": "Red" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "663f667d-561a-4920-9375-3ce367615bdc", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Green" + }, + "type": "contains_any" + }, + "category": { + "base": "Green" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "8977bc24-d10c-4b1a-9b07-13e3447165d1", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Blue" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "56e47151-0a7d-4dd8-89cf-35fdcb5288ef", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Navy" + }, + "type": "contains_any" + }, + "category": { + "base": "Blue" + }, + "destination": "00c0ebde-1d4f-4bf5-b5db-22f72b2551b7", + "uuid": "08403c82-043d-4744-8e1a-c863e5e92fb7", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Cyan" + }, + "type": "contains_any" + }, + "category": { + "base": "Cyan" + }, + "destination": null, + "uuid": "cc43e621-c759-4976-8088-e89a0bce7749", + "destination_type": null + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": null, + "uuid": "955bd46a-29b2-49eb-bc70-0fc573d1cceb", + "destination_type": null + } + ], + "ruleset_type": null, + "label": "Color", + "finished_key": null, + "response_type": "C", + "y": 129, + "x": 98, + "webhook": "http://localhost:49999/status", + "webhook_action": "POST", + "operand": "@extra.value", + "config": {} + }, + { + "uuid": "58ec23b9-70bb-4d70-a739-8cee2d2f1e75", + "rules": [ + { + "test": { + "test": { + "base": "Mutzig" + }, + "type": "contains_any" + }, + "category": { + "base": "Mutzig" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "d9c89b0e-2083-42e4-93c9-4d75e5f6c86f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Primus" + }, + "type": "contains_any" + }, + "category": { + "base": "Primus" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "777a04d2-aa27-4024-9b15-99f699a65a2f", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Turbo King" + }, + "type": "contains_any" + }, + "category": { + "base": "Turbo King" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "ad519b79-9738-449d-80a1-e8fc3aebd08e", + "destination_type": "A" + }, + { + "test": { + "test": { + "base": "Skol" + }, + "type": "contains_any" + }, + "category": { + "base": "Skol" + }, + "destination": "92a6a4c6-c976-405a-97c8-76bf7edd214a", + "uuid": "c27f16dc-519c-44a9-bee7-fbfe76ade983", + "destination_type": "A" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "Other" + }, + "destination": "7c3c0319-20ee-4c30-a276-55dba0d049de", + "uuid": "fbccf8e5-b167-43f1-ace3-72802ba6db92", + "destination_type": "A" + } + ], + "ruleset_type": null, + "label": "Beer", + "operand": "@step.value|lower_case", + "finished_key": null, + "response_type": "C", + "y": 387, + "x": 112, + "config": {} + }, + { + "uuid": "c85670d3-e550-40f7-9ce2-e22c5d3fbcea", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "base": "All Responses" + }, + "destination": "fbb7df74-627a-45bb-83f6-e3e4d2d8020c", + "uuid": "cf3633cc-d2e4-4f25-b318-a2ddc61b6849", + "destination_type": "A" + } + ], + "ruleset_type": null, + "label": "Name", + "operand": "@step.value", + "finished_key": null, + "response_type": "C", + "y": 702, + "x": 191, + "config": {} + } + ], + "metadata": { + "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", + "notes": [], + "expires": 720, + "name": "Favorites", + "revision": 1, + "saved_on": "2017-08-16T23:10:18.579169Z" + } + }, + "version": 4, + "flow_type": "F", + "name": "Favorites", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/ivr_v3.json b/media/test_flows/legacy/migrations/ivr_v3.json new file mode 100644 index 00000000000..97a282b2b30 --- /dev/null +++ b/media/test_flows/legacy/migrations/ivr_v3.json @@ -0,0 +1,161 @@ +{ + "campaigns": [], + "version": 3, + "site": "http://rapidpro.io", + "flows": [ + { + "definition": { + "entry": "d1dd7b53-dafe-493f-a267-62301e76ee85", + "rule_sets": [ + { + "uuid": "c939d4cf-0294-4478-952b-a630ba972ba1", + "webhook_action": null, + "response_type": "C", + "rules": [ + { + "test": { + "test": "1", + "type": "eq" + }, + "category": "Yes", + "destination": "92367194-924b-4c47-9250-e47363855e32", + "uuid": "4cdf62ea-5cba-4261-992c-246c34667dc3" + }, + { + "test": { + "test": "2", + "type": "eq" + }, + "category": "No", + "destination": "866e80ae-128e-4e49-98b9-51317ec847e3", + "uuid": "a9b6086e-a423-4790-a342-df2c9972fc8c" + }, + { + "test": { + "test": "3", + "type": "eq" + }, + "category": "Maybe", + "destination": "096de08e-b260-4025-a2fd-f61996a3f4eb", + "uuid": "a4e661de-9ec1-424d-a383-362a456925e0" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": "Other", + "destination": "13549d38-f341-4ad5-ad44-1e4e5cedd032", + "uuid": "f8d4e9b0-846a-4508-a3d7-2f910fa04fc0" + } + ], + "webhook": null, + "label": "Call Me", + "operand": "@step.value", + "finished_key": null, + "y": 165, + "x": 204 + } + ], + "action_sets": [ + { + "y": 91, + "x": 655, + "destination": "c939d4cf-0294-4478-952b-a630ba972ba1", + "uuid": "13549d38-f341-4ad5-ad44-1e4e5cedd032", + "actions": [ + { + "recording": null, + "msg": "Press one, two, or three. Thanks.", + "type": "say", + "uuid": "6d8d0bd4-7b72-4a91-ad78-2ac3a5220637" + } + ] + }, + { + "y": 294, + "x": 531, + "destination": null, + "uuid": "096de08e-b260-4025-a2fd-f61996a3f4eb", + "actions": [ + { + "recording": null, + "msg": "This might be crazy.", + "type": "say", + "uuid": "80cd8158-6e2a-4adb-8ddc-f9b5b036a7ad" + } + ] + }, + { + "y": 294, + "x": 310, + "destination": null, + "uuid": "866e80ae-128e-4e49-98b9-51317ec847e3", + "actions": [ + { + "recording": null, + "msg": "Fine, this is the last time we shall speak.", + "type": "say", + "uuid": "14849fb6-3a7d-41c8-9595-9e97cf17f9dd" + } + ] + }, + { + "y": 291, + "x": 91, + "destination": null, + "uuid": "92367194-924b-4c47-9250-e47363855e32", + "actions": [ + { + "recording": null, + "msg": "Great, I can't wait to give you a call later.", + "type": "say", + "uuid": "cc6c5044-ec52-4861-ba66-b2ee741b668c" + } + ] + }, + { + "y": 0, + "x": 101, + "destination": "c939d4cf-0294-4478-952b-a630ba972ba1", + "uuid": "d1dd7b53-dafe-493f-a267-62301e76ee85", + "actions": [ + { + "recording": null, + "msg": "Would you like me to call you? Press one for yes, two for no, or three for maybe.", + "type": "say", + "uuid": "03290af7-4748-46e7-ac8d-1967375de33a" + } + ] + } + ], + "metadata": { + "notes": [] + } + }, + "id": 100, + "flow_type": "V", + "name": "Call me maybe" + } + ], + "triggers": [ + { + "flow": { + "name": "Call me maybe", + "id": 100 + }, + "groups": [], + "keyword": "callme", + "trigger_type": "K" + }, + { + "flow": { + "name": "Call me maybe", + "id": 100 + }, + "groups": [], + "keyword": null, + "trigger_type": "V" + } + ] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/malformed_groups.json b/media/test_flows/legacy/migrations/malformed_groups.json new file mode 100644 index 00000000000..850c4f1a303 --- /dev/null +++ b/media/test_flows/legacy/migrations/malformed_groups.json @@ -0,0 +1,49 @@ +{ + "version": 4, + "flows": [ + { + "definition": { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": null, + "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", + "actions": [ + { + "type": "add_group", + "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", + "group": { + "name": "< 25", + "id": 15572 + } + }, + { + "type": "del_group", + "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", + "group": { + "id": 15573 + } + } + ] + } + ], + "rule_sets": [], + "metadata": { + "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", + "notes": [], + "expires": 720, + "name": "Bad Mojo", + "revision": 1, + "saved_on": "2017-08-16T23:10:18.579169Z" + } + }, + "version": 4, + "flow_type": "F", + "name": "Bad Mojo", + "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/malformed_single_message.json b/media/test_flows/legacy/migrations/malformed_single_message.json new file mode 100644 index 00000000000..4a11d0d3979 --- /dev/null +++ b/media/test_flows/legacy/migrations/malformed_single_message.json @@ -0,0 +1,31 @@ +{ + "campaigns": [], + "triggers": [], + "version": 3, + "site": "http://rapidpro.io", + "flows": [ + { + "name": "Single Message Flow", + "id": -1, + "uuid": "f467561a-3b95-4a4a-94bc-97bc6b4268c0", + "definition": { + "entry": "2d702ba6-461e-442c-96bc-2b8a87c9ceca", + "action_sets": [ + { + "x": 0, + "y": 0, + "uuid": "2d702ba6-461e-442c-96bc-2b8a87c9ceca", + "destination": null, + "actions": [ + { + "msg": "Single message text", + "type": "reply" + } + ] + } + ], + "rulesets": [] + } + } + ] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_0.json b/media/test_flows/legacy/migrations/migrate_to_11_0.json new file mode 100644 index 00000000000..34355cc297d --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_0.json @@ -0,0 +1,42 @@ +{ + "version": "10.4", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "d96947d0-f975-47ee-be7d-3dfe68a52703", + "action_sets": [ + { + "uuid": "d96947d0-f975-47ee-be7d-3dfe68a52703", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "msg": { + "base": { + "base": "@date Something went wrong once. I shouldn't be a dict inside a dict." + } + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "1ee58c31-3504-49d3-914b-324d484fed1d" + } + ], + "exit_uuid": "f2566f59-5d36-4de7-8581-dcc5de7e8340" + } + ], + "rule_sets": [], + "base_language": "base", + "flow_type": "M", + "version": "10.4", + "metadata": { + "name": "Migrate to 11.0", + "saved_on": "2017-11-15T22:56:36.039558Z", + "revision": 5, + "uuid": "5a8deb77-23b8-46ee-a775-48ed32742e31", + "expires": 720 + } + } + ] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_10.json b/media/test_flows/legacy/migrations/migrate_to_11_10.json new file mode 100644 index 00000000000..92e6896057d --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_10.json @@ -0,0 +1,239 @@ +{ + "version": "11.9", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "bd6ca3fc-0505-4ea6-a1c6-60d0296a7db0", + "action_sets": [ + { + "uuid": "bd6ca3fc-0505-4ea6-a1c6-60d0296a7db0", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "type": "say", + "uuid": "0738e369-279d-4e2f-a14c-08714b0d6f74", + "msg": { + "eng": "Hi there this is an IVR flow.. how did you get here?" + }, + "recording": null + } + ], + "exit_uuid": "0e78ff3d-8307-4c0e-a3b0-af4019930835" + } + ], + "rule_sets": [], + "base_language": "eng", + "flow_type": "V", + "version": "11.9", + "metadata": { + "name": "Migrate to 11.10 IVR Child", + "saved_on": "2019-01-25T21:14:37.475679Z", + "revision": 2, + "uuid": "5331c09c-2bd6-47a5-ac0d-973caf9d4cb5", + "expires": 5, + "ivr_retry": 60, + "ivr_retry_failed_events": false + } + }, + { + "entry": "920ce708-31d3-4870-804f-190fb37b9b8c", + "action_sets": [ + { + "uuid": "920ce708-31d3-4870-804f-190fb37b9b8c", + "x": 59, + "y": 0, + "destination": "90363d00-a669-4d84-ab57-eb27bf9c3284", + "actions": [ + { + "type": "reply", + "uuid": "3071cb5d-4caf-4a15-87c7-daae4a436ee7", + "msg": { + "eng": "hi" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "f646245c-ac46-4565-9215-cef53c34da09" + }, + { + "uuid": "bbd1c25f-ab01-4539-8f3e-b0ca18f366f4", + "x": 48, + "y": 345, + "destination": null, + "actions": [ + { + "type": "flow", + "uuid": "edb70527-47fa-463e-8318-359254b1bc0e", + "flow": { + "uuid": "5331c09c-2bd6-47a5-ac0d-973caf9d4cb5", + "name": "Migrate to 11.10 IVR Child" + } + } + ], + "exit_uuid": "330f0f9a-154b-49de-9ff9-a7891d4a11af" + }, + { + "uuid": "62e29de4-d85e-459d-ad38-220d1048b714", + "x": 412, + "y": 348, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "41ed5ba3-41c7-4e6f-b394-d451204bcf0f", + "msg": { + "eng": "Expired" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "0040f402-a6ac-4de4-8775-a4938b9011b8" + } + ], + "rule_sets": [ + { + "uuid": "90363d00-a669-4d84-ab57-eb27bf9c3284", + "x": 218, + "y": 82, + "label": "Response 1", + "rules": [ + { + "uuid": "4c6ac0ad-e8a8-4b1e-b958-ef2f22728821", + "category": { + "eng": "Completed" + }, + "destination": "e5dae061-2c94-45ae-a3bb-4822989e636a", + "destination_type": "R", + "test": { + "type": "subflow", + "exit_type": "completed" + }, + "label": null + }, + { + "uuid": "288dfab6-5171-4cf0-92af-e73af44dbeee", + "category": { + "eng": "Expired" + }, + "destination": "e5dae061-2c94-45ae-a3bb-4822989e636a", + "destination_type": "R", + "test": { + "type": "subflow", + "exit_type": "expired" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "subflow", + "response_type": "", + "operand": "@step.value", + "config": { + "flow": { + "name": "Migrate to 11.10 SMS Child", + "uuid": "a492288a-7b26-4507-b8db-173d28b83ad0" + } + } + }, + { + "uuid": "e5dae061-2c94-45ae-a3bb-4822989e636a", + "x": 218, + "y": 228, + "label": "Response 2", + "rules": [ + { + "uuid": "b9f763d2-82d7-4334-8ed8-806b803d32c1", + "category": { + "eng": "Completed" + }, + "destination": "bbd1c25f-ab01-4539-8f3e-b0ca18f366f4", + "destination_type": "A", + "test": { + "type": "subflow", + "exit_type": "completed" + }, + "label": null + }, + { + "uuid": "54b51a30-8c52-49aa-afc1-24d827a17a8d", + "category": { + "eng": "Expired" + }, + "destination": "62e29de4-d85e-459d-ad38-220d1048b714", + "destination_type": "A", + "test": { + "type": "subflow", + "exit_type": "expired" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "subflow", + "response_type": "", + "operand": "@step.value", + "config": { + "flow": { + "name": "Migrate to 11.10 IVR Child", + "uuid": "5331c09c-2bd6-47a5-ac0d-973caf9d4cb5" + } + } + } + ], + "base_language": "eng", + "flow_type": "M", + "version": "11.9", + "metadata": { + "name": "Migrate to 11.10 Parent", + "saved_on": "2019-01-28T19:51:28.310305Z", + "revision": 52, + "uuid": "880cea73-fab6-4353-9db2-bf2e16067941", + "expires": 10080 + } + }, + { + "entry": "762fb8ad-1ec5-4246-a577-e08f0fe497e5", + "action_sets": [ + { + "uuid": "762fb8ad-1ec5-4246-a577-e08f0fe497e5", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "69a7f227-5f44-4ddc-80e1-b9dd855868eb", + "msg": { + "eng": "I'm just a regular honest messaging flow" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "8ec7a5ed-675c-4102-b211-ea10258ac5f9" + } + ], + "rule_sets": [], + "base_language": "eng", + "flow_type": "M", + "version": "11.9", + "metadata": { + "name": "Migrate to 11.10 SMS Child", + "saved_on": "2019-01-28T19:03:29.579743Z", + "revision": 2, + "uuid": "a492288a-7b26-4507-b8db-173d28b83ad0", + "expires": 10080, + "ivr_retry_failed_events": null + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_11.json b/media/test_flows/legacy/migrations/migrate_to_11_11.json new file mode 100644 index 00000000000..f9ca3c4ca58 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_11.json @@ -0,0 +1,107 @@ +{ + "version": "11.10", + "site": "https://textit.in", + "flows": [ + { + "entry": "22505d46-43c5-42ba-975e-725c01ea440f", + "action_sets": [ + { + "uuid": "22505d46-43c5-42ba-975e-725c01ea440f", + "x": 100, + "y": 0, + "destination": "f3a1a671-5f5b-489e-9410-9a09fa5eaafb", + "actions": [ + { + "type": "reply", + "uuid": "27dfd8ac-55c5-49c9-88e3-3fb84a9894ff", + "msg": { + "eng": "Hey" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "6e2b09ec-3cc0-4ee6-ae7b-b76bad3ab6d3" + }, + { + "uuid": "f3a1a671-5f5b-489e-9410-9a09fa5eaafb", + "x": 95, + "y": 101, + "destination": "78c20ee4-94bd-45e6-8510-8e602568fb6e", + "actions": [ + { + "type": "add_label", + "uuid": "bc82c11d-7654-44e4-966c-fb39e2851df0", + "labels": [ + { + "uuid": "0bfecd01-9612-48ab-8c49-72170de6ee49", + "name": "Hello" + } + ] + } + ], + "exit_uuid": "84bf44a1-13fd-44cb-8014-d6feb06e010f" + }, + { + "uuid": "7ca2b0ef-0b23-4c6e-bccb-c5f2d62d2663", + "x": 146, + "y": 358, + "destination": null, + "actions": [ + { + "type": "add_label", + "uuid": "910bf3b5-951f-47a8-93df-11a6eac8bf0f", + "labels": [ + { + "uuid": "0bfecd01-9612-48ab-8c49-72170de6ee49", + "name": "Hello" + } + ] + } + ], + "exit_uuid": "6d579c28-9f3f-4584-bd2e-74009612fdbb" + } + ], + "rule_sets": [ + { + "uuid": "78c20ee4-94bd-45e6-8510-8e602568fb6e", + "x": 85, + "y": 219, + "label": "Response 1", + "rules": [ + { + "uuid": "33438bbf-49bd-4468-9a74-bbd7e1f58f57", + "category": { + "eng": "All Responses" + }, + "destination": "7ca2b0ef-0b23-4c6e-bccb-c5f2d62d2663", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "", + "operand": "@step.value", + "config": {} + } + ], + "base_language": "eng", + "flow_type": "M", + "version": "11.10", + "metadata": { + "name": "Add Label", + "saved_on": "2019-02-12T09:23:05.746930Z", + "revision": 7, + "uuid": "e9b5b8ba-43f4-4bc2-a790-811ee1cfe392", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_12.json b/media/test_flows/legacy/migrations/migrate_to_11_12.json new file mode 100644 index 00000000000..c4aec731cad --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_12.json @@ -0,0 +1,197 @@ +{ + "version": "11.12", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "456b7f83-a96b-4f17-aa0a-116a30ee0d52", + "action_sets": [ + { + "uuid": "456b7f83-a96b-4f17-aa0a-116a30ee0d52", + "x": 100, + "y": 0, + "destination": "cfea15b5-3761-41d0-ad3e-33df7a9b835a", + "actions": [ + { + "type": "channel", + "uuid": "338300e8-b433-4372-8a12-87a0f543ee8a", + "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", + "name": "Android: 1234" + } + ], + "exit_uuid": "6fb525e7-bc24-4358-acde-f2d712b28f2b" + }, + { + "uuid": "cfea15b5-3761-41d0-ad3e-33df7a9b835a", + "x": 114, + "y": 156, + "destination": "3bb1fb6d-f0a3-4ec7-abba-cc5fac4c6a9d", + "actions": [ + { + "type": "reply", + "uuid": "bbdd28f0-824f-41b4-af25-5d6f9a4afefb", + "msg": { + "base": "Hey there, Yes or No?" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "902db0bc-f6a7-45d2-93b2-f47f3af1261e" + }, + { + "uuid": "af882e66-9ae2-4bc1-9af7-c8c2e7373766", + "x": 181, + "y": 452, + "destination": "85d88c16-fafe-4b8e-8e58-a6dc6e1e0e77", + "actions": [ + { + "type": "channel", + "uuid": "437d71a2-bb17-4e71-bef7-ad6b58f0eb85", + "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", + "name": "Android: 1234" + } + ], + "exit_uuid": "cec84721-7f8f-43c3-9af2-4d5d6a15f9de" + }, + { + "uuid": "76e091fe-62a5-4786-9465-7c1fb2446694", + "x": 460, + "y": 117, + "destination": "ef9afd2d-d106-4168-a104-20ddc14f9444", + "actions": [ + { + "type": "reply", + "uuid": "f7d12748-440e-4ef1-97d4-8a9efddf4454", + "msg": { + "base": "Yo, What? Repeat Yes or No" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "f5ce0ce5-8023-4b8d-b635-762a2c18726f" + }, + { + "uuid": "9eef8677-8598-4e87-9e21-3ad245d87aee", + "x": 193, + "y": 633, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "1d3ec932-6b6f-45c2-b4d6-9a0e07721686", + "msg": { + "base": "Bye" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "839dd7c4-64b9-428f-b1d0-c386f493fc4f" + }, + { + "uuid": "85d88c16-fafe-4b8e-8e58-a6dc6e1e0e77", + "x": 173, + "y": 550, + "destination": "9eef8677-8598-4e87-9e21-3ad245d87aee", + "actions": [ + { + "type": "channel", + "uuid": "0afa546d-8308-41c2-a70c-979846108bec", + "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", + "name": "Android: 1234" + } + ], + "exit_uuid": "835a5ca9-d518-452f-865c-ca8e5cde4777" + }, + { + "uuid": "ef9afd2d-d106-4168-a104-20ddc14f9444", + "x": 501, + "y": 242, + "destination": "3bb1fb6d-f0a3-4ec7-abba-cc5fac4c6a9d", + "actions": [ + { + "type": "channel", + "uuid": "28d63382-40ea-4741-ba3a-2930348fab0e", + "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", + "name": "Android: 1234" + } + ], + "exit_uuid": "be8ca9a5-0f61-4c9d-93e4-02aa6bb27afc" + } + ], + "rule_sets": [ + { + "uuid": "3bb1fb6d-f0a3-4ec7-abba-cc5fac4c6a9d", + "x": 134, + "y": 315, + "label": "Response 1", + "rules": [ + { + "uuid": "2924a1d0-be47-4f8e-aefb-f7ff3a563a43", + "category": { + "base": "Yes" + }, + "destination": "af882e66-9ae2-4bc1-9af7-c8c2e7373766", + "destination_type": "A", + "test": { + "type": "contains_any", + "test": { + "base": "Yes" + } + }, + "label": null + }, + { + "uuid": "0107f9e4-b46c-40d7-b25b-058cac3a167e", + "category": { + "base": "No" + }, + "destination": "af882e66-9ae2-4bc1-9af7-c8c2e7373766", + "destination_type": "A", + "test": { + "type": "contains_any", + "test": { + "base": "No" + } + }, + "label": null + }, + { + "uuid": "ad81cc6d-1973-4eed-b97d-6edd9ebdeedc", + "category": { + "base": "Other" + }, + "destination": "76e091fe-62a5-4786-9465-7c1fb2446694", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "", + "operand": "@step.value", + "config": {} + } + ], + "base_language": "base", + "flow_type": "M", + "version": "11.12", + "metadata": { + "name": "channels", + "saved_on": "2019-02-26T21:16:32.055957Z", + "revision": 24, + "uuid": "e5fdf453-428f-4da1-9703-0decdf7cf6f9", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_12_one_node.json b/media/test_flows/legacy/migrations/migrate_to_11_12_one_node.json new file mode 100644 index 00000000000..3f4585c1277 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_12_one_node.json @@ -0,0 +1,38 @@ +{ + "version": "11.11", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "b0b6559d-e5bd-4deb-a4ab-9e5f04001dd4", + "action_sets": [ + { + "uuid": "b0b6559d-e5bd-4deb-a4ab-9e5f04001dd4", + "x": 100, + "y": 0, + "actions": [ + { + "type": "channel", + "uuid": "4b34b85d-da31-40c9-af65-6d76ca54b1b5", + "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", + "name": "Android: 1234" + } + ], + "exit_uuid": "be37f250-f992-45e0-97fd-a3c0f57584dc" + } + ], + "rule_sets": [], + "base_language": "base", + "flow_type": "M", + "version": "11.11", + "metadata": { + "name": "channel", + "saved_on": "2019-02-28T08:55:17.275670Z", + "revision": 2, + "uuid": "8a8612bc-ff3a-45ea-b7a5-2673ce901cd9", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_12_other_org.json b/media/test_flows/legacy/migrations/migrate_to_11_12_other_org.json new file mode 100644 index 00000000000..14b2cdbd297 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_12_other_org.json @@ -0,0 +1,39 @@ +{ + "version": "11.11", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "a1c00b3e-a904-4085-851d-e5e386d728b8", + "action_sets": [ + { + "uuid": "a1c00b3e-a904-4085-851d-e5e386d728b8", + "x": 124, + "y": 16, + "actions": [ + { + "type": "channel", + "channel": "CHANNEL-UUID", + "uuid": "84889e4d-e7e8-4415-9ad9-db27d9972558", + "name": "Not Ours" + } + ], + "exit_uuid": "eada09b7-7136-4f24-a34f-62ca7b404423" + } + ], + "rule_sets": [], + "base_language": "eng", + "flow_type": "M", + "version": "11.11", + "metadata": { + "name": "Other Org Channel", + "saved_on": "2019-02-25T20:36:14.155001Z", + "revision": 19, + "uuid": "bb8ca54b-7dcb-431f-bd86-ec3082b63469", + "expires": 43200, + "ivr_retry_failed_events": null, + "notes": [] + }, + "type": "M" + } + ] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_3.json b/media/test_flows/legacy/migrations/migrate_to_11_3.json new file mode 100644 index 00000000000..d8271973ddc --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_3.json @@ -0,0 +1,84 @@ +{ + "version": "11.2", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", + "action_sets": [ + { + "uuid": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", + "x": 412, + "y": 814, + "destination": null, + "actions": [ + { + "type": "api", + "uuid": "9b46779a-f680-450f-8f3c-005f3b7efccd", + "webhook": "http://example.com/?thing=@flow.response_1&foo=bar", + "action": "POST", + "webhook_headers": [] + } + ], + "exit_uuid": "25d8d2ae-ea82-4214-9561-42e0bf420a93" + } + ], + "rule_sets": [ + { + "uuid": "2831f7ad-23e6-4ab3-91d9-936f14fcf35e", + "x": 100, + "y": 0, + "label": "Response 1", + "rules": [ + { + "uuid": "c799def9-345b-46f9-a838-a59191cdb181", + "category": { + "eng": "Success" + }, + "destination": "7e0afb0a-8ca2-479f-8f72-49f8c1081d60", + "destination_type": "R", + "test": { + "type": "webhook_status", + "status": "success" + }, + "label": null + }, + { + "uuid": "1ace9344-3053-4dc2-aced-9a6e3c8a6e9d", + "category": { + "eng": "Failure" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "webhook_status", + "status": "failure" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "webhook", + "response_type": "", + "operand": "@step.value", + "config": { + "webhook": "http://example.com/webhook1", + "webhook_action": "POST", + "webhook_headers": [] + } + } + ], + "base_language": "eng", + "flow_type": "M", + "version": "11.2", + "metadata": { + "name": "Migrate to 11.3 Test", + "saved_on": "2018-09-25T14:57:23.429081Z", + "revision": 97, + "uuid": "915144c5-605e-46f3-afa3-53aae2c9b8ee", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_4.json b/media/test_flows/legacy/migrations/migrate_to_11_4.json new file mode 100644 index 00000000000..6ca69cddacc --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_4.json @@ -0,0 +1,168 @@ +{ + "version": "11.3", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "019d0fab-eb51-4431-9f51-ddf207d0a744", + "action_sets": [ + { + "uuid": "92fb739f-4a99-4e29-8078-1f8fb06d127e", + "x": 241, + "y": 425, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "0382e5aa-bfda-42c8-84d3-7893aba002f8", + "msg": { + "eng": "@flow.response_1.text\n@flow.response_2.text\n@flow.response_3.text\n@flow.response_3\n@(CONCATENATE(flow.response_2.text, \"blerg\"))" + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "send", + "uuid": "b5860896-db39-4ebb-b842-d38edf46fb61", + "msg": { + "eng": "@flow.response_1.text\n@flow.response_2.text\n@flow.response_3.text\n@flow.response_3\n@(CONCATENATE(flow.response_2.text, \"blerg\"))" + }, + "contacts": [ + { + "id": 277738, + "name": "05fe51bf5a434b9", + "uuid": "74eed75b-dd4f-4d24-9fc5-474052dbc086", + "urns": [ + { + "scheme": "tel", + "path": "+2353265262", + "priority": 90 + } + ] + } + ], + "groups": [], + "variables": [], + "media": {} + }, + { + "type": "email", + "uuid": "c9130ab6-d2b2-419c-8109-65b5afc47039", + "emails": [ + "test@test.com" + ], + "subject": "Testing", + "msg": "@flow.response_1.text\n@flow.response_2.text\n@flow.response_3.text\n@flow.response_3\n@(CONCATENATE(flow.response_2.text, \"blerg\"))" + } + ], + "exit_uuid": "ea5640be-105b-4277-b04e-7ad55d2c898e" + } + ], + "rule_sets": [ + { + "uuid": "019d0fab-eb51-4431-9f51-ddf207d0a744", + "x": 226, + "y": 118, + "label": "Response 1", + "rules": [ + { + "uuid": "7fd3aae5-66ca-4d8d-9923-3ef4424e7658", + "category": { + "eng": "All Responses" + }, + "destination": "fc1b062c-52c0-4c9e-87bd-1f9437d513bf", + "destination_type": "R", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "", + "operand": "@step.value", + "config": {} + }, + { + "uuid": "fc1b062c-52c0-4c9e-87bd-1f9437d513bf", + "x": 226, + "y": 232, + "label": "Response 2", + "rules": [ + { + "uuid": "58a4e6f6-fe44-4ac9-bf98-edffd6dfad04", + "category": { + "eng": "All Responses" + }, + "destination": "518b6f12-0192-4a75-8900-43a5dea02340", + "destination_type": "R", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "expression", + "response_type": "", + "operand": "@contact.uuid", + "config": {} + }, + { + "uuid": "518b6f12-0192-4a75-8900-43a5dea02340", + "x": 226, + "y": 335, + "label": "Response 3", + "rules": [ + { + "uuid": "0d1b5fd9-bfee-4df6-9837-9883787f0661", + "category": { + "eng": "Bucket 1" + }, + "destination": "92fb739f-4a99-4e29-8078-1f8fb06d127e", + "destination_type": "A", + "test": { + "type": "between", + "min": "0", + "max": "0.5" + }, + "label": null + }, + { + "uuid": "561b7ce2-5975-4925-a76a-f4a618b11c8b", + "category": { + "eng": "Bucket 2" + }, + "destination": "92fb739f-4a99-4e29-8078-1f8fb06d127e", + "destination_type": "A", + "test": { + "type": "between", + "min": "0.5", + "max": "1" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "random", + "response_type": "", + "operand": "@(RAND())", + "config": {} + } + ], + "base_language": "eng", + "flow_type": "F", + "version": "11.3", + "metadata": { + "name": "Migrate to 11.4", + "saved_on": "2018-06-25T21:58:04.000768Z", + "revision": 123, + "uuid": "025f1d6e-ec87-4045-8471-0a028b9483aa", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_5.json b/media/test_flows/legacy/migrations/migrate_to_11_5.json new file mode 100644 index 00000000000..86c2ee6af78 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_5.json @@ -0,0 +1,398 @@ +{ + "version": "11.4", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "2831f7ad-23e6-4ab3-91d9-936f14fcf35e", + "action_sets": [ + { + "uuid": "35707236-5dd6-487d-bea4-6a73822852bf", + "x": 122, + "y": 458, + "destination": "51956031-9f42-475f-9d43-3ab2f87f4dd2", + "actions": [ + { + "type": "reply", + "uuid": "c82df796-9d8f-4e9b-b76c-97027fa74ef7", + "msg": { + "eng": "@flow.response_1\n@flow.response_1.value\n@flow.response_1.category\n@(upper(flow.response_1))\n@(upper(flow.response_1.category))\n\n@flow.response_2\n@flow.response_2.value\n@flow.response_2.category\n@(upper(flow.response_2))\n@(upper(flow.response_2.category))\n\n@flow.response_3\n@flow.response_3.value\n@flow.response_3.category\n@(upper(flow.response_3))\n@(upper(flow.response_3.category))" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "65af1dca-b48e-4b36-867c-2ace47038093" + }, + { + "uuid": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", + "x": 412, + "y": 814, + "destination": null, + "actions": [ + { + "type": "api", + "uuid": "9b46779a-f680-450f-8f3c-005f3b7efccd", + "webhook": "http://example.com/?thing=@flow.response_1&foo=bar", + "action": "GET", + "webhook_headers": [] + }, + { + "type": "save", + "uuid": "e0ecf2a5-0429-45ec-a9d7-e2c122274484", + "label": "Contact Name", + "field": "name", + "value": "@flow.response_3.value" + } + ], + "exit_uuid": "25d8d2ae-ea82-4214-9561-42e0bf420a93" + } + ], + "rule_sets": [ + { + "uuid": "2831f7ad-23e6-4ab3-91d9-936f14fcf35e", + "x": 100, + "y": 0, + "label": "Response 1", + "rules": [ + { + "uuid": "c799def9-345b-46f9-a838-a59191cdb181", + "category": { + "eng": "Success" + }, + "destination": "7e0afb0a-8ca2-479f-8f72-49f8c1081d60", + "destination_type": "R", + "test": { + "type": "webhook_status", + "status": "success" + }, + "label": null + }, + { + "uuid": "1ace9344-3053-4dc2-aced-9a6e3c8a6e9d", + "category": { + "eng": "Failure" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "webhook_status", + "status": "failure" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "webhook", + "response_type": "", + "operand": "@step.value", + "config": { + "webhook": "http://example.com/webhook1", + "webhook_action": "GET", + "webhook_headers": [] + } + }, + { + "uuid": "7e0afb0a-8ca2-479f-8f72-49f8c1081d60", + "x": 103, + "y": 125, + "label": "Response 2", + "rules": [ + { + "uuid": "ce50f51d-f052-4ff1-8a9b-a79faa62dfc2", + "category": { + "eng": "Success" + }, + "destination": "5906c8f3-46f2-4319-8743-44fb26f2b109", + "destination_type": "R", + "test": { + "type": "webhook_status", + "status": "success" + }, + "label": null + }, + { + "uuid": "338e6c08-3597-4d22-beef-80d27b870a93", + "category": { + "eng": "Failure" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "webhook_status", + "status": "failure" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "webhook", + "response_type": "", + "operand": "@step.value", + "config": { + "webhook": "http://example.com/webhook2", + "webhook_action": "GET", + "webhook_headers": [] + } + }, + { + "uuid": "5906c8f3-46f2-4319-8743-44fb26f2b109", + "x": 105, + "y": 243, + "label": "Response 2", + "rules": [ + { + "uuid": "6328e346-49c6-4607-a573-e8dc6e60bfcd", + "category": { + "eng": "All Responses" + }, + "destination": "728a9a97-f28e-4fb3-a96a-7a7a8d5e5a4c", + "destination_type": "R", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "expression", + "response_type": "", + "operand": "@step.value", + "config": {} + }, + { + "uuid": "728a9a97-f28e-4fb3-a96a-7a7a8d5e5a4c", + "x": 112, + "y": 346, + "label": "Response 3", + "rules": [ + { + "uuid": "fb64dd04-8dd3-4e28-8607-468d1748a81f", + "category": { + "eng": "Success" + }, + "destination": "35707236-5dd6-487d-bea4-6a73822852bf", + "destination_type": "A", + "test": { + "type": "webhook_status", + "status": "success" + }, + "label": null + }, + { + "uuid": "992c7429-221a-40f0-80be-fd6fbe858f57", + "category": { + "eng": "Failure" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "webhook_status", + "status": "failure" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "resthook", + "response_type": "", + "operand": "@step.value", + "config": { + "resthook": "test-resthook-event" + } + }, + { + "uuid": "51956031-9f42-475f-9d43-3ab2f87f4dd2", + "x": 411, + "y": 513, + "label": "Response 5", + "rules": [ + { + "uuid": "c06fb4fe-09a0-4990-b32e-e233de7edfda", + "category": { + "eng": "All Responses" + }, + "destination": "f39a6d73-57d9-4d10-9055-57446addc87a", + "destination_type": "R", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "expression", + "response_type": "", + "operand": "@(flow.response_1 & flow.response_2 & flow.response_3)", + "config": {} + }, + { + "uuid": "f39a6d73-57d9-4d10-9055-57446addc87a", + "x": 414, + "y": 625, + "label": "Response 6", + "rules": [ + { + "uuid": "820f0020-0c72-44cd-9c12-a2b05c13e470", + "category": { + "eng": "Yes" + }, + "destination": "0e0c0e1f-e4ae-4531-ba19-48300de0f86d", + "destination_type": "R", + "test": { + "type": "contains_any", + "test": { + "eng": "yes" + } + }, + "label": null + }, + { + "uuid": "8e55e70f-acf0-45a2-b7f9-2f95ccbbfc4d", + "category": { + "eng": "Matching" + }, + "destination": "0e0c0e1f-e4ae-4531-ba19-48300de0f86d", + "destination_type": "R", + "test": { + "type": "contains_any", + "test": { + "eng": "@flow.response_1" + } + }, + "label": null + }, + { + "uuid": "d1c61a49-64f5-4ff6-b17f-1f22472f829f", + "category": { + "eng": "Other" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "flow_field", + "response_type": "", + "operand": "@flow.response_1", + "config": {} + }, + { + "uuid": "0e0c0e1f-e4ae-4531-ba19-48300de0f86d", + "x": 489, + "y": 722, + "label": "Response 7", + "rules": [ + { + "uuid": "234fff68-780f-442f-a1c6-757131fbc213", + "category": { + "eng": "Success" + }, + "destination": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", + "destination_type": "A", + "test": { + "type": "webhook_status", + "status": "success" + }, + "label": null + }, + { + "uuid": "70b79516-40a5-439c-9dee-45b242d6bb8b", + "category": { + "eng": "Failure" + }, + "destination": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", + "destination_type": "A", + "test": { + "type": "webhook_status", + "status": "failure" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "webhook", + "response_type": "", + "operand": "@step.value", + "config": { + "webhook": "http://example.com/?thing=@flow.response_1.value", + "webhook_action": "GET", + "webhook_headers": [] + } + } + ], + "base_language": "eng", + "flow_type": "M", + "version": "11.4", + "metadata": { + "name": "Migrate to 11.5 Test", + "saved_on": "2018-09-25T14:57:23.429081Z", + "revision": 97, + "uuid": "915144c5-605e-46f3-afa3-53aae2c9b8ee", + "expires": 10080, + "notes": [ + { + "x": 357, + "y": 0, + "title": "New Note", + "body": "@flow.response_1" + }, + { + "x": 358, + "y": 117, + "title": "New Note", + "body": "flow.response_2" + }, + { + "x": 358, + "y": 236, + "title": "New Note", + "body": "reuses flow.response_2" + }, + { + "x": 360, + "y": 346, + "title": "New Note", + "body": "@flow.response_3" + }, + { + "x": 671, + "y": 498, + "title": "New Note", + "body": "operand should be migrated too" + }, + { + "x": 717, + "y": 608, + "title": "New Note", + "body": "rule test should be migrated" + }, + { + "x": 747, + "y": 712, + "title": "New Note", + "body": "webhook URL in config should be migrated" + }, + { + "x": 681, + "y": 830, + "title": "New Note", + "body": "webhook URL on action should be migrated" + }, + { + "x": 682, + "y": 934, + "title": "New Note", + "body": "field value should be migrated" + } + ] + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_6.json b/media/test_flows/legacy/migrations/migrate_to_11_6.json new file mode 100644 index 00000000000..97898acd159 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_6.json @@ -0,0 +1,252 @@ +{ + "version": "11.5", + "site": "https://textit.in", + "flows": [ + { + "entry": "c4462613-5936-42cc-a286-82e5f1816793", + "action_sets": [ + { + "uuid": "eca0f1d7-59ef-4a7c-a4a9-9bbd049eb144", + "x": 76, + "y": 99, + "destination": "d21be990-5e48-4e4b-995f-c9df8f38e517", + "actions": [ + { + "type": "add_group", + "uuid": "feb7a33e-bc8b-44d8-9112-bc4e910fe304", + "groups": [ + { + "uuid": "1966e54a-fc30-4a96-81ea-9b0185b8b7de", + "name": "Cat Fanciers" + } + ] + }, + { + "type": "add_group", + "uuid": "ca82f0e0-43ca-426c-a77c-93cf297b8e7c", + "groups": [ + { + "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", + "name": "Catnado" + } + ] + }, + { + "type": "reply", + "uuid": "d57e9e9f-ada4-4a22-99ef-b8bf3dbcdcae", + "msg": { + "eng": "You are a cat fan! Purrrrr." + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "55f88a1e-73ad-4b6d-9a04-626046bbe5a8" + }, + { + "uuid": "ef389049-d2e3-4343-b91f-13ea2db5f943", + "x": 558, + "y": 94, + "destination": "d21be990-5e48-4e4b-995f-c9df8f38e517", + "actions": [ + { + "type": "del_group", + "uuid": "cea907a8-af81-49af-92e6-f246e52179fe", + "groups": [ + { + "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", + "name": "Catnado" + } + ] + }, + { + "type": "reply", + "uuid": "394a328f-f829-43f2-9975-fe2f27c8b786", + "msg": { + "eng": "You are not a cat fan. Hissssss." + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "9ba78afa-948e-44c5-992f-84030f2eaa6b" + }, + { + "uuid": "d21be990-5e48-4e4b-995f-c9df8f38e517", + "x": 319, + "y": 323, + "destination": "35416fea-787d-48c1-b839-76eca089ad2e", + "actions": [ + { + "type": "channel", + "uuid": "78c58574-9f91-4c27-855e-73eacc99c395", + "channel": "bd55bb31-8ed4-4f89-b903-7103aa3762be", + "name": "Telegram: TextItBot" + } + ], + "exit_uuid": "c86638a9-2688-47c9-83ec-7f10ef49de1e" + }, + { + "uuid": "35416fea-787d-48c1-b839-76eca089ad2e", + "x": 319, + "y": 468, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "30d35b8f-f439-482a-91b1-d3b1a4351071", + "msg": { + "eng": "All done." + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "send", + "uuid": "a7b6def8-d315-49bd-82e4-85887f39babe", + "msg": { + "eng": "Hey Cat Fans!" + }, + "contacts": [], + "groups": [ + { + "uuid": "47b1b36c-7736-47b9-b63a-c0ebfb610e61", + "name": "Cat Blasts" + } + ], + "variables": [], + "media": {} + }, + { + "type": "trigger-flow", + "uuid": "540965e5-bdfe-4416-b4dd-449220b1c588", + "flow": { + "uuid": "ef9603ff-3886-4e5e-8870-0f643b6098de", + "name": "Cataclysmic" + }, + "contacts": [], + "groups": [ + { + "uuid": "22a48356-71e9-4ae1-9f93-4021855c0bd5", + "name": "Cat Alerts" + } + ], + "variables": [] + } + ], + "exit_uuid": "f2ef5066-434d-42bc-a5cb-29c59e51432f" + } + ], + "rule_sets": [ + { + "uuid": "c4462613-5936-42cc-a286-82e5f1816793", + "x": 294, + "y": 0, + "label": "Response 1", + "rules": [ + { + "uuid": "17d69564-60c9-4a56-be8b-34e98a2ce14a", + "category": { + "eng": "Cat Facts" + }, + "destination": "eca0f1d7-59ef-4a7c-a4a9-9bbd049eb144", + "destination_type": "A", + "test": { + "type": "in_group", + "test": { + "name": "Cat Facts", + "uuid": "c7bc1eef-b7aa-4959-ab90-3e33e0d3b1f9" + } + }, + "label": null + }, + { + "uuid": "a9ec4d0a-2ddd-4a13-a1d2-c63ce9916a04", + "category": { + "eng": "Other" + }, + "destination": "ef389049-d2e3-4343-b91f-13ea2db5f943", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "group", + "response_type": "", + "operand": "@step.value", + "config": {} + } + ], + "base_language": "eng", + "flow_type": "M", + "version": "11.5", + "metadata": { + "name": "Cataclysmic", + "saved_on": "2018-10-18T17:03:54.835916Z", + "revision": 49, + "uuid": "ef9603ff-3886-4e5e-8870-0f643b6098de", + "expires": 10080, + "notes": [] + } + }, + { + "entry": "0429d1f9-82ed-4198-80a2-3b213aa11fd5", + "action_sets": [ + { + "uuid": "0429d1f9-82ed-4198-80a2-3b213aa11fd5", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "type": "add_group", + "uuid": "11f61fc6-834e-4cbc-88ee-c834279345e6", + "groups": [ + { + "uuid": "22a48356-71e9-4ae1-9f93-4021855c0bd5", + "name": "Cat Alerts" + }, + { + "uuid": "c7bc1eef-b7aa-4959-ab90-3e33e0d3b1f9", + "name": "Cat Facts" + }, + { + "uuid": "47b1b36c-7736-47b9-b63a-c0ebfb610e61", + "name": "Cat Blasts" + }, + { + "uuid": "1966e54a-fc30-4a96-81ea-9b0185b8b7de", + "name": "Cat Fanciers" + }, + { + "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", + "name": "Catnado" + } + ] + } + ], + "exit_uuid": "029a7c9d-c935-4ed1-9573-543ded29d954" + } + ], + "rule_sets": [], + "base_language": "eng", + "flow_type": "M", + "version": "11.5", + "metadata": { + "name": "Catastrophe", + "saved_on": "2018-10-18T19:03:07.702388Z", + "revision": 1, + "uuid": "d6dd96b1-d500-4c7a-9f9c-eae3f2a2a7c5", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_7.json b/media/test_flows/legacy/migrations/migrate_to_11_7.json new file mode 100644 index 00000000000..108cbf2c376 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_7.json @@ -0,0 +1,246 @@ +{ + "version": "11.6", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "eb59aed8-2eeb-43cd-adfc-9c44721436a2", + "action_sets": [ + { + "uuid": "eb59aed8-2eeb-43cd-adfc-9c44721436a2", + "x": 102, + "y": 0, + "destination": "cd2d8a3e-c267-40ef-8481-37d4076a57d3", + "actions": [ + { + "type": "api", + "uuid": "82d23a8c-af4b-4a33-8d56-03139b1168cc", + "webhook": "http://example.com/hook1", + "action": "GET", + "webhook_headers": [ + { + "name": "Header1", + "value": "Value1" + } + ] + } + ], + "exit_uuid": "787517ce-9a6d-479e-bc81-c3f4dcbb3d1d" + }, + { + "uuid": "cd2d8a3e-c267-40ef-8481-37d4076a57d3", + "x": 149, + "y": 107, + "destination": "efe05d14-7a96-4ec5-870c-5183408821ae", + "actions": [ + { + "type": "reply", + "uuid": "544fd45b-f9a9-4543-b352-06b67dc0c32c", + "msg": { + "eng": "Action before 1" + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "reply", + "uuid": "252b59b0-3664-4a36-8b9f-9317e78011da", + "msg": { + "eng": "Action before 2" + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "api", + "uuid": "55c868c0-f6f7-49a8-856c-809bd082ae3b", + "webhook": "http://example.com/hook2", + "action": "POST", + "webhook_headers": [] + }, + { + "type": "reply", + "uuid": "f7ec546c-9adf-4d51-ab8e-8a1cbde8d910", + "msg": { + "eng": "Action after 1" + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "reply", + "uuid": "a44ec0b8-085d-4e80-b361-7529e659e5e6", + "msg": { + "eng": "Action after 2" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "32c5dba9-17d1-4d5d-a992-19c1ec6cf825" + }, + { + "uuid": "efe05d14-7a96-4ec5-870c-5183408821ae", + "x": 199, + "y": 446, + "destination": "b5ea564c-4acd-4ce4-aeff-37e5c73047e7", + "actions": [ + { + "type": "api", + "uuid": "05377f3c-d9b0-428d-ae14-219d2f3d0f9a", + "webhook": "http://example.com/hook3", + "action": "GET", + "webhook_headers": [] + }, + { + "type": "api", + "uuid": "61fadf6d-d2ba-4bbb-b312-1db3e336a661", + "webhook": "http://example.com/hook4", + "action": "GET", + "webhook_headers": [] + } + ], + "exit_uuid": "c2236afe-c3cb-43a5-9fa0-ee6cbfb92f42" + }, + { + "uuid": "b5ea564c-4acd-4ce4-aeff-37e5c73047e7", + "x": 245, + "y": 608, + "destination": "64d8b8a5-aca0-4406-b417-5827262e67e2", + "actions": [ + { + "type": "reply", + "uuid": "be4dbed8-7334-4700-a94d-50275015c048", + "msg": { + "eng": "Actionset without webhook" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "40b890ab-8fab-459f-8d5e-48d2ea57f7ce" + }, + { + "uuid": "d6da8268-0c61-4154-8659-dd073878541c", + "x": 1036, + "y": 265, + "destination": null, + "actions": [ + { + "type": "api", + "uuid": "b8a8715b-0fb5-4dde-a1fe-4fef045bb16c", + "webhook": "http://example.com/hook5", + "action": "GET", + "webhook_headers": [] + } + ], + "exit_uuid": "15170baf-8b15-4104-990c-13635f0bafbb" + } + ], + "rule_sets": [ + { + "uuid": "64d8b8a5-aca0-4406-b417-5827262e67e2", + "x": 673, + "y": 54, + "label": "Response 1", + "rules": [ + { + "uuid": "4bc64a60-b848-4f07-bbe8-8b82e72b6dea", + "category": { + "eng": "1" + }, + "destination": "eb59aed8-2eeb-43cd-adfc-9c44721436a2", + "destination_type": "A", + "test": { + "type": "contains_any", + "test": { + "eng": "1" + } + }, + "label": null + }, + { + "uuid": "2faff885-6ac4-4cef-bd11-53802be22508", + "category": { + "eng": "2" + }, + "destination": "cd2d8a3e-c267-40ef-8481-37d4076a57d3", + "destination_type": "A", + "test": { + "type": "contains_any", + "test": { + "eng": "2" + } + }, + "label": null + }, + { + "uuid": "05efb767-1319-4f93-ba3f-8d3860a915af", + "category": { + "eng": "3" + }, + "destination": "efe05d14-7a96-4ec5-870c-5183408821ae", + "destination_type": "A", + "test": { + "type": "contains_any", + "test": { + "eng": "3" + } + }, + "label": null + }, + { + "uuid": "2bfbb15e-fb54-41a5-ba43-c67c219e8c57", + "category": { + "eng": "4" + }, + "destination": "b5ea564c-4acd-4ce4-aeff-37e5c73047e7", + "destination_type": "A", + "test": { + "type": "contains_any", + "test": { + "eng": "4" + } + }, + "label": null + }, + { + "uuid": "d091ea29-07b9-48b8-bc52-1de00687af1b", + "category": { + "eng": "Other" + }, + "destination": "d6da8268-0c61-4154-8659-dd073878541c", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "", + "operand": "@step.value", + "config": {} + } + ], + "base_language": "eng", + "flow_type": "M", + "version": "11.6", + "metadata": { + "name": "Webhook Action Migration", + "saved_on": "2018-11-05T19:21:37.062932Z", + "revision": 61, + "uuid": "c9b9d79a-93b4-41e5-8ca3-f0b09faa2457", + "expires": 10080, + "notes": [] + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_8.json b/media/test_flows/legacy/migrations/migrate_to_11_8.json new file mode 100644 index 00000000000..db0f0f372c4 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_8.json @@ -0,0 +1,341 @@ +{ + "version": 11.7, + "site": null, + "flows": [ + { + "entry": "fde99613-a3e9-4f97-9e88-81ebc0ea6211", + "action_sets": [ + { + "uuid": "788064a1-fe23-4f6e-8041-200412dff55e", + "x": 389, + "y": 991, + "destination": "d8be5901-e847-4b6f-a603-51eb571718a1", + "actions": [ + { + "type": "reply", + "uuid": "fdee102d-5259-4153-8e43-0b7df1d3a1ee", + "msg": { + "base": "Thanks @extra.name, we'll be in touch ASAP about order # @extra.order." + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "email", + "uuid": "66c4a60f-3d63-4eed-bd03-c801baa0d793", + "emails": [ + "rowanseymour@gmail.com" + ], + "subject": "Order Comment: @flow.lookup: @extra.order", + "msg": "Customer @extra.name has a problem with their order @extra.order for @extra.description. Please look into it ASAP and call them back with the status.\n \nCustomer Comment: \"@flow.comment\"\nCustomer Name: @extra.name\nCustomer Phone: @contact.tel " + } + ], + "exit_uuid": "b193a69a-d5d9-423a-9f1f-0ad51847a075" + }, + { + "uuid": "1bdc3242-ef13-4c1b-a3b1-11554bffff7a", + "x": 612, + "y": 574, + "destination": "691e8175-f6a1-45b3-b377-c8bda223e52b", + "actions": [ + { + "type": "reply", + "uuid": "fc90459d-243c-4207-a26b-258e2c42cff3", + "msg": { + "base": "Uh oh @extra.name! Our record indicate that your order for @extra.description was cancelled on @extra.cancel_date. If you think this is in error, please reply with a comment and our orders department will get right on it!" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "7e943c3d-b560-436f-bd7e-5c52e9162254" + }, + { + "uuid": "601c7150-7a3e-40aa-8f79-92f936e17cf9", + "x": 389, + "y": 572, + "destination": "691e8175-f6a1-45b3-b377-c8bda223e52b", + "actions": [ + { + "type": "reply", + "uuid": "459ed2db-9921-4326-87a1-5157e0a9b38a", + "msg": { + "base": "Hi @extra.name. Hope you are patient because we haven't shipped your order for @extra.description yet. We expect to ship it by @extra.ship_date though. If you have any questions, just reply and our customer service department will be notified." + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "5747ab91-d20c-4fff-8246-9d29a6ef1511" + }, + { + "uuid": "f87e2df4-5cbb-4961-b3c9-41eed35f8dbe", + "x": 167, + "y": 572, + "destination": "691e8175-f6a1-45b3-b377-c8bda223e52b", + "actions": [ + { + "type": "reply", + "uuid": "661ac1e4-2f13-48b1-adcf-0ff151833a86", + "msg": { + "base": "Great news @extra.name! We shipped your order for @extra.description on @extra.ship_date and we expect it will be delivered on @extra.delivery_date. If you have any questions, just reply and our customer service department will be notified." + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "aee36df6-a421-43b9-be55-a4a298c35f86" + }, + { + "uuid": "81c3ff98-3552-4962-ab05-8f7948ebac24", + "x": 787, + "y": 99, + "destination": "659f67c6-cf6d-4d43-bd64-a50318fd5168", + "actions": [ + { + "type": "reply", + "uuid": "7645e8cd-34a1-44d0-8b11-7f4f06bd5ac7", + "msg": { + "base": "Sorry that doesn't look like a valid order number. Maybe try: CU001, CU002 or CU003?" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "b6e7b7f2-88e5-4457-ba7b-6edb9fb81d9f" + }, + { + "uuid": "fde99613-a3e9-4f97-9e88-81ebc0ea6211", + "x": 409, + "y": 0, + "destination": "659f67c6-cf6d-4d43-bd64-a50318fd5168", + "actions": [ + { + "type": "reply", + "uuid": "c007a761-85c7-48eb-9b38-8d056d1d44ee", + "msg": { + "base": "Thanks for contacting the ThriftShop order status system. Please send your order # and we'll help you in a jiffy!" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "0a300e24-c7fa-473d-b06e-2826fa25b447" + } + ], + "rule_sets": [ + { + "uuid": "691e8175-f6a1-45b3-b377-c8bda223e52b", + "x": 389, + "y": 875, + "label": "Comment", + "rules": [ + { + "uuid": "567cac39-5ee4-4dac-b29a-97dfef2a2eb1", + "category": { + "base": "All Responses" + }, + "destination": "788064a1-fe23-4f6e-8041-200412dff55e", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "O", + "operand": "@step.value", + "config": {} + }, + { + "uuid": "659f67c6-cf6d-4d43-bd64-a50318fd5168", + "x": 356, + "y": 198, + "label": "Lookup Response", + "rules": [ + { + "uuid": "24b3a3a5-1ce8-45d4-87e5-0fa0159a9cab", + "category": { + "base": "All Responses" + }, + "destination": "541382fd-e897-4f77-b468-1f2c7bacf30c", + "destination_type": "R", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "C", + "operand": "@step.value", + "config": {} + }, + { + "uuid": "d8be5901-e847-4b6f-a603-51eb571718a1", + "x": 389, + "y": 1252, + "label": "Extra Comments", + "rules": [ + { + "uuid": "bba334ec-321e-4ead-8d1d-f34d7bc983ad", + "category": { + "base": "All Responses" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "O", + "operand": "@step.value", + "config": {} + }, + { + "uuid": "726f6b34-d6be-46fa-8061-bf1f081b15ce", + "x": 356, + "y": 398, + "label": "Lookup", + "rules": [ + { + "uuid": "d26ac82f-90dc-4f95-b105-7d3ca4effc20", + "category": { + "base": "Shipped" + }, + "destination": "f87e2df4-5cbb-4961-b3c9-41eed35f8dbe", + "destination_type": "A", + "test": { + "type": "contains", + "test": { + "base": "Shipped" + } + }, + "label": null + }, + { + "uuid": "774e6911-cb63-4700-99bc-5e16966393b8", + "category": { + "base": "Pending" + }, + "destination": "601c7150-7a3e-40aa-8f79-92f936e17cf9", + "destination_type": "A", + "test": { + "type": "contains", + "test": { + "base": "Pending" + } + }, + "label": null + }, + { + "uuid": "fee4858c-2545-435b-ae65-d9e6b8f8d106", + "category": { + "base": "Cancelled" + }, + "destination": "1bdc3242-ef13-4c1b-a3b1-11554bffff7a", + "destination_type": "A", + "test": { + "type": "contains", + "test": { + "base": "Cancelled" + } + }, + "label": null + }, + { + "uuid": "24b3a3a5-1ce8-45d4-87e5-0fa0159a9cab", + "category": { + "base": "Other" + }, + "destination": "81c3ff98-3552-4962-ab05-8f7948ebac24", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "expression", + "response_type": "", + "operand": "@extra.status", + "config": {} + }, + { + "uuid": "541382fd-e897-4f77-b468-1f2c7bacf30c", + "x": 356, + "y": 298, + "label": "Lookup Webhook", + "rules": [ + { + "uuid": "24b3a3a5-1ce8-45d4-87e5-0fa0159a9cab", + "category": { + "base": "Success" + }, + "destination": "726f6b34-d6be-46fa-8061-bf1f081b15ce", + "destination_type": "R", + "test": { + "type": "webhook_status", + "status": "success" + }, + "label": null + }, + { + "uuid": "008f4050-7979-42d5-a2cb-d1b4f6bc144f", + "category": { + "base": "Failure" + }, + "destination": "726f6b34-d6be-46fa-8061-bf1f081b15ce", + "destination_type": "R", + "test": { + "type": "webhook_status", + "status": "failure" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "webhook", + "response_type": "", + "operand": "@step.value", + "config": { + "webhook": "https://textit.in/demo/status/", + "webhook_action": null + } + } + ], + "base_language": "base", + "flow_type": "M", + "version": "11.7", + "metadata": { + "notes": [ + { + "body": "This flow demonstrates looking up an order using a webhook and giving the user different options based on the results. After looking up the order the user has the option to send additional comments which are forwarded to customer support representatives.\n\nUse order numbers CU001, CU002 or CU003 to see the different cases in action.", + "x": 59, + "y": 0, + "title": "Using Your Own Data" + } + ], + "saved_on": "2019-01-09T18:29:40.288510Z", + "uuid": "3825c65e-5aa8-4619-8de9-963f68483cb3", + "name": "Sample Flow - Order Status Checker", + "revision": 11, + "expires": 720 + } + } + ] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_11_9.json b/media/test_flows/legacy/migrations/migrate_to_11_9.json new file mode 100644 index 00000000000..b1c3f8b56a5 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_11_9.json @@ -0,0 +1,458 @@ +{ + "version": "11.8", + "site": "https://app.rapidpro.io", + "flows": [ + { + "entry": "edea0cb4-00b9-4a53-a923-f4aa38cf18c5", + "action_sets": [ + { + "uuid": "edea0cb4-00b9-4a53-a923-f4aa38cf18c5", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "0b6745ce-6d8b-40d4-bb4f-f18f407bdcdf", + "msg": { + "base": "hi valid" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "d79e8a16-62df-4b48-aff9-fae2633f2b77" + } + ], + "rule_sets": [], + "base_language": "base", + "flow_type": "M", + "version": "11.8", + "metadata": { + "name": "Valid1", + "saved_on": "2018-12-17T12:08:54.146452Z", + "revision": 2, + "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3", + "expires": 10080, + "ivr_retry_failed_events": null + } + }, + { + "entry": "d3e2b506-50cd-4c1e-9573-295bd2087258", + "action_sets": [ + { + "uuid": "d3e2b506-50cd-4c1e-9573-295bd2087258", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "d17b512e-87ed-4717-9461-bc2ffde23b77", + "msg": { + "base": "Hi flow invalid 1" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "c231d9a6-3b53-4670-ac41-247736126ffd" + } + ], + "rule_sets": [], + "base_language": "base", + "flow_type": "M", + "version": "11.8", + "metadata": { + "name": "Invalid1", + "saved_on": "2018-12-17T12:09:52.155509Z", + "revision": 2, + "uuid": "ad40071e-a665-4df3-af14-0bc0fe589244", + "expires": 10080, + "ivr_retry_failed_events": null + } + }, + { + "entry": "932b19a7-245c-4a2b-9249-66d4eb7cfdf7", + "action_sets": [ + { + "uuid": "932b19a7-245c-4a2b-9249-66d4eb7cfdf7", + "x": 100, + "y": 0, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "2f6cdd62-9b29-4597-8af0-3dd410ae46f0", + "msg": { + "base": "Hi flow invalid two" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "0035ccc2-6359-4954-bbc9-bddb90076c25" + } + ], + "rule_sets": [], + "base_language": "base", + "flow_type": "M", + "version": "11.8", + "metadata": { + "name": "Invalid2", + "saved_on": "2018-12-17T12:10:13.269437Z", + "revision": 3, + "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", + "expires": 10080, + "ivr_retry_failed_events": null + } + }, + { + "entry": "544e4ef3-4c54-4bb0-8f89-a1e098b3f030", + "action_sets": [ + { + "uuid": "544e4ef3-4c54-4bb0-8f89-a1e098b3f030", + "x": 375, + "y": 1, + "destination": "a7de0caa-5ab0-4edc-8fc8-33eb31f79cba", + "actions": [ + { + "type": "reply", + "uuid": "64ce02e3-8ea8-414a-a7cf-7f5d3938aa03", + "msg": { + "base": "Hi" + }, + "media": {}, + "quick_replies": [], + "send_all": false + } + ], + "exit_uuid": "33d4947d-bdda-4226-bc27-55a6b6e56b36" + }, + { + "uuid": "c9e48e85-b91c-4e2b-bb17-fb670f1559c0", + "x": 420, + "y": 622, + "destination": "861c6312-b2a8-4586-8688-6621d7065497", + "actions": [ + { + "type": "reply", + "uuid": "24b49e66-2520-4f9c-a6f7-f7a43793db53", + "msg": { + "base": "tnx" + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "trigger-flow", + "uuid": "bf31a0f8-73d8-4c81-8f90-ea0d4008a212", + "flow": { + "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", + "name": "Invalid2" + }, + "contacts": [], + "groups": [ + { + "uuid": "ad17d536-0085-4e6b-abc6-222b22d57caa", + "name": "Empty" + } + ], + "variables": [] + } + ], + "exit_uuid": "c8b6b99d-1af5-4bd1-b2d8-b3e87de702e8" + }, + { + "uuid": "6adc7de8-6a84-490a-b3d3-3d1ec607d465", + "x": 580, + "y": 316, + "destination": null, + "actions": [ + { + "type": "reply", + "uuid": "09f0ddee-c27e-4397-bb3c-4a6cf35da77a", + "msg": { + "base": "tyvm" + }, + "media": {}, + "quick_replies": [], + "send_all": false + }, + { + "type": "flow", + "uuid": "95e9750f-9bf4-4ae9-aa07-5c4cde604956", + "flow": { + "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", + "name": "Invalid2" + } + } + ], + "exit_uuid": "1f5d4b7e-7ceb-47cf-91e7-94790f63c9db" + }, + { + "uuid": "ed891a32-6e6d-49b1-88d0-399d2002bce0", + "x": 323, + "y": 993, + "destination": null, + "actions": [ + { + "type": "flow", + "uuid": "70acb970-8b3a-47d0-9fb6-56c5974a582b", + "flow": { + "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3", + "name": "Valid1" + } + } + ], + "exit_uuid": "b5bfc0a1-701e-4e19-ad3e-bf9d7470b241" + }, + { + "uuid": "a750fe69-167b-4ae3-af72-7aae4c2d8b1a", + "x": 598, + "y": 993, + "destination": null, + "actions": [ + { + "type": "flow", + "uuid": "9b0f11bd-fbda-4efe-a41a-8ef101412d95", + "flow": { + "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", + "name": "Invalid2" + } + } + ], + "exit_uuid": "1231547d-8f57-4a12-82d1-b1bf3e664010" + }, + { + "uuid": "0bfb7527-c6e9-4452-b780-6755d2041144", + "x": 576, + "y": 169, + "destination": null, + "actions": [ + { + "type": "flow", + "uuid": "e8e85830-1aef-4947-af91-1a2653f3627d", + "flow": { + "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3", + "name": "Valid1" + } + } + ], + "exit_uuid": "8d2c4101-330a-49f7-a4e5-972513c1a995" + } + ], + "rule_sets": [ + { + "uuid": "a7de0caa-5ab0-4edc-8fc8-33eb31f79cba", + "x": 61, + "y": 190, + "label": "Response 1", + "rules": [ + { + "uuid": "a16424a4-95df-4839-813a-bf6bee37f735", + "category": { + "base": "1" + }, + "destination": "9baa6aaf-61bf-4686-8059-1c373a43e5a6", + "destination_type": "R", + "test": { + "type": "eq", + "test": "1" + }, + "label": null + }, + { + "uuid": "f6b45161-f1fe-475f-a4db-7eb300f26415", + "category": { + "base": "2" + }, + "destination": "c9e48e85-b91c-4e2b-bb17-fb670f1559c0", + "destination_type": "A", + "test": { + "type": "eq", + "test": "2" + }, + "label": null + }, + { + "uuid": "59bfd40b-8b94-4555-ac2e-e6883d280df2", + "category": { + "base": "3" + }, + "destination": "6adc7de8-6a84-490a-b3d3-3d1ec607d465", + "destination_type": "A", + "test": { + "type": "eq", + "test": "3" + }, + "label": null + }, + { + "uuid": "7b25509c-94c4-45c1-86cf-2995916ac825", + "category": { + "base": "Other" + }, + "destination": "0bfb7527-c6e9-4452-b780-6755d2041144", + "destination_type": "A", + "test": { + "type": "true" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "wait_message", + "response_type": "", + "operand": "@step.value", + "config": {} + }, + { + "uuid": "9baa6aaf-61bf-4686-8059-1c373a43e5a6", + "x": 51, + "y": 659, + "label": "Response 2", + "rules": [ + { + "uuid": "049a4d45-d50d-468a-ae61-9e55c5dda0ea", + "category": { + "base": "Completed" + }, + "destination": "54c31965-d727-4b0a-a37e-6231551343dc", + "destination_type": "R", + "test": { + "type": "subflow", + "exit_type": "completed" + }, + "label": null + }, + { + "uuid": "101dea88-83bf-4219-973b-d11de45589ae", + "category": { + "base": "Expired" + }, + "destination": "544e4ef3-4c54-4bb0-8f89-a1e098b3f030", + "destination_type": "A", + "test": { + "type": "subflow", + "exit_type": "expired" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "subflow", + "response_type": "", + "operand": "@step.value", + "config": { + "flow": { + "name": "Invalid1", + "uuid": "ad40071e-a665-4df3-af14-0bc0fe589244" + } + } + }, + { + "uuid": "54c31965-d727-4b0a-a37e-6231551343dc", + "x": 36, + "y": 875, + "label": "Response 3", + "rules": [ + { + "uuid": "6a9a30cc-0400-4148-b760-ff342d7ef496", + "category": { + "base": "Completed" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "subflow", + "exit_type": "completed" + }, + "label": null + }, + { + "uuid": "e9e0ad89-6d63-4744-ba35-8042af052a95", + "category": { + "base": "Expired" + }, + "destination": null, + "destination_type": null, + "test": { + "type": "subflow", + "exit_type": "expired" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "subflow", + "response_type": "", + "operand": "@step.value", + "config": { + "flow": { + "name": "Valid1", + "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3" + } + } + }, + { + "uuid": "861c6312-b2a8-4586-8688-6621d7065497", + "x": 409, + "y": 863, + "label": "Response 4", + "rules": [ + { + "uuid": "451cb651-7a59-4d2b-bfe5-753643ad7db2", + "category": { + "base": "1" + }, + "destination": "ed891a32-6e6d-49b1-88d0-399d2002bce0", + "destination_type": "A", + "test": { + "type": "between", + "min": "0", + "max": "0.5" + }, + "label": null + }, + { + "uuid": "39c05550-91a3-4497-9595-2478b5ab6ae4", + "category": { + "base": "2" + }, + "destination": "a750fe69-167b-4ae3-af72-7aae4c2d8b1a", + "destination_type": "A", + "test": { + "type": "between", + "min": "0.5", + "max": "1" + }, + "label": null + } + ], + "finished_key": null, + "ruleset_type": "random", + "response_type": "", + "operand": "@(RAND())", + "config": {} + } + ], + "base_language": "base", + "flow_type": "M", + "version": "11.8", + "metadata": { + "name": "Master", + "saved_on": "2018-12-17T13:54:21.769976Z", + "revision": 56, + "uuid": "8d3f72ef-60b9-4902-b792-d664df502f3f", + "expires": 10080 + } + } + ], + "campaigns": [], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/migrate_to_9.json b/media/test_flows/legacy/migrations/migrate_to_9.json new file mode 100644 index 00000000000..908081987d9 --- /dev/null +++ b/media/test_flows/legacy/migrations/migrate_to_9.json @@ -0,0 +1,148 @@ +{ + "campaigns": [ + { + "events": [ + { + "event_type": "M", + "relative_to": { + "id": 1134, + "key": "next_appointment", + "label": "Next Show" + }, + "flow": { + "name": "Single Message", + "id": 2814 + }, + "offset": -1, + "delivery_hour": -1, + "message": "Hi there, your next show is @contact.next_show. Don't miss it!", + "id": 9959, + "unit": "H" + } + ], + "group": { + "name": "Pending Appointments", + "id": 2308 + }, + "id": 405, + "name": "Appointment Schedule" + } + ], + "version": 9, + "site": "https://app.rapidpro.io", + "flows": [ + { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "a04f3046-e053-444f-b018-eff019766ad9", + "uuid": "e4a03298-dd43-4afb-b185-2782fc36a006", + "actions": [ + { + "msg": { + "base": "Hi there!" + }, + "type": "reply" + }, + { + "uuid": "c756af8f-4480-4a91-875d-c0600597c0ae", + "contacts": [ + { + "id": contact_id, + "name": "Trey Anastasio" + } + ], + "groups": [], + "variables": [], + "msg": { + "base": "You're phantastic" + }, + "action": "GET", + "type": "send" + }, + { + "labels": [ + { + "name": "this label", + "id": label_id + } + ], + "type": "add_label" + }, + { + "field": "concat_test", + "type": "save", + "value": "@(CONCAT(extra.flow.divided, extra.flow.sky))", + "label": "Concat Test" + }, + { + "field": "normal_test", + "type": "save", + "value": "@extra.contact.name", + "label": "Normal Test" + } + ] + }, + { + "y": 142, + "x": 166, + "destination": null, + "uuid": "a04f3046-e053-444f-b018-eff019766ad9", + "actions": [ + { + "type": "add_group", + "groups": [ + { + "name": "Survey Audience", + "id": group_id + }, + "@(\"Phans\")", + "Survey Audience" + ] + }, + { + "type": "del_group", + "groups": [ + { + "name": "Unsatisfied Customers", + "id": group_id + } + ] + }, + { + "name": "Test flow", + "contacts": [], + "variables": [ + { + "id": "@contact.tel_e164" + } + ], + "groups": [], + "type": "trigger-flow", + "id": start_flow_id + }, + { + "type": "flow", + "name": "Parent Flow", + "id": start_flow_id + } + ] + } + ], + "version": 9, + "flow_type": "F", + "entry": "e4a03298-dd43-4afb-b185-2782fc36a006", + "rule_sets": [], + "metadata": { + "expires": 10080, + "revision": 11, + "id": previous_flow_id, + "name": "Migrate to 9", + "saved_on": "2016-06-22T15:05:12.074490Z" + } + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/multi_language_flow.json b/media/test_flows/legacy/migrations/multi_language_flow.json new file mode 100644 index 00000000000..d4fadda4704 --- /dev/null +++ b/media/test_flows/legacy/migrations/multi_language_flow.json @@ -0,0 +1,176 @@ +{ + "version": 4, + "flows": [ + { + "definition": { + "base_language": "eng", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "c969c5ba-8595-4e2c-86d0-c2e375afe3e0", + "uuid": "d563e7ca-aa0f-4615-ba8c-eab5e13ff4bf", + "actions": [ + { + "msg": { + "spa": "\u00a1Hola amigo! \u00bfCu\u00e1l es tu color favorito?", + "eng": "Hello friend! What is your favorite color?" + }, + "type": "reply" + } + ] + }, + { + "y": 266, + "x": 351, + "destination": null, + "uuid": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", + "actions": [ + { + "msg": { + "spa": "\u00a1Gracias! Me gusta @flow.color.", + "eng": "Thank you! I like @flow.color." + }, + "type": "reply" + }, + { + "msg": { + "eng": "This message was not translated." + }, + "type": "reply" + } + ] + }, + { + "y": 179, + "x": 683, + "destination": "c969c5ba-8595-4e2c-86d0-c2e375afe3e0", + "uuid": "6ea52610-838c-4f64-8e24-99754135da67", + "actions": [ + { + "msg": { + "spa": "Por favor, una vez m\u00e1s", + "eng": "Please try again." + }, + "type": "reply" + } + ] + } + ], + "last_saved": "2015-02-19T05:55:32.232993Z", + "entry": "d563e7ca-aa0f-4615-ba8c-eab5e13ff4bf", + "rule_sets": [ + { + "uuid": "c969c5ba-8595-4e2c-86d0-c2e375afe3e0", + "webhook_action": null, + "rules": [ + { + "test": { + "test": { + "spa": "rojo", + "eng": "Red" + }, + "base": "Red", + "type": "contains_any" + }, + "category": { + "spa": "Rojo", + "base": "Red", + "eng": "Red" + }, + "destination": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", + "config": { + "type": "contains_any", + "verbose_name": "has any of these words", + "name": "Contains any", + "localized": true, + "operands": 1 + }, + "uuid": "de555b2c-2616-49ff-8564-409a01b0bd79" + }, + { + "test": { + "test": { + "spa": "verde", + "eng": "Green" + }, + "base": "Green", + "type": "contains_any" + }, + "category": { + "spa": "Verde", + "base": "Green", + "eng": "Green" + }, + "destination": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", + "config": { + "type": "contains_any", + "verbose_name": "has any of these words", + "name": "Contains any", + "localized": true, + "operands": 1 + }, + "uuid": "e09c7ad3-46c8-4024-9fcf-8a0d26d97d6a" + }, + { + "test": { + "test": { + "spa": "azul", + "eng": "Blue" + }, + "base": "Blue", + "type": "contains_any" + }, + "category": { + "spa": "Azul", + "base": "Blue", + "eng": "Blue" + }, + "destination": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", + "config": { + "type": "contains_any", + "verbose_name": "has any of these words", + "name": "Contains any", + "localized": true, + "operands": 1 + }, + "uuid": "aafd9e60-4d74-40cb-a923-3501560cb5c1" + }, + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "spa": "Otro", + "base": "Other", + "eng": "Other" + }, + "destination": "6ea52610-838c-4f64-8e24-99754135da67", + "config": { + "type": "true", + "verbose_name": "contains anything", + "name": "Other", + "operands": 0 + }, + "uuid": "2263684a-0354-448e-8213-c57644e91798" + } + ], + "webhook": null, + "label": "Color", + "operand": "@step.value", + "finished_key": null, + "response_type": "C", + "y": 132, + "x": 242 + } + ], + "metadata": {} + }, + "id": 1400, + "flow_type": "F", + "name": "Multi Language Flow" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/old_expressions.json b/media/test_flows/legacy/migrations/old_expressions.json new file mode 100644 index 00000000000..17ef733d82e --- /dev/null +++ b/media/test_flows/legacy/migrations/old_expressions.json @@ -0,0 +1,118 @@ +{ + "version": 7, + "flows": [ + { + "definition": { + "base_language": "eng", + "action_sets": [ + { + "y": 0, + "x": 100, + "destination": "a32d0ebb-57aa-452e-bd8d-ae5febee4440", + "uuid": "a26285b1-134b-421b-9853-af0f26d13777", + "actions": [ + { + "msg": { + "eng": "Hi @contact.name|upper_case. Today is =(date.now)" + }, + "type": "reply" + } + ] + }, + { + "y": 350, + "x": 164, + "destination": null, + "uuid": "054d9e01-8e68-4f6d-9cf3-44407256670e", + "actions": [ + { + "type": "add_group", + "groups": [ + "=flow.response_1.category" + ] + }, + { + "msg": { + "eng": "Was @contact.name|lower_case|title_case." + }, + "variables": [ + { + "id": "=flow.response_1.category" + } + ], + "type": "send", + "groups": [], + "contacts": [] + } + ] + } + ], + "last_saved": "2015-09-23T07:54:10.928652Z", + "entry": "a26285b1-134b-421b-9853-af0f26d13777", + "rule_sets": [ + { + "uuid": "a32d0ebb-57aa-452e-bd8d-ae5febee4440", + "webhook_action": "GET", + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "eng": "All Responses" + }, + "destination": "028c71a3-0696-4d98-8ff3-0dc700811124", + "uuid": "bf879f78-aff8-4c64-9326-e92f677af5cf", + "destination_type": "R" + } + ], + "webhook": "http://example.com/query.php?contact=@contact.name|upper_case", + "ruleset_type": "webhook", + "label": "Response 1", + "operand": "=(step.value)", + "finished_key": null, + "response_type": "", + "y": 134, + "x": 237, + "config": {} + }, + { + "uuid": "028c71a3-0696-4d98-8ff3-0dc700811124", + "webhook_action": null, + "rules": [ + { + "test": { + "test": "true", + "type": "true" + }, + "category": { + "eng": "All Responses" + }, + "destination": "054d9e01-8e68-4f6d-9cf3-44407256670e", + "uuid": "35ba932c-d45a-4cf5-bd0b-41fd9b80cc27", + "destination_type": "A" + } + ], + "webhook": null, + "ruleset_type": "expression", + "label": "Response 2", + "operand": "@step.value|time_delta:\"3\"", + "finished_key": null, + "response_type": "", + "y": 240, + "x": 203, + "config": {} + } + ], + "type": "F", + "metadata": {} + }, + "expires": 10080, + "id": 31427, + "flow_type": "F", + "name": "Old Expressions" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/single_message_bad_localization.json b/media/test_flows/legacy/migrations/single_message_bad_localization.json new file mode 100644 index 00000000000..8c13b95e015 --- /dev/null +++ b/media/test_flows/legacy/migrations/single_message_bad_localization.json @@ -0,0 +1,25 @@ +{ + "version": 10, + "flows": [ + { + "base_language": "eng", + "rule_sets": [], + "action_sets": [ + { + "y": 0, + "x": 100, + "uuid": "37fe93f8-edf5-40f3-b029-3b391fa528d0", + "actions": [ + { + "msg": "Campaign Message 12", + "type": "reply", + "uuid": "9bdb1aab-e42e-4585-8395-6504c4a683ed" + } + ] + } + ], + "entry": "37fe93f8-edf5-40f3-b029-3b391fa528d0" + } + ], + "triggers": [] +} \ No newline at end of file diff --git a/media/test_flows/legacy/migrations/type_flow.json b/media/test_flows/legacy/migrations/type_flow.json new file mode 100644 index 00000000000..ed3976e9958 --- /dev/null +++ b/media/test_flows/legacy/migrations/type_flow.json @@ -0,0 +1,394 @@ +{ + "campaigns": [], + "version": "10.1", + "site": "https://app.rapidpro.io", + "flows": [ + { + "base_language": "base", + "action_sets": [ + { + "y": 0, + "x": 92, + "destination": "9c941ba5-e4df-47e0-9a4f-594986ae1b1a", + "uuid": "bc3da5f2-6fe5-41f1-ac0e-ec2701189ef2", + "actions": [ + { + "msg": { + "base": "Hey @contact.nickname, you joined on @contact.joined_on in @contact.district." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "4dc98ff5-8d86-45f5-8336-8949029e893e" + }, + { + "msg": { + "base": "It's @date. The time is @date.now on @date.today." + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "058e5d4a-3447-49d9-a033-ebe3010b5875" + }, + { + "msg": { + "base": "Send text" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "9568e1c8-04f2-45ef-a477-4521d19bfaf6" + } + ] + }, + { + "y": 257, + "x": 78, + "destination": "a4904b78-08b8-42fd-9479-27bcb1764bc4", + "uuid": "dac0c91f-3f3f-43d5-a2d9-5c1059998134", + "actions": [ + { + "msg": { + "base": "You said @flow.text at @flow.text.time. Send date" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "6f4fc213-3037-49e5-ac45-b956c48fd546" + } + ] + }, + { + "y": 540, + "x": 95, + "destination": "9994619b-e68d-4c94-90d6-af19fb944f7d", + "uuid": "9bbdc63c-4385-44e1-b573-a127f50d3d34", + "actions": [ + { + "msg": { + "base": "You said @flow.date which was in category @flow.date.category Send number" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "7177ef30-33ca-4b25-8af7-3213e0483b56" + } + ] + }, + { + "y": 825, + "x": 96, + "destination": "01cc820b-c516-4e68-8903-aa69866b11b6", + "uuid": "a4a37023-de22-4ac4-b431-da2a333c93cd", + "actions": [ + { + "msg": { + "base": "You said @flow.number. Send state" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "34d622bc-e2ad-44aa-b047-cfb38e2dc2cc" + } + ] + }, + { + "y": 1084, + "x": 94, + "destination": "9769918c-8ca4-4ec5-8b5b-bf94cc6746a9", + "uuid": "7e8dfcd5-6510-4060-9608-2c8faa3a8e0a", + "actions": [ + { + "msg": { + "base": "You said @flow.state which was in category @flow.state.category. Send district" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "a4428571-9b86-49b8-97e1-6ffee3cddbaa" + } + ] + }, + { + "y": 1460, + "x": 73, + "destination": "ea2244de-7b23-4fbb-8f99-38cde3100de8", + "uuid": "605e2fe7-321a-4cce-b97b-877d75bd3b12", + "actions": [ + { + "msg": { + "base": "You said @flow.district. Send ward" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "5f8eb5aa-249b-4718-a502-8406dd0ae418" + } + ] + }, + { + "y": 1214, + "x": 284, + "destination": "498b1953-02f1-47dd-b9cb-1b51913e348f", + "uuid": "9769918c-8ca4-4ec5-8b5b-bf94cc6746a9", + "actions": [ + { + "msg": { + "base": "You said @flow.ward.", + "fre": "Tu as dit @flow.ward" + }, + "media": {}, + "send_all": false, + "type": "reply", + "uuid": "b95b88c8-a85c-4bac-931d-310d678c286a" + }, + { + "lang": "fre", + "type": "lang", + "name": "French", + "uuid": "56a4bca5-b9e5-4d04-883c-ca65d7c4d538" + } + ] + } + ], + "version": "10.1", + "flow_type": "F", + "entry": "bc3da5f2-6fe5-41f1-ac0e-ec2701189ef2", + "rule_sets": [ + { + "uuid": "9c941ba5-e4df-47e0-9a4f-594986ae1b1a", + "rules": [ + { + "category": { + "base": "All Responses" + }, + "uuid": "a4682f52-7869-4e64-bf9f-8d2c0a341d19", + "destination": "dac0c91f-3f3f-43d5-a2d9-5c1059998134", + "label": null, + "destination_type": "A", + "test": { + "type": "true" + } + } + ], + "ruleset_type": "wait_message", + "label": "Text", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 146, + "x": 265, + "config": {} + }, + { + "uuid": "a4904b78-08b8-42fd-9479-27bcb1764bc4", + "rules": [ + { + "category": { + "base": "is a date" + }, + "uuid": "e410616b-b5cd-4fd1-af42-9c6b6c9fe282", + "destination": "9bbdc63c-4385-44e1-b573-a127f50d3d34", + "label": null, + "destination_type": "A", + "test": { + "type": "date" + } + }, + { + "category": { + "base": "Other" + }, + "uuid": "a720d0b1-0686-47be-a306-1543e470c6de", + "destination": "dac0c91f-3f3f-43d5-a2d9-5c1059998134", + "label": null, + "destination_type": "A", + "test": { + "type": "true" + } + } + ], + "ruleset_type": "wait_message", + "label": "Date", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 391, + "x": 273, + "config": {} + }, + { + "uuid": "9994619b-e68d-4c94-90d6-af19fb944f7d", + "rules": [ + { + "category": { + "base": "numeric" + }, + "uuid": "c4881d22-57aa-4964-abbc-aaf26b875614", + "destination": "a4a37023-de22-4ac4-b431-da2a333c93cd", + "label": null, + "destination_type": "A", + "test": { + "type": "number" + } + }, + { + "category": { + "base": "Other" + }, + "uuid": "6cd3fb0c-070d-4060-bafc-badaebe5134e", + "destination": null, + "label": null, + "destination_type": null, + "test": { + "type": "true" + } + } + ], + "ruleset_type": "wait_message", + "label": "Number", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 679, + "x": 267, + "config": {} + }, + { + "uuid": "01cc820b-c516-4e68-8903-aa69866b11b6", + "rules": [ + { + "category": { + "base": "state" + }, + "uuid": "4ef398b1-d3f1-4023-b608-8803cc05dd20", + "destination": "7e8dfcd5-6510-4060-9608-2c8faa3a8e0a", + "label": null, + "destination_type": "A", + "test": { + "type": "state" + } + }, + { + "category": { + "base": "Other" + }, + "uuid": "38a4583c-cf73-454c-80e5-09910cf92f4b", + "destination": null, + "label": null, + "destination_type": null, + "test": { + "type": "true" + } + } + ], + "ruleset_type": "wait_message", + "label": "State", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 956, + "x": 271, + "config": {} + }, + { + "uuid": "498b1953-02f1-47dd-b9cb-1b51913e348f", + "rules": [ + { + "category": { + "base": "district", + "fre": "le district" + }, + "uuid": "47147597-00c6-44bc-95d2-bebec9f1a45b", + "destination": "605e2fe7-321a-4cce-b97b-877d75bd3b12", + "label": null, + "destination_type": "A", + "test": { + "test": "@flow.state", + "type": "district" + } + }, + { + "category": { + "base": "Other" + }, + "uuid": "1145c620-2512-4228-b561-80024bbd91ee", + "destination": null, + "label": null, + "destination_type": null, + "test": { + "type": "true" + } + } + ], + "ruleset_type": "wait_message", + "label": "District", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 1355, + "x": 266, + "config": {} + }, + { + "uuid": "ea2244de-7b23-4fbb-8f99-38cde3100de8", + "rules": [ + { + "category": { + "base": "ward" + }, + "uuid": "b5159826-a55a-4803-a656-64d47803e8bf", + "destination": null, + "label": null, + "destination_type": null, + "test": { + "state": "@flow.state.", + "type": "ward", + "district": "@flow.district" + } + }, + { + "category": { + "base": "Other" + }, + "uuid": "c1aa2a53-4d85-4fdd-953e-7e24b06cc7ea", + "destination": null, + "label": null, + "destination_type": null, + "test": { + "type": "true" + } + } + ], + "ruleset_type": "wait_message", + "label": "Ward", + "operand": "@step.value", + "finished_key": null, + "response_type": "", + "y": 1584, + "x": 268, + "config": {} + } + ], + "metadata": { + "expires": 10080, + "revision": 19, + "uuid": "d7468d97-b8d7-482e-a09c-d0bfe839c555", + "name": "Type Flow", + "saved_on": "2017-10-30T19:38:39.814935Z" + } + } + ], + "triggers": [ + { + "trigger_type": "K", + "flow": { + "name": "Type Flow", + "uuid": "d7468d97-b8d7-482e-a09c-d0bfe839c555" + }, + "groups": [], + "keyword": "types", + "channel": null + } + ] +} \ No newline at end of file diff --git a/media/test_flows/malformed_groups.json b/media/test_flows/malformed_groups.json deleted file mode 100644 index 44ca9c05b60..00000000000 --- a/media/test_flows/malformed_groups.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "version": 4, - "flows": [ - { - "definition": { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "a6676605-332a-4309-a8b8-79b33e73adcd", - "actions": [ - { - "type": "add_group", - "uuid": "5f5a2aac-f4f4-4b47-af6e-186f6dafb9f0", - "group": {"name": "< 25", "id": 15572} - }, - { - "type": "del_group", - "uuid": "2a385c5b-e27c-43ac-bbc6-49653fede421", - "group": {"id": 15573} - } - ] - } - ], - "rule_sets": [], - "metadata": { - "uuid": "77ae372d-a937-4d9b-a703-cc1c75c4c6f1", - "notes": [], - "expires": 720, - "name": "Bad Mojo", - "revision": 1, - "saved_on": "2017-08-16T23:10:18.579169Z" - } - }, - "version": 4, - "flow_type": "F", - "name": "Bad Mojo", - "entry": "a6676605-332a-4309-a8b8-79b33e73adcd" - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/malformed_single_message.json b/media/test_flows/malformed_single_message.json deleted file mode 100644 index 9c753ed3a9e..00000000000 --- a/media/test_flows/malformed_single_message.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "campaigns": [], - "triggers": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "name": "Single Message Flow", - "id": -1, - "uuid": "f467561a-3b95-4a4a-94bc-97bc6b4268c0", - "definition": { - "entry": "2d702ba6-461e-442c-96bc-2b8a87c9ceca", - "action_sets": [ - { - "x": 0, - "y": 0, - "uuid": "2d702ba6-461e-442c-96bc-2b8a87c9ceca", - "destination": null, - "actions":[ - { - "msg": "Single message text", - "type": "reply" - } - ] - } - ], - "rulesets": [] - } - } - ] -} diff --git a/media/test_flows/migrate_to_11_0.json b/media/test_flows/migrate_to_11_0.json deleted file mode 100644 index 62a9bb2ce6d..00000000000 --- a/media/test_flows/migrate_to_11_0.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "version": "10.4", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "d96947d0-f975-47ee-be7d-3dfe68a52703", - "action_sets": [ - { - "uuid": "d96947d0-f975-47ee-be7d-3dfe68a52703", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "msg": { - "base": { - "base": "@date Something went wrong once. I shouldn't be a dict inside a dict." - } - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "1ee58c31-3504-49d3-914b-324d484fed1d" - } - ], - "exit_uuid": "f2566f59-5d36-4de7-8581-dcc5de7e8340" - } - ], - "rule_sets": [], - "base_language": "base", - "flow_type": "M", - "version": "10.4", - "metadata": { - "name": "Migrate to 11.0", - "saved_on": "2017-11-15T22:56:36.039558Z", - "revision": 5, - "uuid": "5a8deb77-23b8-46ee-a775-48ed32742e31", - "expires": 720 - } - } - ] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_10.json b/media/test_flows/migrate_to_11_10.json deleted file mode 100644 index 8f3ed9b8ea0..00000000000 --- a/media/test_flows/migrate_to_11_10.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "version": "11.9", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "bd6ca3fc-0505-4ea6-a1c6-60d0296a7db0", - "action_sets": [ - { - "uuid": "bd6ca3fc-0505-4ea6-a1c6-60d0296a7db0", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "say", - "uuid": "0738e369-279d-4e2f-a14c-08714b0d6f74", - "msg": { - "eng": "Hi there this is an IVR flow.. how did you get here?" - }, - "recording": null - } - ], - "exit_uuid": "0e78ff3d-8307-4c0e-a3b0-af4019930835" - } - ], - "rule_sets": [], - "base_language": "eng", - "flow_type": "V", - "version": "11.9", - "metadata": { - "name": "Migrate to 11.10 IVR Child", - "saved_on": "2019-01-25T21:14:37.475679Z", - "revision": 2, - "uuid": "5331c09c-2bd6-47a5-ac0d-973caf9d4cb5", - "expires": 5, - "ivr_retry": 60, - "ivr_retry_failed_events": false - } - }, - { - "entry": "920ce708-31d3-4870-804f-190fb37b9b8c", - "action_sets": [ - { - "uuid": "920ce708-31d3-4870-804f-190fb37b9b8c", - "x": 59, - "y": 0, - "destination": "90363d00-a669-4d84-ab57-eb27bf9c3284", - "actions": [ - { - "type": "reply", - "uuid": "3071cb5d-4caf-4a15-87c7-daae4a436ee7", - "msg": { - "eng": "hi" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "f646245c-ac46-4565-9215-cef53c34da09" - }, - { - "uuid": "bbd1c25f-ab01-4539-8f3e-b0ca18f366f4", - "x": 48, - "y": 345, - "destination": null, - "actions": [ - { - "type": "flow", - "uuid": "edb70527-47fa-463e-8318-359254b1bc0e", - "flow": { - "uuid": "5331c09c-2bd6-47a5-ac0d-973caf9d4cb5", - "name": "Migrate to 11.10 IVR Child" - } - } - ], - "exit_uuid": "330f0f9a-154b-49de-9ff9-a7891d4a11af" - }, - { - "uuid": "62e29de4-d85e-459d-ad38-220d1048b714", - "x": 412, - "y": 348, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "41ed5ba3-41c7-4e6f-b394-d451204bcf0f", - "msg": { - "eng": "Expired" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "0040f402-a6ac-4de4-8775-a4938b9011b8" - } - ], - "rule_sets": [ - { - "uuid": "90363d00-a669-4d84-ab57-eb27bf9c3284", - "x": 218, - "y": 82, - "label": "Response 1", - "rules": [ - { - "uuid": "4c6ac0ad-e8a8-4b1e-b958-ef2f22728821", - "category": { - "eng": "Completed" - }, - "destination": "e5dae061-2c94-45ae-a3bb-4822989e636a", - "destination_type": "R", - "test": { - "type": "subflow", - "exit_type": "completed" - }, - "label": null - }, - { - "uuid": "288dfab6-5171-4cf0-92af-e73af44dbeee", - "category": { - "eng": "Expired" - }, - "destination": "e5dae061-2c94-45ae-a3bb-4822989e636a", - "destination_type": "R", - "test": { - "type": "subflow", - "exit_type": "expired" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "subflow", - "response_type": "", - "operand": "@step.value", - "config": { - "flow": { - "name": "Migrate to 11.10 SMS Child", - "uuid": "a492288a-7b26-4507-b8db-173d28b83ad0" - } - } - }, - { - "uuid": "e5dae061-2c94-45ae-a3bb-4822989e636a", - "x": 218, - "y": 228, - "label": "Response 2", - "rules": [ - { - "uuid": "b9f763d2-82d7-4334-8ed8-806b803d32c1", - "category": { - "eng": "Completed" - }, - "destination": "bbd1c25f-ab01-4539-8f3e-b0ca18f366f4", - "destination_type": "A", - "test": { - "type": "subflow", - "exit_type": "completed" - }, - "label": null - }, - { - "uuid": "54b51a30-8c52-49aa-afc1-24d827a17a8d", - "category": { - "eng": "Expired" - }, - "destination": "62e29de4-d85e-459d-ad38-220d1048b714", - "destination_type": "A", - "test": { - "type": "subflow", - "exit_type": "expired" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "subflow", - "response_type": "", - "operand": "@step.value", - "config": { - "flow": { - "name": "Migrate to 11.10 IVR Child", - "uuid": "5331c09c-2bd6-47a5-ac0d-973caf9d4cb5" - } - } - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.9", - "metadata": { - "name": "Migrate to 11.10 Parent", - "saved_on": "2019-01-28T19:51:28.310305Z", - "revision": 52, - "uuid": "880cea73-fab6-4353-9db2-bf2e16067941", - "expires": 10080 - } - }, - { - "entry": "762fb8ad-1ec5-4246-a577-e08f0fe497e5", - "action_sets": [ - { - "uuid": "762fb8ad-1ec5-4246-a577-e08f0fe497e5", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "69a7f227-5f44-4ddc-80e1-b9dd855868eb", - "msg": { - "eng": "I'm just a regular honest messaging flow" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "8ec7a5ed-675c-4102-b211-ea10258ac5f9" - } - ], - "rule_sets": [], - "base_language": "eng", - "flow_type": "M", - "version": "11.9", - "metadata": { - "name": "Migrate to 11.10 SMS Child", - "saved_on": "2019-01-28T19:03:29.579743Z", - "revision": 2, - "uuid": "a492288a-7b26-4507-b8db-173d28b83ad0", - "expires": 10080, - "ivr_retry_failed_events": null - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_11.json b/media/test_flows/migrate_to_11_11.json deleted file mode 100644 index 9a41dc555db..00000000000 --- a/media/test_flows/migrate_to_11_11.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "version": "11.10", - "site": "https://textit.in", - "flows": [ - { - "entry": "22505d46-43c5-42ba-975e-725c01ea440f", - "action_sets": [ - { - "uuid": "22505d46-43c5-42ba-975e-725c01ea440f", - "x": 100, - "y": 0, - "destination": "f3a1a671-5f5b-489e-9410-9a09fa5eaafb", - "actions": [ - { - "type": "reply", - "uuid": "27dfd8ac-55c5-49c9-88e3-3fb84a9894ff", - "msg": { - "eng": "Hey" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "6e2b09ec-3cc0-4ee6-ae7b-b76bad3ab6d3" - }, - { - "uuid": "f3a1a671-5f5b-489e-9410-9a09fa5eaafb", - "x": 95, - "y": 101, - "destination": "78c20ee4-94bd-45e6-8510-8e602568fb6e", - "actions": [ - { - "type": "add_label", - "uuid": "bc82c11d-7654-44e4-966c-fb39e2851df0", - "labels": [ - { - "uuid": "0bfecd01-9612-48ab-8c49-72170de6ee49", - "name": "Hello" - } - ] - } - ], - "exit_uuid": "84bf44a1-13fd-44cb-8014-d6feb06e010f" - }, - { - "uuid": "7ca2b0ef-0b23-4c6e-bccb-c5f2d62d2663", - "x": 146, - "y": 358, - "destination": null, - "actions": [ - { - "type": "add_label", - "uuid": "910bf3b5-951f-47a8-93df-11a6eac8bf0f", - "labels": [ - { - "uuid": "0bfecd01-9612-48ab-8c49-72170de6ee49", - "name": "Hello" - } - ] - } - ], - "exit_uuid": "6d579c28-9f3f-4584-bd2e-74009612fdbb" - } - ], - "rule_sets": [ - { - "uuid": "78c20ee4-94bd-45e6-8510-8e602568fb6e", - "x": 85, - "y": 219, - "label": "Response 1", - "rules": [ - { - "uuid": "33438bbf-49bd-4468-9a74-bbd7e1f58f57", - "category": { - "eng": "All Responses" - }, - "destination": "7ca2b0ef-0b23-4c6e-bccb-c5f2d62d2663", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "", - "operand": "@step.value", - "config": {} - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.10", - "metadata": { - "name": "Add Label", - "saved_on": "2019-02-12T09:23:05.746930Z", - "revision": 7, - "uuid": "e9b5b8ba-43f4-4bc2-a790-811ee1cfe392", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_12.json b/media/test_flows/migrate_to_11_12.json deleted file mode 100644 index 142c3151dbe..00000000000 --- a/media/test_flows/migrate_to_11_12.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "version": "11.12", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "456b7f83-a96b-4f17-aa0a-116a30ee0d52", - "action_sets": [ - { - "uuid": "456b7f83-a96b-4f17-aa0a-116a30ee0d52", - "x": 100, - "y": 0, - "destination": "cfea15b5-3761-41d0-ad3e-33df7a9b835a", - "actions": [ - { - "type": "channel", - "uuid": "338300e8-b433-4372-8a12-87a0f543ee8a", - "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", - "name": "Android: 1234" - } - ], - "exit_uuid": "6fb525e7-bc24-4358-acde-f2d712b28f2b" - }, - { - "uuid": "cfea15b5-3761-41d0-ad3e-33df7a9b835a", - "x": 114, - "y": 156, - "destination": "3bb1fb6d-f0a3-4ec7-abba-cc5fac4c6a9d", - "actions": [ - { - "type": "reply", - "uuid": "bbdd28f0-824f-41b4-af25-5d6f9a4afefb", - "msg": { - "base": "Hey there, Yes or No?" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "902db0bc-f6a7-45d2-93b2-f47f3af1261e" - }, - { - "uuid": "af882e66-9ae2-4bc1-9af7-c8c2e7373766", - "x": 181, - "y": 452, - "destination": "85d88c16-fafe-4b8e-8e58-a6dc6e1e0e77", - "actions": [ - { - "type": "channel", - "uuid": "437d71a2-bb17-4e71-bef7-ad6b58f0eb85", - "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", - "name": "Android: 1234" - } - ], - "exit_uuid": "cec84721-7f8f-43c3-9af2-4d5d6a15f9de" - }, - { - "uuid": "76e091fe-62a5-4786-9465-7c1fb2446694", - "x": 460, - "y": 117, - "destination": "ef9afd2d-d106-4168-a104-20ddc14f9444", - "actions": [ - { - "type": "reply", - "uuid": "f7d12748-440e-4ef1-97d4-8a9efddf4454", - "msg": { - "base": "Yo, What? Repeat Yes or No" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "f5ce0ce5-8023-4b8d-b635-762a2c18726f" - }, - { - "uuid": "9eef8677-8598-4e87-9e21-3ad245d87aee", - "x": 193, - "y": 633, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "1d3ec932-6b6f-45c2-b4d6-9a0e07721686", - "msg": { - "base": "Bye" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "839dd7c4-64b9-428f-b1d0-c386f493fc4f" - }, - { - "uuid": "85d88c16-fafe-4b8e-8e58-a6dc6e1e0e77", - "x": 173, - "y": 550, - "destination": "9eef8677-8598-4e87-9e21-3ad245d87aee", - "actions": [ - { - "type": "channel", - "uuid": "0afa546d-8308-41c2-a70c-979846108bec", - "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", - "name": "Android: 1234" - } - ], - "exit_uuid": "835a5ca9-d518-452f-865c-ca8e5cde4777" - }, - { - "uuid": "ef9afd2d-d106-4168-a104-20ddc14f9444", - "x": 501, - "y": 242, - "destination": "3bb1fb6d-f0a3-4ec7-abba-cc5fac4c6a9d", - "actions": [ - { - "type": "channel", - "uuid": "28d63382-40ea-4741-ba3a-2930348fab0e", - "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", - "name": "Android: 1234" - } - ], - "exit_uuid": "be8ca9a5-0f61-4c9d-93e4-02aa6bb27afc" - } - ], - "rule_sets": [ - { - "uuid": "3bb1fb6d-f0a3-4ec7-abba-cc5fac4c6a9d", - "x": 134, - "y": 315, - "label": "Response 1", - "rules": [ - { - "uuid": "2924a1d0-be47-4f8e-aefb-f7ff3a563a43", - "category": { - "base": "Yes" - }, - "destination": "af882e66-9ae2-4bc1-9af7-c8c2e7373766", - "destination_type": "A", - "test": { - "type": "contains_any", - "test": { - "base": "Yes" - } - }, - "label": null - }, - { - "uuid": "0107f9e4-b46c-40d7-b25b-058cac3a167e", - "category": { - "base": "No" - }, - "destination": "af882e66-9ae2-4bc1-9af7-c8c2e7373766", - "destination_type": "A", - "test": { - "type": "contains_any", - "test": { - "base": "No" - } - }, - "label": null - }, - { - "uuid": "ad81cc6d-1973-4eed-b97d-6edd9ebdeedc", - "category": { - "base": "Other" - }, - "destination": "76e091fe-62a5-4786-9465-7c1fb2446694", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "", - "operand": "@step.value", - "config": {} - } - ], - "base_language": "base", - "flow_type": "M", - "version": "11.12", - "metadata": { - "name": "channels", - "saved_on": "2019-02-26T21:16:32.055957Z", - "revision": 24, - "uuid": "e5fdf453-428f-4da1-9703-0decdf7cf6f9", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_12_one_node.json b/media/test_flows/migrate_to_11_12_one_node.json deleted file mode 100644 index 9bf4eedd68d..00000000000 --- a/media/test_flows/migrate_to_11_12_one_node.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": "11.11", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "b0b6559d-e5bd-4deb-a4ab-9e5f04001dd4", - "action_sets": [ - { - "uuid": "b0b6559d-e5bd-4deb-a4ab-9e5f04001dd4", - "x": 100, - "y": 0, - "actions": [ - { - "type": "channel", - "uuid": "4b34b85d-da31-40c9-af65-6d76ca54b1b5", - "channel": "228cc824-6740-482a-ac2f-4f08ca449e06", - "name": "Android: 1234" - } - ], - "exit_uuid": "be37f250-f992-45e0-97fd-a3c0f57584dc" - } - ], - "rule_sets": [], - "base_language": "base", - "flow_type": "M", - "version": "11.11", - "metadata": { - "name": "channel", - "saved_on": "2019-02-28T08:55:17.275670Z", - "revision": 2, - "uuid": "8a8612bc-ff3a-45ea-b7a5-2673ce901cd9", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_12_other_org.json b/media/test_flows/migrate_to_11_12_other_org.json deleted file mode 100644 index 7deb686c5bd..00000000000 --- a/media/test_flows/migrate_to_11_12_other_org.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "version": "11.11", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "a1c00b3e-a904-4085-851d-e5e386d728b8", - "action_sets": [{ - "uuid": "a1c00b3e-a904-4085-851d-e5e386d728b8", - "x": 124, - "y": 16, - "actions": [{ - "type": "channel", - "channel": "CHANNEL-UUID", - "uuid": "84889e4d-e7e8-4415-9ad9-db27d9972558", - "name": "Not Ours" - }], - "exit_uuid": "eada09b7-7136-4f24-a34f-62ca7b404423" - }], - "rule_sets": [], - "base_language": "eng", - "flow_type": "M", - "version": "11.11", - "metadata": { - "name": "Other Org Channel", - "saved_on": "2019-02-25T20:36:14.155001Z", - "revision": 19, - "uuid": "bb8ca54b-7dcb-431f-bd86-ec3082b63469", - "expires": 43200, - "ivr_retry_failed_events": null, - "notes": [] - }, - "type": "M" -} - ] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_3.json b/media/test_flows/migrate_to_11_3.json deleted file mode 100644 index ea6a22c7fc5..00000000000 --- a/media/test_flows/migrate_to_11_3.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "version": "11.2", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", - "action_sets": [ - { - "uuid": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", - "x": 412, - "y": 814, - "destination": null, - "actions": [ - { - "type": "api", - "uuid": "9b46779a-f680-450f-8f3c-005f3b7efccd", - "webhook": "http://example.com/?thing=@flow.response_1&foo=bar", - "action": "POST", - "webhook_headers": [] - } - ], - "exit_uuid": "25d8d2ae-ea82-4214-9561-42e0bf420a93" - } - ], - "rule_sets": [ - { - "uuid": "2831f7ad-23e6-4ab3-91d9-936f14fcf35e", - "x": 100, - "y": 0, - "label": "Response 1", - "rules": [ - { - "uuid": "c799def9-345b-46f9-a838-a59191cdb181", - "category": { - "eng": "Success" - }, - "destination": "7e0afb0a-8ca2-479f-8f72-49f8c1081d60", - "destination_type": "R", - "test": { - "type": "webhook_status", - "status": "success" - }, - "label": null - }, - { - "uuid": "1ace9344-3053-4dc2-aced-9a6e3c8a6e9d", - "category": { - "eng": "Failure" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "webhook_status", - "status": "failure" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "webhook", - "response_type": "", - "operand": "@step.value", - "config": { - "webhook": "http://example.com/webhook1", - "webhook_action": "POST", - "webhook_headers": [] - } - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.2", - "metadata": { - "name": "Migrate to 11.3 Test", - "saved_on": "2018-09-25T14:57:23.429081Z", - "revision": 97, - "uuid": "915144c5-605e-46f3-afa3-53aae2c9b8ee", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_4.json b/media/test_flows/migrate_to_11_4.json deleted file mode 100644 index 9a89c6fdf88..00000000000 --- a/media/test_flows/migrate_to_11_4.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "version": "11.3", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "019d0fab-eb51-4431-9f51-ddf207d0a744", - "action_sets": [ - { - "uuid": "92fb739f-4a99-4e29-8078-1f8fb06d127e", - "x": 241, - "y": 425, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "0382e5aa-bfda-42c8-84d3-7893aba002f8", - "msg": { - "eng": "@flow.response_1.text\n@flow.response_2.text\n@flow.response_3.text\n@flow.response_3\n@(CONCATENATE(flow.response_2.text, \"blerg\"))" - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "send", - "uuid": "b5860896-db39-4ebb-b842-d38edf46fb61", - "msg": { - "eng": "@flow.response_1.text\n@flow.response_2.text\n@flow.response_3.text\n@flow.response_3\n@(CONCATENATE(flow.response_2.text, \"blerg\"))" - }, - "contacts": [ - { - "id": 277738, - "name": "05fe51bf5a434b9", - "uuid": "74eed75b-dd4f-4d24-9fc5-474052dbc086", - "urns": [ - { - "scheme": "tel", - "path": "+2353265262", - "priority": 90 - } - ] - } - ], - "groups": [], - "variables": [], - "media": {} - }, - { - "type": "email", - "uuid": "c9130ab6-d2b2-419c-8109-65b5afc47039", - "emails": [ - "test@test.com" - ], - "subject": "Testing", - "msg": "@flow.response_1.text\n@flow.response_2.text\n@flow.response_3.text\n@flow.response_3\n@(CONCATENATE(flow.response_2.text, \"blerg\"))" - } - ], - "exit_uuid": "ea5640be-105b-4277-b04e-7ad55d2c898e" - } - ], - "rule_sets": [ - { - "uuid": "019d0fab-eb51-4431-9f51-ddf207d0a744", - "x": 226, - "y": 118, - "label": "Response 1", - "rules": [ - { - "uuid": "7fd3aae5-66ca-4d8d-9923-3ef4424e7658", - "category": { - "eng": "All Responses" - }, - "destination": "fc1b062c-52c0-4c9e-87bd-1f9437d513bf", - "destination_type": "R", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "", - "operand": "@step.value", - "config": {} - }, - { - "uuid": "fc1b062c-52c0-4c9e-87bd-1f9437d513bf", - "x": 226, - "y": 232, - "label": "Response 2", - "rules": [ - { - "uuid": "58a4e6f6-fe44-4ac9-bf98-edffd6dfad04", - "category": { - "eng": "All Responses" - }, - "destination": "518b6f12-0192-4a75-8900-43a5dea02340", - "destination_type": "R", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "expression", - "response_type": "", - "operand": "@contact.uuid", - "config": {} - }, - { - "uuid": "518b6f12-0192-4a75-8900-43a5dea02340", - "x": 226, - "y": 335, - "label": "Response 3", - "rules": [ - { - "uuid": "0d1b5fd9-bfee-4df6-9837-9883787f0661", - "category": { - "eng": "Bucket 1" - }, - "destination": "92fb739f-4a99-4e29-8078-1f8fb06d127e", - "destination_type": "A", - "test": { - "type": "between", - "min": "0", - "max": "0.5" - }, - "label": null - }, - { - "uuid": "561b7ce2-5975-4925-a76a-f4a618b11c8b", - "category": { - "eng": "Bucket 2" - }, - "destination": "92fb739f-4a99-4e29-8078-1f8fb06d127e", - "destination_type": "A", - "test": { - "type": "between", - "min": "0.5", - "max": "1" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "random", - "response_type": "", - "operand": "@(RAND())", - "config": {} - } - ], - "base_language": "eng", - "flow_type": "F", - "version": "11.3", - "metadata": { - "name": "Migrate to 11.4", - "saved_on": "2018-06-25T21:58:04.000768Z", - "revision": 123, - "uuid": "025f1d6e-ec87-4045-8471-0a028b9483aa", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_5.json b/media/test_flows/migrate_to_11_5.json deleted file mode 100644 index 13725b4a54f..00000000000 --- a/media/test_flows/migrate_to_11_5.json +++ /dev/null @@ -1,398 +0,0 @@ -{ - "version": "11.4", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "2831f7ad-23e6-4ab3-91d9-936f14fcf35e", - "action_sets": [ - { - "uuid": "35707236-5dd6-487d-bea4-6a73822852bf", - "x": 122, - "y": 458, - "destination": "51956031-9f42-475f-9d43-3ab2f87f4dd2", - "actions": [ - { - "type": "reply", - "uuid": "c82df796-9d8f-4e9b-b76c-97027fa74ef7", - "msg": { - "eng": "@flow.response_1\n@flow.response_1.value\n@flow.response_1.category\n@(upper(flow.response_1))\n@(upper(flow.response_1.category))\n\n@flow.response_2\n@flow.response_2.value\n@flow.response_2.category\n@(upper(flow.response_2))\n@(upper(flow.response_2.category))\n\n@flow.response_3\n@flow.response_3.value\n@flow.response_3.category\n@(upper(flow.response_3))\n@(upper(flow.response_3.category))" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "65af1dca-b48e-4b36-867c-2ace47038093" - }, - { - "uuid": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", - "x": 412, - "y": 814, - "destination": null, - "actions": [ - { - "type": "api", - "uuid": "9b46779a-f680-450f-8f3c-005f3b7efccd", - "webhook": "http://example.com/?thing=@flow.response_1&foo=bar", - "action": "GET", - "webhook_headers": [] - }, - { - "type": "save", - "uuid": "e0ecf2a5-0429-45ec-a9d7-e2c122274484", - "label": "Contact Name", - "field": "name", - "value": "@flow.response_3.value" - } - ], - "exit_uuid": "25d8d2ae-ea82-4214-9561-42e0bf420a93" - } - ], - "rule_sets": [ - { - "uuid": "2831f7ad-23e6-4ab3-91d9-936f14fcf35e", - "x": 100, - "y": 0, - "label": "Response 1", - "rules": [ - { - "uuid": "c799def9-345b-46f9-a838-a59191cdb181", - "category": { - "eng": "Success" - }, - "destination": "7e0afb0a-8ca2-479f-8f72-49f8c1081d60", - "destination_type": "R", - "test": { - "type": "webhook_status", - "status": "success" - }, - "label": null - }, - { - "uuid": "1ace9344-3053-4dc2-aced-9a6e3c8a6e9d", - "category": { - "eng": "Failure" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "webhook_status", - "status": "failure" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "webhook", - "response_type": "", - "operand": "@step.value", - "config": { - "webhook": "http://example.com/webhook1", - "webhook_action": "GET", - "webhook_headers": [] - } - }, - { - "uuid": "7e0afb0a-8ca2-479f-8f72-49f8c1081d60", - "x": 103, - "y": 125, - "label": "Response 2", - "rules": [ - { - "uuid": "ce50f51d-f052-4ff1-8a9b-a79faa62dfc2", - "category": { - "eng": "Success" - }, - "destination": "5906c8f3-46f2-4319-8743-44fb26f2b109", - "destination_type": "R", - "test": { - "type": "webhook_status", - "status": "success" - }, - "label": null - }, - { - "uuid": "338e6c08-3597-4d22-beef-80d27b870a93", - "category": { - "eng": "Failure" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "webhook_status", - "status": "failure" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "webhook", - "response_type": "", - "operand": "@step.value", - "config": { - "webhook": "http://example.com/webhook2", - "webhook_action": "GET", - "webhook_headers": [] - } - }, - { - "uuid": "5906c8f3-46f2-4319-8743-44fb26f2b109", - "x": 105, - "y": 243, - "label": "Response 2", - "rules": [ - { - "uuid": "6328e346-49c6-4607-a573-e8dc6e60bfcd", - "category": { - "eng": "All Responses" - }, - "destination": "728a9a97-f28e-4fb3-a96a-7a7a8d5e5a4c", - "destination_type": "R", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "expression", - "response_type": "", - "operand": "@step.value", - "config": {} - }, - { - "uuid": "728a9a97-f28e-4fb3-a96a-7a7a8d5e5a4c", - "x": 112, - "y": 346, - "label": "Response 3", - "rules": [ - { - "uuid": "fb64dd04-8dd3-4e28-8607-468d1748a81f", - "category": { - "eng": "Success" - }, - "destination": "35707236-5dd6-487d-bea4-6a73822852bf", - "destination_type": "A", - "test": { - "type": "webhook_status", - "status": "success" - }, - "label": null - }, - { - "uuid": "992c7429-221a-40f0-80be-fd6fbe858f57", - "category": { - "eng": "Failure" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "webhook_status", - "status": "failure" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "resthook", - "response_type": "", - "operand": "@step.value", - "config": { - "resthook": "test-resthook-event" - } - }, - { - "uuid": "51956031-9f42-475f-9d43-3ab2f87f4dd2", - "x": 411, - "y": 513, - "label": "Response 5", - "rules": [ - { - "uuid": "c06fb4fe-09a0-4990-b32e-e233de7edfda", - "category": { - "eng": "All Responses" - }, - "destination": "f39a6d73-57d9-4d10-9055-57446addc87a", - "destination_type": "R", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "expression", - "response_type": "", - "operand": "@(flow.response_1 & flow.response_2 & flow.response_3)", - "config": {} - }, - { - "uuid": "f39a6d73-57d9-4d10-9055-57446addc87a", - "x": 414, - "y": 625, - "label": "Response 6", - "rules": [ - { - "uuid": "820f0020-0c72-44cd-9c12-a2b05c13e470", - "category": { - "eng": "Yes" - }, - "destination": "0e0c0e1f-e4ae-4531-ba19-48300de0f86d", - "destination_type": "R", - "test": { - "type": "contains_any", - "test": { - "eng": "yes" - } - }, - "label": null - }, - { - "uuid": "8e55e70f-acf0-45a2-b7f9-2f95ccbbfc4d", - "category": { - "eng": "Matching" - }, - "destination": "0e0c0e1f-e4ae-4531-ba19-48300de0f86d", - "destination_type": "R", - "test": { - "type": "contains_any", - "test": { - "eng": "@flow.response_1" - } - }, - "label": null - }, - { - "uuid": "d1c61a49-64f5-4ff6-b17f-1f22472f829f", - "category": { - "eng": "Other" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "flow_field", - "response_type": "", - "operand": "@flow.response_1", - "config": {} - }, - { - "uuid": "0e0c0e1f-e4ae-4531-ba19-48300de0f86d", - "x": 489, - "y": 722, - "label": "Response 7", - "rules": [ - { - "uuid": "234fff68-780f-442f-a1c6-757131fbc213", - "category": { - "eng": "Success" - }, - "destination": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", - "destination_type": "A", - "test": { - "type": "webhook_status", - "status": "success" - }, - "label": null - }, - { - "uuid": "70b79516-40a5-439c-9dee-45b242d6bb8b", - "category": { - "eng": "Failure" - }, - "destination": "ab700bd7-480b-4e34-bd59-5be7c453aa4e", - "destination_type": "A", - "test": { - "type": "webhook_status", - "status": "failure" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "webhook", - "response_type": "", - "operand": "@step.value", - "config": { - "webhook": "http://example.com/?thing=@flow.response_1.value", - "webhook_action": "GET", - "webhook_headers": [] - } - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.4", - "metadata": { - "name": "Migrate to 11.5 Test", - "saved_on": "2018-09-25T14:57:23.429081Z", - "revision": 97, - "uuid": "915144c5-605e-46f3-afa3-53aae2c9b8ee", - "expires": 10080, - "notes": [ - { - "x": 357, - "y": 0, - "title": "New Note", - "body": "@flow.response_1" - }, - { - "x": 358, - "y": 117, - "title": "New Note", - "body": "flow.response_2" - }, - { - "x": 358, - "y": 236, - "title": "New Note", - "body": "reuses flow.response_2" - }, - { - "x": 360, - "y": 346, - "title": "New Note", - "body": "@flow.response_3" - }, - { - "x": 671, - "y": 498, - "title": "New Note", - "body": "operand should be migrated too" - }, - { - "x": 717, - "y": 608, - "title": "New Note", - "body": "rule test should be migrated" - }, - { - "x": 747, - "y": 712, - "title": "New Note", - "body": "webhook URL in config should be migrated" - }, - { - "x": 681, - "y": 830, - "title": "New Note", - "body": "webhook URL on action should be migrated" - }, - { - "x": 682, - "y": 934, - "title": "New Note", - "body": "field value should be migrated" - } - ] - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_6.json b/media/test_flows/migrate_to_11_6.json deleted file mode 100644 index 64500d8117c..00000000000 --- a/media/test_flows/migrate_to_11_6.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "version": "11.5", - "site": "https://textit.in", - "flows": [ - { - "entry": "c4462613-5936-42cc-a286-82e5f1816793", - "action_sets": [ - { - "uuid": "eca0f1d7-59ef-4a7c-a4a9-9bbd049eb144", - "x": 76, - "y": 99, - "destination": "d21be990-5e48-4e4b-995f-c9df8f38e517", - "actions": [ - { - "type": "add_group", - "uuid": "feb7a33e-bc8b-44d8-9112-bc4e910fe304", - "groups": [ - { - "uuid": "1966e54a-fc30-4a96-81ea-9b0185b8b7de", - "name": "Cat Fanciers" - } - ] - }, - { - "type": "add_group", - "uuid": "ca82f0e0-43ca-426c-a77c-93cf297b8e7c", - "groups": [ - { - "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", - "name": "Catnado" - } - ] - }, - { - "type": "reply", - "uuid": "d57e9e9f-ada4-4a22-99ef-b8bf3dbcdcae", - "msg": { - "eng": "You are a cat fan! Purrrrr." - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "55f88a1e-73ad-4b6d-9a04-626046bbe5a8" - }, - { - "uuid": "ef389049-d2e3-4343-b91f-13ea2db5f943", - "x": 558, - "y": 94, - "destination": "d21be990-5e48-4e4b-995f-c9df8f38e517", - "actions": [ - { - "type": "del_group", - "uuid": "cea907a8-af81-49af-92e6-f246e52179fe", - "groups": [ - { - "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", - "name": "Catnado" - } - ] - }, - { - "type": "reply", - "uuid": "394a328f-f829-43f2-9975-fe2f27c8b786", - "msg": { - "eng": "You are not a cat fan. Hissssss." - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "9ba78afa-948e-44c5-992f-84030f2eaa6b" - }, - { - "uuid": "d21be990-5e48-4e4b-995f-c9df8f38e517", - "x": 319, - "y": 323, - "destination": "35416fea-787d-48c1-b839-76eca089ad2e", - "actions": [ - { - "type": "channel", - "uuid": "78c58574-9f91-4c27-855e-73eacc99c395", - "channel": "bd55bb31-8ed4-4f89-b903-7103aa3762be", - "name": "Telegram: TextItBot" - } - ], - "exit_uuid": "c86638a9-2688-47c9-83ec-7f10ef49de1e" - }, - { - "uuid": "35416fea-787d-48c1-b839-76eca089ad2e", - "x": 319, - "y": 468, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "30d35b8f-f439-482a-91b1-d3b1a4351071", - "msg": { - "eng": "All done." - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "send", - "uuid": "a7b6def8-d315-49bd-82e4-85887f39babe", - "msg": { - "eng": "Hey Cat Fans!" - }, - "contacts": [], - "groups": [ - { - "uuid": "47b1b36c-7736-47b9-b63a-c0ebfb610e61", - "name": "Cat Blasts" - } - ], - "variables": [], - "media": {} - }, - { - "type": "trigger-flow", - "uuid": "540965e5-bdfe-4416-b4dd-449220b1c588", - "flow": { - "uuid": "ef9603ff-3886-4e5e-8870-0f643b6098de", - "name": "Cataclysmic" - }, - "contacts": [], - "groups": [ - { - "uuid": "22a48356-71e9-4ae1-9f93-4021855c0bd5", - "name": "Cat Alerts" - } - ], - "variables": [] - } - ], - "exit_uuid": "f2ef5066-434d-42bc-a5cb-29c59e51432f" - } - ], - "rule_sets": [ - { - "uuid": "c4462613-5936-42cc-a286-82e5f1816793", - "x": 294, - "y": 0, - "label": "Response 1", - "rules": [ - { - "uuid": "17d69564-60c9-4a56-be8b-34e98a2ce14a", - "category": { - "eng": "Cat Facts" - }, - "destination": "eca0f1d7-59ef-4a7c-a4a9-9bbd049eb144", - "destination_type": "A", - "test": { - "type": "in_group", - "test": { - "name": "Cat Facts", - "uuid": "c7bc1eef-b7aa-4959-ab90-3e33e0d3b1f9" - } - }, - "label": null - }, - { - "uuid": "a9ec4d0a-2ddd-4a13-a1d2-c63ce9916a04", - "category": { - "eng": "Other" - }, - "destination": "ef389049-d2e3-4343-b91f-13ea2db5f943", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "group", - "response_type": "", - "operand": "@step.value", - "config": {} - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.5", - "metadata": { - "name": "Cataclysmic", - "saved_on": "2018-10-18T17:03:54.835916Z", - "revision": 49, - "uuid": "ef9603ff-3886-4e5e-8870-0f643b6098de", - "expires": 10080, - "notes": [] - } - }, - { - "entry": "0429d1f9-82ed-4198-80a2-3b213aa11fd5", - "action_sets": [ - { - "uuid": "0429d1f9-82ed-4198-80a2-3b213aa11fd5", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "add_group", - "uuid": "11f61fc6-834e-4cbc-88ee-c834279345e6", - "groups": [ - { - "uuid": "22a48356-71e9-4ae1-9f93-4021855c0bd5", - "name": "Cat Alerts" - }, - { - "uuid": "c7bc1eef-b7aa-4959-ab90-3e33e0d3b1f9", - "name": "Cat Facts" - }, - { - "uuid": "47b1b36c-7736-47b9-b63a-c0ebfb610e61", - "name": "Cat Blasts" - }, - { - "uuid": "1966e54a-fc30-4a96-81ea-9b0185b8b7de", - "name": "Cat Fanciers" - }, - { - "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", - "name": "Catnado" - } - ] - } - ], - "exit_uuid": "029a7c9d-c935-4ed1-9573-543ded29d954" - } - ], - "rule_sets": [], - "base_language": "eng", - "flow_type": "M", - "version": "11.5", - "metadata": { - "name": "Catastrophe", - "saved_on": "2018-10-18T19:03:07.702388Z", - "revision": 1, - "uuid": "d6dd96b1-d500-4c7a-9f9c-eae3f2a2a7c5", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_7.json b/media/test_flows/migrate_to_11_7.json deleted file mode 100644 index 7598f82934d..00000000000 --- a/media/test_flows/migrate_to_11_7.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "version": "11.6", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "eb59aed8-2eeb-43cd-adfc-9c44721436a2", - "action_sets": [ - { - "uuid": "eb59aed8-2eeb-43cd-adfc-9c44721436a2", - "x": 102, - "y": 0, - "destination": "cd2d8a3e-c267-40ef-8481-37d4076a57d3", - "actions": [ - { - "type": "api", - "uuid": "82d23a8c-af4b-4a33-8d56-03139b1168cc", - "webhook": "http://example.com/hook1", - "action": "GET", - "webhook_headers": [ - { - "name": "Header1", - "value": "Value1" - } - ] - } - ], - "exit_uuid": "787517ce-9a6d-479e-bc81-c3f4dcbb3d1d" - }, - { - "uuid": "cd2d8a3e-c267-40ef-8481-37d4076a57d3", - "x": 149, - "y": 107, - "destination": "efe05d14-7a96-4ec5-870c-5183408821ae", - "actions": [ - { - "type": "reply", - "uuid": "544fd45b-f9a9-4543-b352-06b67dc0c32c", - "msg": { - "eng": "Action before 1" - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "reply", - "uuid": "252b59b0-3664-4a36-8b9f-9317e78011da", - "msg": { - "eng": "Action before 2" - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "api", - "uuid": "55c868c0-f6f7-49a8-856c-809bd082ae3b", - "webhook": "http://example.com/hook2", - "action": "POST", - "webhook_headers": [] - }, - { - "type": "reply", - "uuid": "f7ec546c-9adf-4d51-ab8e-8a1cbde8d910", - "msg": { - "eng": "Action after 1" - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "reply", - "uuid": "a44ec0b8-085d-4e80-b361-7529e659e5e6", - "msg": { - "eng": "Action after 2" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "32c5dba9-17d1-4d5d-a992-19c1ec6cf825" - }, - { - "uuid": "efe05d14-7a96-4ec5-870c-5183408821ae", - "x": 199, - "y": 446, - "destination": "b5ea564c-4acd-4ce4-aeff-37e5c73047e7", - "actions": [ - { - "type": "api", - "uuid": "05377f3c-d9b0-428d-ae14-219d2f3d0f9a", - "webhook": "http://example.com/hook3", - "action": "GET", - "webhook_headers": [] - }, - { - "type": "api", - "uuid": "61fadf6d-d2ba-4bbb-b312-1db3e336a661", - "webhook": "http://example.com/hook4", - "action": "GET", - "webhook_headers": [] - } - ], - "exit_uuid": "c2236afe-c3cb-43a5-9fa0-ee6cbfb92f42" - }, - { - "uuid": "b5ea564c-4acd-4ce4-aeff-37e5c73047e7", - "x": 245, - "y": 608, - "destination": "64d8b8a5-aca0-4406-b417-5827262e67e2", - "actions": [ - { - "type": "reply", - "uuid": "be4dbed8-7334-4700-a94d-50275015c048", - "msg": { - "eng": "Actionset without webhook" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "40b890ab-8fab-459f-8d5e-48d2ea57f7ce" - }, - { - "uuid": "d6da8268-0c61-4154-8659-dd073878541c", - "x": 1036, - "y": 265, - "destination": null, - "actions": [ - { - "type": "api", - "uuid": "b8a8715b-0fb5-4dde-a1fe-4fef045bb16c", - "webhook": "http://example.com/hook5", - "action": "GET", - "webhook_headers": [] - } - ], - "exit_uuid": "15170baf-8b15-4104-990c-13635f0bafbb" - } - ], - "rule_sets": [ - { - "uuid": "64d8b8a5-aca0-4406-b417-5827262e67e2", - "x": 673, - "y": 54, - "label": "Response 1", - "rules": [ - { - "uuid": "4bc64a60-b848-4f07-bbe8-8b82e72b6dea", - "category": { - "eng": "1" - }, - "destination": "eb59aed8-2eeb-43cd-adfc-9c44721436a2", - "destination_type": "A", - "test": { - "type": "contains_any", - "test": { - "eng": "1" - } - }, - "label": null - }, - { - "uuid": "2faff885-6ac4-4cef-bd11-53802be22508", - "category": { - "eng": "2" - }, - "destination": "cd2d8a3e-c267-40ef-8481-37d4076a57d3", - "destination_type": "A", - "test": { - "type": "contains_any", - "test": { - "eng": "2" - } - }, - "label": null - }, - { - "uuid": "05efb767-1319-4f93-ba3f-8d3860a915af", - "category": { - "eng": "3" - }, - "destination": "efe05d14-7a96-4ec5-870c-5183408821ae", - "destination_type": "A", - "test": { - "type": "contains_any", - "test": { - "eng": "3" - } - }, - "label": null - }, - { - "uuid": "2bfbb15e-fb54-41a5-ba43-c67c219e8c57", - "category": { - "eng": "4" - }, - "destination": "b5ea564c-4acd-4ce4-aeff-37e5c73047e7", - "destination_type": "A", - "test": { - "type": "contains_any", - "test": { - "eng": "4" - } - }, - "label": null - }, - { - "uuid": "d091ea29-07b9-48b8-bc52-1de00687af1b", - "category": { - "eng": "Other" - }, - "destination": "d6da8268-0c61-4154-8659-dd073878541c", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "", - "operand": "@step.value", - "config": {} - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.6", - "metadata": { - "name": "Webhook Action Migration", - "saved_on": "2018-11-05T19:21:37.062932Z", - "revision": 61, - "uuid": "c9b9d79a-93b4-41e5-8ca3-f0b09faa2457", - "expires": 10080, - "notes": [] - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_11_8.json b/media/test_flows/migrate_to_11_8.json deleted file mode 100644 index 8f51778859f..00000000000 --- a/media/test_flows/migrate_to_11_8.json +++ /dev/null @@ -1,341 +0,0 @@ -{ - "version": 11.7, - "site": null, - "flows": [ - { - "entry": "fde99613-a3e9-4f97-9e88-81ebc0ea6211", - "action_sets": [ - { - "uuid": "788064a1-fe23-4f6e-8041-200412dff55e", - "x": 389, - "y": 991, - "destination": "d8be5901-e847-4b6f-a603-51eb571718a1", - "actions": [ - { - "type": "reply", - "uuid": "fdee102d-5259-4153-8e43-0b7df1d3a1ee", - "msg": { - "base": "Thanks @extra.name, we'll be in touch ASAP about order # @extra.order." - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "email", - "uuid": "66c4a60f-3d63-4eed-bd03-c801baa0d793", - "emails": [ - "rowanseymour@gmail.com" - ], - "subject": "Order Comment: @flow.lookup: @extra.order", - "msg": "Customer @extra.name has a problem with their order @extra.order for @extra.description. Please look into it ASAP and call them back with the status.\n \nCustomer Comment: \"@flow.comment\"\nCustomer Name: @extra.name\nCustomer Phone: @contact.tel " - } - ], - "exit_uuid": "b193a69a-d5d9-423a-9f1f-0ad51847a075" - }, - { - "uuid": "1bdc3242-ef13-4c1b-a3b1-11554bffff7a", - "x": 612, - "y": 574, - "destination": "691e8175-f6a1-45b3-b377-c8bda223e52b", - "actions": [ - { - "type": "reply", - "uuid": "fc90459d-243c-4207-a26b-258e2c42cff3", - "msg": { - "base": "Uh oh @extra.name! Our record indicate that your order for @extra.description was cancelled on @extra.cancel_date. If you think this is in error, please reply with a comment and our orders department will get right on it!" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "7e943c3d-b560-436f-bd7e-5c52e9162254" - }, - { - "uuid": "601c7150-7a3e-40aa-8f79-92f936e17cf9", - "x": 389, - "y": 572, - "destination": "691e8175-f6a1-45b3-b377-c8bda223e52b", - "actions": [ - { - "type": "reply", - "uuid": "459ed2db-9921-4326-87a1-5157e0a9b38a", - "msg": { - "base": "Hi @extra.name. Hope you are patient because we haven't shipped your order for @extra.description yet. We expect to ship it by @extra.ship_date though. If you have any questions, just reply and our customer service department will be notified." - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "5747ab91-d20c-4fff-8246-9d29a6ef1511" - }, - { - "uuid": "f87e2df4-5cbb-4961-b3c9-41eed35f8dbe", - "x": 167, - "y": 572, - "destination": "691e8175-f6a1-45b3-b377-c8bda223e52b", - "actions": [ - { - "type": "reply", - "uuid": "661ac1e4-2f13-48b1-adcf-0ff151833a86", - "msg": { - "base": "Great news @extra.name! We shipped your order for @extra.description on @extra.ship_date and we expect it will be delivered on @extra.delivery_date. If you have any questions, just reply and our customer service department will be notified." - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "aee36df6-a421-43b9-be55-a4a298c35f86" - }, - { - "uuid": "81c3ff98-3552-4962-ab05-8f7948ebac24", - "x": 787, - "y": 99, - "destination": "659f67c6-cf6d-4d43-bd64-a50318fd5168", - "actions": [ - { - "type": "reply", - "uuid": "7645e8cd-34a1-44d0-8b11-7f4f06bd5ac7", - "msg": { - "base": "Sorry that doesn't look like a valid order number. Maybe try: CU001, CU002 or CU003?" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "b6e7b7f2-88e5-4457-ba7b-6edb9fb81d9f" - }, - { - "uuid": "fde99613-a3e9-4f97-9e88-81ebc0ea6211", - "x": 409, - "y": 0, - "destination": "659f67c6-cf6d-4d43-bd64-a50318fd5168", - "actions": [ - { - "type": "reply", - "uuid": "c007a761-85c7-48eb-9b38-8d056d1d44ee", - "msg": { - "base": "Thanks for contacting the ThriftShop order status system. Please send your order # and we'll help you in a jiffy!" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "0a300e24-c7fa-473d-b06e-2826fa25b447" - } - ], - "rule_sets": [ - { - "uuid": "691e8175-f6a1-45b3-b377-c8bda223e52b", - "x": 389, - "y": 875, - "label": "Comment", - "rules": [ - { - "uuid": "567cac39-5ee4-4dac-b29a-97dfef2a2eb1", - "category": { - "base": "All Responses" - }, - "destination": "788064a1-fe23-4f6e-8041-200412dff55e", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "O", - "operand": "@step.value", - "config": {} - }, - { - "uuid": "659f67c6-cf6d-4d43-bd64-a50318fd5168", - "x": 356, - "y": 198, - "label": "Lookup Response", - "rules": [ - { - "uuid": "24b3a3a5-1ce8-45d4-87e5-0fa0159a9cab", - "category": { - "base": "All Responses" - }, - "destination": "541382fd-e897-4f77-b468-1f2c7bacf30c", - "destination_type": "R", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "C", - "operand": "@step.value", - "config": {} - }, - { - "uuid": "d8be5901-e847-4b6f-a603-51eb571718a1", - "x": 389, - "y": 1252, - "label": "Extra Comments", - "rules": [ - { - "uuid": "bba334ec-321e-4ead-8d1d-f34d7bc983ad", - "category": { - "base": "All Responses" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "O", - "operand": "@step.value", - "config": {} - }, - { - "uuid": "726f6b34-d6be-46fa-8061-bf1f081b15ce", - "x": 356, - "y": 398, - "label": "Lookup", - "rules": [ - { - "uuid": "d26ac82f-90dc-4f95-b105-7d3ca4effc20", - "category": { - "base": "Shipped" - }, - "destination": "f87e2df4-5cbb-4961-b3c9-41eed35f8dbe", - "destination_type": "A", - "test": { - "type": "contains", - "test": { - "base": "Shipped" - } - }, - "label": null - }, - { - "uuid": "774e6911-cb63-4700-99bc-5e16966393b8", - "category": { - "base": "Pending" - }, - "destination": "601c7150-7a3e-40aa-8f79-92f936e17cf9", - "destination_type": "A", - "test": { - "type": "contains", - "test": { - "base": "Pending" - } - }, - "label": null - }, - { - "uuid": "fee4858c-2545-435b-ae65-d9e6b8f8d106", - "category": { - "base": "Cancelled" - }, - "destination": "1bdc3242-ef13-4c1b-a3b1-11554bffff7a", - "destination_type": "A", - "test": { - "type": "contains", - "test": { - "base": "Cancelled" - } - }, - "label": null - }, - { - "uuid": "24b3a3a5-1ce8-45d4-87e5-0fa0159a9cab", - "category": { - "base": "Other" - }, - "destination": "81c3ff98-3552-4962-ab05-8f7948ebac24", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "expression", - "response_type": "", - "operand": "@extra.status", - "config": {} - }, - { - "uuid": "541382fd-e897-4f77-b468-1f2c7bacf30c", - "x": 356, - "y": 298, - "label": "Lookup Webhook", - "rules": [ - { - "uuid": "24b3a3a5-1ce8-45d4-87e5-0fa0159a9cab", - "category": { - "base": "Success" - }, - "destination": "726f6b34-d6be-46fa-8061-bf1f081b15ce", - "destination_type": "R", - "test": { - "type": "webhook_status", - "status": "success" - }, - "label": null - }, - { - "uuid": "008f4050-7979-42d5-a2cb-d1b4f6bc144f", - "category": { - "base": "Failure" - }, - "destination": "726f6b34-d6be-46fa-8061-bf1f081b15ce", - "destination_type": "R", - "test": { - "type": "webhook_status", - "status": "failure" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "webhook", - "response_type": "", - "operand": "@step.value", - "config": { - "webhook": "https://textit.in/demo/status/", - "webhook_action": null - } - } - ], - "base_language": "base", - "flow_type": "M", - "version": "11.7", - "metadata": { - "notes": [ - { - "body": "This flow demonstrates looking up an order using a webhook and giving the user different options based on the results. After looking up the order the user has the option to send additional comments which are forwarded to customer support representatives.\n\nUse order numbers CU001, CU002 or CU003 to see the different cases in action.", - "x": 59, - "y": 0, - "title": "Using Your Own Data" - } - ], - "saved_on": "2019-01-09T18:29:40.288510Z", - "uuid": "3825c65e-5aa8-4619-8de9-963f68483cb3", - "name": "Sample Flow - Order Status Checker", - "revision": 11, - "expires": 720 - } - } - ] -} diff --git a/media/test_flows/migrate_to_11_9.json b/media/test_flows/migrate_to_11_9.json deleted file mode 100644 index b889215b9ba..00000000000 --- a/media/test_flows/migrate_to_11_9.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "version": "11.8", - "site": "https://app.rapidpro.io", - "flows": [ - { - "entry": "edea0cb4-00b9-4a53-a923-f4aa38cf18c5", - "action_sets": [ - { - "uuid": "edea0cb4-00b9-4a53-a923-f4aa38cf18c5", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "0b6745ce-6d8b-40d4-bb4f-f18f407bdcdf", - "msg": { - "base": "hi valid" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "d79e8a16-62df-4b48-aff9-fae2633f2b77" - } - ], - "rule_sets": [], - "base_language": "base", - "flow_type": "M", - "version": "11.8", - "metadata": { - "name": "Valid1", - "saved_on": "2018-12-17T12:08:54.146452Z", - "revision": 2, - "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3", - "expires": 10080, - "ivr_retry_failed_events": null - } - }, - { - "entry": "d3e2b506-50cd-4c1e-9573-295bd2087258", - "action_sets": [ - { - "uuid": "d3e2b506-50cd-4c1e-9573-295bd2087258", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "d17b512e-87ed-4717-9461-bc2ffde23b77", - "msg": { - "base": "Hi flow invalid 1" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "c231d9a6-3b53-4670-ac41-247736126ffd" - } - ], - "rule_sets": [], - "base_language": "base", - "flow_type": "M", - "version": "11.8", - "metadata": { - "name": "Invalid1", - "saved_on": "2018-12-17T12:09:52.155509Z", - "revision": 2, - "uuid": "ad40071e-a665-4df3-af14-0bc0fe589244", - "expires": 10080, - "ivr_retry_failed_events": null - } - }, - { - "entry": "932b19a7-245c-4a2b-9249-66d4eb7cfdf7", - "action_sets": [ - { - "uuid": "932b19a7-245c-4a2b-9249-66d4eb7cfdf7", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "2f6cdd62-9b29-4597-8af0-3dd410ae46f0", - "msg": { - "base": "Hi flow invalid two" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "0035ccc2-6359-4954-bbc9-bddb90076c25" - } - ], - "rule_sets": [], - "base_language": "base", - "flow_type": "M", - "version": "11.8", - "metadata": { - "name": "Invalid2", - "saved_on": "2018-12-17T12:10:13.269437Z", - "revision": 3, - "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", - "expires": 10080, - "ivr_retry_failed_events": null - } - }, - { - "entry": "544e4ef3-4c54-4bb0-8f89-a1e098b3f030", - "action_sets": [ - { - "uuid": "544e4ef3-4c54-4bb0-8f89-a1e098b3f030", - "x": 375, - "y": 1, - "destination": "a7de0caa-5ab0-4edc-8fc8-33eb31f79cba", - "actions": [ - { - "type": "reply", - "uuid": "64ce02e3-8ea8-414a-a7cf-7f5d3938aa03", - "msg": { - "base": "Hi" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "33d4947d-bdda-4226-bc27-55a6b6e56b36" - }, - { - "uuid": "c9e48e85-b91c-4e2b-bb17-fb670f1559c0", - "x": 420, - "y": 622, - "destination": "861c6312-b2a8-4586-8688-6621d7065497", - "actions": [ - { - "type": "reply", - "uuid": "24b49e66-2520-4f9c-a6f7-f7a43793db53", - "msg": { - "base": "tnx" - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "trigger-flow", - "uuid": "bf31a0f8-73d8-4c81-8f90-ea0d4008a212", - "flow": { - "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", - "name": "Invalid2" - }, - "contacts": [], - "groups": [ - { - "uuid": "ad17d536-0085-4e6b-abc6-222b22d57caa", - "name": "Empty" - } - ], - "variables": [] - } - ], - "exit_uuid": "c8b6b99d-1af5-4bd1-b2d8-b3e87de702e8" - }, - { - "uuid": "6adc7de8-6a84-490a-b3d3-3d1ec607d465", - "x": 580, - "y": 316, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "09f0ddee-c27e-4397-bb3c-4a6cf35da77a", - "msg": { - "base": "tyvm" - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "flow", - "uuid": "95e9750f-9bf4-4ae9-aa07-5c4cde604956", - "flow": { - "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", - "name": "Invalid2" - } - } - ], - "exit_uuid": "1f5d4b7e-7ceb-47cf-91e7-94790f63c9db" - }, - { - "uuid": "ed891a32-6e6d-49b1-88d0-399d2002bce0", - "x": 323, - "y": 993, - "destination": null, - "actions": [ - { - "type": "flow", - "uuid": "70acb970-8b3a-47d0-9fb6-56c5974a582b", - "flow": { - "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3", - "name": "Valid1" - } - } - ], - "exit_uuid": "b5bfc0a1-701e-4e19-ad3e-bf9d7470b241" - }, - { - "uuid": "a750fe69-167b-4ae3-af72-7aae4c2d8b1a", - "x": 598, - "y": 993, - "destination": null, - "actions": [ - { - "type": "flow", - "uuid": "9b0f11bd-fbda-4efe-a41a-8ef101412d95", - "flow": { - "uuid": "136cdab3-e9d1-458c-b6eb-766afd92b478", - "name": "Invalid2" - } - } - ], - "exit_uuid": "1231547d-8f57-4a12-82d1-b1bf3e664010" - }, - { - "uuid": "0bfb7527-c6e9-4452-b780-6755d2041144", - "x": 576, - "y": 169, - "destination": null, - "actions": [ - { - "type": "flow", - "uuid": "e8e85830-1aef-4947-af91-1a2653f3627d", - "flow": { - "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3", - "name": "Valid1" - } - } - ], - "exit_uuid": "8d2c4101-330a-49f7-a4e5-972513c1a995" - } - ], - "rule_sets": [ - { - "uuid": "a7de0caa-5ab0-4edc-8fc8-33eb31f79cba", - "x": 61, - "y": 190, - "label": "Response 1", - "rules": [ - { - "uuid": "a16424a4-95df-4839-813a-bf6bee37f735", - "category": { - "base": "1" - }, - "destination": "9baa6aaf-61bf-4686-8059-1c373a43e5a6", - "destination_type": "R", - "test": { - "type": "eq", - "test": "1" - }, - "label": null - }, - { - "uuid": "f6b45161-f1fe-475f-a4db-7eb300f26415", - "category": { - "base": "2" - }, - "destination": "c9e48e85-b91c-4e2b-bb17-fb670f1559c0", - "destination_type": "A", - "test": { - "type": "eq", - "test": "2" - }, - "label": null - }, - { - "uuid": "59bfd40b-8b94-4555-ac2e-e6883d280df2", - "category": { - "base": "3" - }, - "destination": "6adc7de8-6a84-490a-b3d3-3d1ec607d465", - "destination_type": "A", - "test": { - "type": "eq", - "test": "3" - }, - "label": null - }, - { - "uuid": "7b25509c-94c4-45c1-86cf-2995916ac825", - "category": { - "base": "Other" - }, - "destination": "0bfb7527-c6e9-4452-b780-6755d2041144", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "", - "operand": "@step.value", - "config": {} - }, - { - "uuid": "9baa6aaf-61bf-4686-8059-1c373a43e5a6", - "x": 51, - "y": 659, - "label": "Response 2", - "rules": [ - { - "uuid": "049a4d45-d50d-468a-ae61-9e55c5dda0ea", - "category": { - "base": "Completed" - }, - "destination": "54c31965-d727-4b0a-a37e-6231551343dc", - "destination_type": "R", - "test": { - "type": "subflow", - "exit_type": "completed" - }, - "label": null - }, - { - "uuid": "101dea88-83bf-4219-973b-d11de45589ae", - "category": { - "base": "Expired" - }, - "destination": "544e4ef3-4c54-4bb0-8f89-a1e098b3f030", - "destination_type": "A", - "test": { - "type": "subflow", - "exit_type": "expired" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "subflow", - "response_type": "", - "operand": "@step.value", - "config": { - "flow": { - "name": "Invalid1", - "uuid": "ad40071e-a665-4df3-af14-0bc0fe589244" - } - } - }, - { - "uuid": "54c31965-d727-4b0a-a37e-6231551343dc", - "x": 36, - "y": 875, - "label": "Response 3", - "rules": [ - { - "uuid": "6a9a30cc-0400-4148-b760-ff342d7ef496", - "category": { - "base": "Completed" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "subflow", - "exit_type": "completed" - }, - "label": null - }, - { - "uuid": "e9e0ad89-6d63-4744-ba35-8042af052a95", - "category": { - "base": "Expired" - }, - "destination": null, - "destination_type": null, - "test": { - "type": "subflow", - "exit_type": "expired" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "subflow", - "response_type": "", - "operand": "@step.value", - "config": { - "flow": { - "name": "Valid1", - "uuid": "b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3" - } - } - }, - { - "uuid": "861c6312-b2a8-4586-8688-6621d7065497", - "x": 409, - "y": 863, - "label": "Response 4", - "rules": [ - { - "uuid": "451cb651-7a59-4d2b-bfe5-753643ad7db2", - "category": { - "base": "1" - }, - "destination": "ed891a32-6e6d-49b1-88d0-399d2002bce0", - "destination_type": "A", - "test": { - "type": "between", - "min": "0", - "max": "0.5" - }, - "label": null - }, - { - "uuid": "39c05550-91a3-4497-9595-2478b5ab6ae4", - "category": { - "base": "2" - }, - "destination": "a750fe69-167b-4ae3-af72-7aae4c2d8b1a", - "destination_type": "A", - "test": { - "type": "between", - "min": "0.5", - "max": "1" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "random", - "response_type": "", - "operand": "@(RAND())", - "config": {} - } - ], - "base_language": "base", - "flow_type": "M", - "version": "11.8", - "metadata": { - "name": "Master", - "saved_on": "2018-12-17T13:54:21.769976Z", - "revision": 56, - "uuid": "8d3f72ef-60b9-4902-b792-d664df502f3f", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/migrate_to_9.json b/media/test_flows/migrate_to_9.json deleted file mode 100644 index e7e50ed1eb8..00000000000 --- a/media/test_flows/migrate_to_9.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "campaigns": [ - { - "events": [ - { - "event_type": "M", - "relative_to": { - "id": 1134, - "key": "next_appointment", - "label": "Next Show" - }, - "flow": { - "name": "Single Message", - "id": 2814 - }, - "offset": -1, - "delivery_hour": -1, - "message": "Hi there, your next show is @contact.next_show. Don't miss it!", - "id": 9959, - "unit": "H" - } - ], - "group": { - "name": "Pending Appointments", - "id": 2308 - }, - "id": 405, - "name": "Appointment Schedule" - } - ], - "version": 9, - "site": "https://app.rapidpro.io", - "flows": [ - { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "a04f3046-e053-444f-b018-eff019766ad9", - "uuid": "e4a03298-dd43-4afb-b185-2782fc36a006", - "actions": [ - { - "msg": { - "base": "Hi there!" - }, - "type": "reply" - }, - { - "uuid": "c756af8f-4480-4a91-875d-c0600597c0ae", - "contacts": [ - { - "id": contact_id, - "name": "Trey Anastasio" - } - ], - "groups": [], - "variables": [], - "msg": { - "base": "You're phantastic" - }, - "action": "GET", - "type": "send" - }, - { - "labels": [ - { - "name": "this label", - "id": label_id - } - ], - "type": "add_label" - }, - { - "field": "concat_test", - "type": "save", - "value": "@(CONCAT(extra.flow.divided, extra.flow.sky))", - "label": "Concat Test" - }, - { - "field": "normal_test", - "type": "save", - "value": "@extra.contact.name", - "label": "Normal Test" - } - ] - }, - { - "y": 142, - "x": 166, - "destination": null, - "uuid": "a04f3046-e053-444f-b018-eff019766ad9", - "actions": [ - { - "type": "add_group", - "groups": [ - { - "name": "Survey Audience", - "id": group_id - }, - "@(\"Phans\")", - "Survey Audience" - ] - }, - { - "type": "del_group", - "groups": [ - { - "name": "Unsatisfied Customers", - "id": group_id - } - ] - }, - { - "name": "Test flow", - "contacts": [], - "variables": [ - { - "id": "@contact.tel_e164" - } - ], - "groups": [], - "type": "trigger-flow", - "id": start_flow_id - }, - { - "type": "flow", - "name": "Parent Flow", - "id": start_flow_id - } - ] - } - ], - "version": 9, - "flow_type": "F", - "entry": "e4a03298-dd43-4afb-b185-2782fc36a006", - "rule_sets": [], - "metadata": { - "expires": 10080, - "revision": 11, - "id": previous_flow_id, - "name": "Migrate to 9", - "saved_on": "2016-06-22T15:05:12.074490Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/multi_language_flow.json b/media/test_flows/multi_language_flow.json deleted file mode 100644 index a7a10f91c3e..00000000000 --- a/media/test_flows/multi_language_flow.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "version": 4, - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "c969c5ba-8595-4e2c-86d0-c2e375afe3e0", - "uuid": "d563e7ca-aa0f-4615-ba8c-eab5e13ff4bf", - "actions": [ - { - "msg": { - "spa": "\u00a1Hola amigo! \u00bfCu\u00e1l es tu color favorito?", - "eng": "Hello friend! What is your favorite color?" - }, - "type": "reply" - } - ] - }, - { - "y": 266, - "x": 351, - "destination": null, - "uuid": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", - "actions": [ - { - "msg": { - "spa": "\u00a1Gracias! Me gusta @flow.color.", - "eng": "Thank you! I like @flow.color." - }, - "type": "reply" - }, - { - "msg": { - "eng": "This message was not translated." - }, - "type": "reply" - } - ] - }, - { - "y": 179, - "x": 683, - "destination": "c969c5ba-8595-4e2c-86d0-c2e375afe3e0", - "uuid": "6ea52610-838c-4f64-8e24-99754135da67", - "actions": [ - { - "msg": { - "spa": "Por favor, una vez m\u00e1s", - "eng": "Please try again." - }, - "type": "reply" - } - ] - } - ], - "last_saved": "2015-02-19T05:55:32.232993Z", - "entry": "d563e7ca-aa0f-4615-ba8c-eab5e13ff4bf", - "rule_sets": [ - { - "uuid": "c969c5ba-8595-4e2c-86d0-c2e375afe3e0", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "spa": "rojo", - "eng": "Red" - }, - "base": "Red", - "type": "contains_any" - }, - "category": { - "spa": "Rojo", - "base": "Red", - "eng": "Red" - }, - "destination": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", - "config": { - "type": "contains_any", - "verbose_name": "has any of these words", - "name": "Contains any", - "localized": true, - "operands": 1 - }, - "uuid": "de555b2c-2616-49ff-8564-409a01b0bd79" - }, - { - "test": { - "test": { - "spa": "verde", - "eng": "Green" - }, - "base": "Green", - "type": "contains_any" - }, - "category": { - "spa": "Verde", - "base": "Green", - "eng": "Green" - }, - "destination": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", - "config": { - "type": "contains_any", - "verbose_name": "has any of these words", - "name": "Contains any", - "localized": true, - "operands": 1 - }, - "uuid": "e09c7ad3-46c8-4024-9fcf-8a0d26d97d6a" - }, - { - "test": { - "test": { - "spa": "azul", - "eng": "Blue" - }, - "base": "Blue", - "type": "contains_any" - }, - "category": { - "spa": "Azul", - "base": "Blue", - "eng": "Blue" - }, - "destination": "5532bc8e-ecf8-42ad-9654-bb4b3374001e", - "config": { - "type": "contains_any", - "verbose_name": "has any of these words", - "name": "Contains any", - "localized": true, - "operands": 1 - }, - "uuid": "aafd9e60-4d74-40cb-a923-3501560cb5c1" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "spa": "Otro", - "base": "Other", - "eng": "Other" - }, - "destination": "6ea52610-838c-4f64-8e24-99754135da67", - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - }, - "uuid": "2263684a-0354-448e-8213-c57644e91798" - } - ], - "webhook": null, - "label": "Color", - "operand": "@step.value", - "finished_key": null, - "response_type": "C", - "y": 132, - "x": 242 - } - ], - "metadata": {} - }, - "id": 1400, - "flow_type": "F", - "name": "Multi Language Flow" - } - ], - "triggers": [] -} diff --git a/media/test_flows/no_base_language_v8.json b/media/test_flows/no_base_language_v8.json deleted file mode 100644 index 18f5ccfc07d..00000000000 --- a/media/test_flows/no_base_language_v8.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "version": 8, - "flows": [ - { - "base_language": null, - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "f614e8c9-eeb6-4c94-bd07-b4bbe8a95b47", - "actions": [ - { - "type": "add_group", - "groups": [ - { - "name": "A New Group", - "id": 44899 - } - ] - }, - { - "field": "location", - "type": "save", - "value": "Seattle, WA", - "label": "Location" - }, - { - "lang": "eng", - "type": "lang", - "name": "English" - } - ] - } - ], - "version": 8, - "flow_type": "F", - "entry": "f614e8c9-eeb6-4c94-bd07-b4bbe8a95b47", - "rule_sets": [], - "metadata": { - "expires": 720, - "saved_on": "2015-11-19T00:30:09.477009Z", - "id": 42104, - "name": "Join New Group", - "revision": 6 - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/non_localized_ruleset.json b/media/test_flows/non_localized_ruleset.json deleted file mode 100644 index a4cbc27c3e8..00000000000 --- a/media/test_flows/non_localized_ruleset.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "version": 8, - "flows": [ - { - "base_language": "eng", - "action_sets": [], - "version": 8, - "flow_type": "F", - "entry": "99696ed8-2555-4d18-ac0b-f9b9d85abf30", - "rule_sets": [ - { - "uuid": "99696ed8-2555-4d18-ac0b-f9b9d85abf30", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": "All Responses", - "uuid": "9b31bbfe-23d7-4838-806a-1a3989de3f37" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 0, - "x": 100, - "config": {} - } - ], - "metadata": { - "expires": 10080, - "revision": 1, - "id": 42135, - "name": "Empty", - "saved_on": "2015-11-19T22:31:15.972687Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/non_localized_with_language.json b/media/test_flows/non_localized_with_language.json deleted file mode 100644 index 03daa5be452..00000000000 --- a/media/test_flows/non_localized_with_language.json +++ /dev/null @@ -1,332 +0,0 @@ -{ - "version": 8, - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 991, - "x": 389, - "destination": "7d1b7019-b611-4132-9ba4-af36cc167398", - "uuid": "49189b3e-8e2b-473f-bec2-10378f5a7c06", - "actions": [ - { - "msg": "Thanks @extra.name, we'll be in touch ASAP about order # @extra.order.", - "type": "reply" - }, - { - "msg": "Customer @extra.name has a problem with their order @extra.order for @extra.description. Please look into it ASAP and call them back with the status.\n \nCustomer Comment: \"@flow.comment\"\nCustomer Name: @extra.name\nCustomer Phone: @contact.tel ", - "type": "email", - "emails": [ - "name@domain.com" - ], - "subject": "Order Comment: @flow.lookup: @extra.order" - } - ] - }, - { - "y": 574, - "x": 612, - "destination": "6f550596-98a2-44fb-b769-b3c529f1b963", - "uuid": "8618411e-a35e-472b-b867-3339aa46027a", - "actions": [ - { - "msg": "Uh oh @extra.name! Our record indicate that your order for @extra.description was cancelled on @extra.cancel_date. If you think this is in error, please reply with a comment and our orders department will get right on it!", - "type": "reply" - } - ] - }, - { - "y": 572, - "x": 389, - "destination": "6f550596-98a2-44fb-b769-b3c529f1b963", - "uuid": "32bb903e-44c2-40f9-b65f-c8cda6490ee6", - "actions": [ - { - "msg": "Hi @extra.name. Hope you are patient because we haven't shipped your order for @extra.description yet. We expect to ship it by @extra.ship_date though. If you have any questions, just reply and our customer service department will be notified.", - "type": "reply" - } - ] - }, - { - "y": 572, - "x": 167, - "destination": "6f550596-98a2-44fb-b769-b3c529f1b963", - "uuid": "bf36a209-4e21-44ac-835a-c3d5889aa2fb", - "actions": [ - { - "msg": "Great news @extra.name! We shipped your order for @extra.description on @extra.ship_date and we expect it will be delivered on @extra.delivery_date. If you have any questions, just reply and our customer service department will be notified.", - "type": "reply" - } - ] - }, - { - "y": 99, - "x": 787, - "destination": "69c427a4-b9b6-4f67-9e35-f783b3e81bfd", - "uuid": "7f4c29e3-f022-420d-8e2f-6165c572b991", - "actions": [ - { - "msg": "Sorry that doesn't look like a valid order number. Maybe try: CU001, CU002 or CU003?", - "type": "reply" - } - ] - }, - { - "y": 0, - "x": 409, - "destination": "69c427a4-b9b6-4f67-9e35-f783b3e81bfd", - "uuid": "4f79034a-51e0-4210-99cc-17f385de4de8", - "actions": [ - { - "msg": "Thanks for contacting the ThriftShop order status system. Please send your order # and we'll help you in a jiffy!", - "type": "reply" - } - ] - }, - { - "y": 854, - "x": 776, - "destination": "2cb5adcd-31b1-4d21-a0df-c5375cea1963", - "uuid": "6f550596-98a2-44fb-b769-b3c529f1b963", - "actions": [ - { - "msg": "@flow.lookup_response", - "type": "reply" - } - ] - }, - { - "y": 1430, - "x": 233, - "destination": "ad1d5767-8dfd-4c5d-b2e8-a997adb3a276", - "uuid": "81613e37-414c-4d73-884b-4ee7ae0fd913", - "actions": [ - { - "msg": "asdf", - "type": "reply" - } - ] - } - ], - "version": 8, - "flow_type": "F", - "entry": "4f79034a-51e0-4210-99cc-17f385de4de8", - "rule_sets": [ - { - "uuid": "2cb5adcd-31b1-4d21-a0df-c5375cea1963", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": "All Responses", - "destination": "49189b3e-8e2b-473f-bec2-10378f5a7c06", - "uuid": "088470d7-c4a9-4dd7-8be4-d10faf02fcea", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Comment", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 955, - "x": 762, - "config": {} - }, - { - "uuid": "69c427a4-b9b6-4f67-9e35-f783b3e81bfd", - "webhook_action": null, - "rules": [ - { - "category": "All Responses", - "uuid": "c85136c2-dcdd-4c4b-835d-a083ebde5e07", - "destination": "b3bd5abb-3f70-4af5-85eb-d07900f9cb85", - "destination_type": "R", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Lookup Responses", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 198, - "x": 356, - "config": {} - }, - { - "uuid": "7d1b7019-b611-4132-9ba4-af36cc167398", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": "All Responses", - "destination": "81613e37-414c-4d73-884b-4ee7ae0fd913", - "uuid": "124f3266-bc62-4743-b4b1-79fee0d45ad9", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Extra Comments", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 1252, - "x": 389, - "config": {} - }, - { - "uuid": "6baa1d6b-ee70-4d7c-85b3-22ed94281227", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "Shipped", - "type": "contains" - }, - "category": "Shipped", - "destination": "bf36a209-4e21-44ac-835a-c3d5889aa2fb", - "uuid": "bb336f83-3a5f-4a2e-ad42-757a0a79892b", - "destination_type": "A" - }, - { - "test": { - "test": "Pending", - "type": "contains" - }, - "category": "Pending", - "destination": "32bb903e-44c2-40f9-b65f-c8cda6490ee6", - "uuid": "91826255-5a81-418c-aadb-3378802a1134", - "destination_type": "A" - }, - { - "test": { - "test": "Cancelled", - "type": "contains" - }, - "category": "Cancelled", - "destination": "8618411e-a35e-472b-b867-3339aa46027a", - "uuid": "1efa73d0-e30c-4495-a5c8-724b48385839", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": "7f4c29e3-f022-420d-8e2f-6165c572b991", - "uuid": "c85136c2-dcdd-4c4b-835d-a083ebde5e07", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "expression", - "label": "Lookup", - "operand": "@extra.status", - "finished_key": null, - "response_type": "", - "y": 398, - "x": 356, - "config": {} - }, - { - "uuid": "b3bd5abb-3f70-4af5-85eb-d07900f9cb85", - "webhook_action": "POST", - "rules": [ - { - "category": "All Responses", - "uuid": "c85136c2-dcdd-4c4b-835d-a083ebde5e07", - "destination": "6baa1d6b-ee70-4d7c-85b3-22ed94281227", - "destination_type": "R", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": "https://api.textit.in/demo/status/", - "ruleset_type": "webhook", - "label": "Lookup Webhook", - "operand": "@extra.status", - "finished_key": null, - "response_type": "", - "y": 298, - "x": 356, - "config": {} - }, - { - "uuid": "ad1d5767-8dfd-4c5d-b2e8-a997adb3a276", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": "All Responses", - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - }, - "uuid": "439c839b-f04a-4394-9b8b-be91ca0991bd" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Boo", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 1580, - "x": 362, - "config": {} - } - ], - "metadata": { - "uuid": "2ed28d6a-61cd-436a-9159-01b024992e78", - "notes": [ - { - "body": "This flow demonstrates looking up an order using a webhook and giving the user different options based on the results. After looking up the order the user has the option to send additional comments which are forwarded to customer support representatives.\n\nUse order numbers CU001, CU002 or CU003 to see the different cases in action.", - "x": 59, - "y": 0, - "title": "Using Your Own Data" - } - ], - "expires": 720, - "name": "Sample Flow - Order Status Checker", - "saved_on": "2015-11-19T19:32:17.523441Z", - "id": 42133, - "revision": 1 - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/not_fully_localized.json b/media/test_flows/not_fully_localized.json deleted file mode 100644 index b64ef4690a7..00000000000 --- a/media/test_flows/not_fully_localized.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "version": 7, - "flows": [ - { - "version": 7, - "flow_type": "F", - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "127f3736-77ce-4006-9ab0-0c07cea88956", - "actions": [ - { - "msg": { - "base": "What is your favorite color?" - }, - "type": "reply" - } - ] - }, - ], - "last_saved": "2015-09-15T02:37:08.805578Z", - "entry": "127f3736-77ce-4006-9ab0-0c07cea88956", - "rule_sets": [], - "metadata": { - "notes": [], - "name": "Not fully localized", - "id": 35559, - "expires": 720, - "revision": 1 - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/old_expressions.json b/media/test_flows/old_expressions.json deleted file mode 100644 index 2b36334bd42..00000000000 --- a/media/test_flows/old_expressions.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "version": 7, - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "a32d0ebb-57aa-452e-bd8d-ae5febee4440", - "uuid": "a26285b1-134b-421b-9853-af0f26d13777", - "actions": [ - { - "msg": { - "eng": "Hi @contact.name|upper_case. Today is =(date.now)" - }, - "type": "reply" - } - ] - }, - { - "y": 350, - "x": 164, - "destination": null, - "uuid": "054d9e01-8e68-4f6d-9cf3-44407256670e", - "actions": [ - { - "type": "add_group", - "groups": [ - "=flow.response_1.category" - ] - }, - { - "msg": { - "eng": "Was @contact.name|lower_case|title_case." - }, - "variables": [ - { - "id": "=flow.response_1.category" - } - ], - "type": "send", - "groups": [], - "contacts": [] - } - ] - } - ], - "last_saved": "2015-09-23T07:54:10.928652Z", - "entry": "a26285b1-134b-421b-9853-af0f26d13777", - "rule_sets": [ - { - "uuid": "a32d0ebb-57aa-452e-bd8d-ae5febee4440", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "028c71a3-0696-4d98-8ff3-0dc700811124", - "uuid": "bf879f78-aff8-4c64-9326-e92f677af5cf", - "destination_type": "R" - } - ], - "webhook": "http://example.com/query.php?contact=@contact.name|upper_case", - "ruleset_type": "webhook", - "label": "Response 1", - "operand": "=(step.value)", - "finished_key": null, - "response_type": "", - "y": 134, - "x": 237, - "config": {} - }, - { - "uuid": "028c71a3-0696-4d98-8ff3-0dc700811124", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "054d9e01-8e68-4f6d-9cf3-44407256670e", - "uuid": "35ba932c-d45a-4cf5-bd0b-41fd9b80cc27", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "expression", - "label": "Response 2", - "operand": "@step.value|time_delta:\"3\"", - "finished_key": null, - "response_type": "", - "y": 240, - "x": 203, - "config": {} - } - ], - "type": "F", - "metadata": {} - }, - "expires": 10080, - "id": 31427, - "flow_type": "F", - "name": "Old Expressions" - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/single_message_bad_localization.json b/media/test_flows/single_message_bad_localization.json deleted file mode 100644 index 9ac97190f1d..00000000000 --- a/media/test_flows/single_message_bad_localization.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version":10, - "flows":[ - { - "base_language":"eng", - "rule_sets":[ - - ], - "action_sets":[ - { - "y":0, - "x":100, - "uuid":"37fe93f8-edf5-40f3-b029-3b391fa528d0", - "actions":[ - { - "msg":"Campaign Message 12", - "type":"reply", - "uuid":"9bdb1aab-e42e-4585-8395-6504c4a683ed" - } - ] - } - ], - "entry":"37fe93f8-edf5-40f3-b029-3b391fa528d0" - } - ], - "triggers":[ - - ] -} \ No newline at end of file diff --git a/media/test_flows/type_flow.json b/media/test_flows/type_flow.json deleted file mode 100644 index 7675ff831ca..00000000000 --- a/media/test_flows/type_flow.json +++ /dev/null @@ -1,394 +0,0 @@ -{ - "campaigns": [], - "version": "10.1", - "site": "https://app.rapidpro.io", - "flows": [ - { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 92, - "destination": "9c941ba5-e4df-47e0-9a4f-594986ae1b1a", - "uuid": "bc3da5f2-6fe5-41f1-ac0e-ec2701189ef2", - "actions": [ - { - "msg": { - "base": "Hey @contact.nickname, you joined on @contact.joined_on in @contact.district." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "4dc98ff5-8d86-45f5-8336-8949029e893e" - }, - { - "msg": { - "base": "It's @date. The time is @date.now on @date.today." - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "058e5d4a-3447-49d9-a033-ebe3010b5875" - }, - { - "msg": { - "base": "Send text" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "9568e1c8-04f2-45ef-a477-4521d19bfaf6" - } - ] - }, - { - "y": 257, - "x": 78, - "destination": "a4904b78-08b8-42fd-9479-27bcb1764bc4", - "uuid": "dac0c91f-3f3f-43d5-a2d9-5c1059998134", - "actions": [ - { - "msg": { - "base": "You said @flow.text at @flow.text.time. Send date" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "6f4fc213-3037-49e5-ac45-b956c48fd546" - } - ] - }, - { - "y": 540, - "x": 95, - "destination": "9994619b-e68d-4c94-90d6-af19fb944f7d", - "uuid": "9bbdc63c-4385-44e1-b573-a127f50d3d34", - "actions": [ - { - "msg": { - "base": "You said @flow.date which was in category @flow.date.category Send number" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "7177ef30-33ca-4b25-8af7-3213e0483b56" - } - ] - }, - { - "y": 825, - "x": 96, - "destination": "01cc820b-c516-4e68-8903-aa69866b11b6", - "uuid": "a4a37023-de22-4ac4-b431-da2a333c93cd", - "actions": [ - { - "msg": { - "base": "You said @flow.number. Send state" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "34d622bc-e2ad-44aa-b047-cfb38e2dc2cc" - } - ] - }, - { - "y": 1084, - "x": 94, - "destination": "9769918c-8ca4-4ec5-8b5b-bf94cc6746a9", - "uuid": "7e8dfcd5-6510-4060-9608-2c8faa3a8e0a", - "actions": [ - { - "msg": { - "base": "You said @flow.state which was in category @flow.state.category. Send district" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "a4428571-9b86-49b8-97e1-6ffee3cddbaa" - } - ] - }, - { - "y": 1460, - "x": 73, - "destination": "ea2244de-7b23-4fbb-8f99-38cde3100de8", - "uuid": "605e2fe7-321a-4cce-b97b-877d75bd3b12", - "actions": [ - { - "msg": { - "base": "You said @flow.district. Send ward" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "5f8eb5aa-249b-4718-a502-8406dd0ae418" - } - ] - }, - { - "y": 1214, - "x": 284, - "destination": "498b1953-02f1-47dd-b9cb-1b51913e348f", - "uuid": "9769918c-8ca4-4ec5-8b5b-bf94cc6746a9", - "actions": [ - { - "msg": { - "base": "You said @flow.ward.", - "fre": "Tu as dit @flow.ward" - }, - "media": {}, - "send_all": false, - "type": "reply", - "uuid": "b95b88c8-a85c-4bac-931d-310d678c286a" - }, - { - "lang": "fre", - "type": "lang", - "name": "French", - "uuid": "56a4bca5-b9e5-4d04-883c-ca65d7c4d538" - } - ] - } - ], - "version": "10.1", - "flow_type": "F", - "entry": "bc3da5f2-6fe5-41f1-ac0e-ec2701189ef2", - "rule_sets": [ - { - "uuid": "9c941ba5-e4df-47e0-9a4f-594986ae1b1a", - "rules": [ - { - "category": { - "base": "All Responses" - }, - "uuid": "a4682f52-7869-4e64-bf9f-8d2c0a341d19", - "destination": "dac0c91f-3f3f-43d5-a2d9-5c1059998134", - "label": null, - "destination_type": "A", - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "Text", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 146, - "x": 265, - "config": {} - }, - { - "uuid": "a4904b78-08b8-42fd-9479-27bcb1764bc4", - "rules": [ - { - "category": { - "base": "is a date" - }, - "uuid": "e410616b-b5cd-4fd1-af42-9c6b6c9fe282", - "destination": "9bbdc63c-4385-44e1-b573-a127f50d3d34", - "label": null, - "destination_type": "A", - "test": { - "type": "date" - } - }, - { - "category": { - "base": "Other" - }, - "uuid": "a720d0b1-0686-47be-a306-1543e470c6de", - "destination": "dac0c91f-3f3f-43d5-a2d9-5c1059998134", - "label": null, - "destination_type": "A", - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "Date", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 391, - "x": 273, - "config": {} - }, - { - "uuid": "9994619b-e68d-4c94-90d6-af19fb944f7d", - "rules": [ - { - "category": { - "base": "numeric" - }, - "uuid": "c4881d22-57aa-4964-abbc-aaf26b875614", - "destination": "a4a37023-de22-4ac4-b431-da2a333c93cd", - "label": null, - "destination_type": "A", - "test": { - "type": "number" - } - }, - { - "category": { - "base": "Other" - }, - "uuid": "6cd3fb0c-070d-4060-bafc-badaebe5134e", - "destination": null, - "label": null, - "destination_type": null, - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "Number", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 679, - "x": 267, - "config": {} - }, - { - "uuid": "01cc820b-c516-4e68-8903-aa69866b11b6", - "rules": [ - { - "category": { - "base": "state" - }, - "uuid": "4ef398b1-d3f1-4023-b608-8803cc05dd20", - "destination": "7e8dfcd5-6510-4060-9608-2c8faa3a8e0a", - "label": null, - "destination_type": "A", - "test": { - "type": "state" - } - }, - { - "category": { - "base": "Other" - }, - "uuid": "38a4583c-cf73-454c-80e5-09910cf92f4b", - "destination": null, - "label": null, - "destination_type": null, - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "State", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 956, - "x": 271, - "config": {} - }, - { - "uuid": "498b1953-02f1-47dd-b9cb-1b51913e348f", - "rules": [ - { - "category": { - "base": "district", - "fre": "le district" - }, - "uuid": "47147597-00c6-44bc-95d2-bebec9f1a45b", - "destination": "605e2fe7-321a-4cce-b97b-877d75bd3b12", - "label": null, - "destination_type": "A", - "test": { - "test": "@flow.state", - "type": "district" - } - }, - { - "category": { - "base": "Other" - }, - "uuid": "1145c620-2512-4228-b561-80024bbd91ee", - "destination": null, - "label": null, - "destination_type": null, - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "District", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 1355, - "x": 266, - "config": {} - }, - { - "uuid": "ea2244de-7b23-4fbb-8f99-38cde3100de8", - "rules": [ - { - "category": { - "base": "ward" - }, - "uuid": "b5159826-a55a-4803-a656-64d47803e8bf", - "destination": null, - "label": null, - "destination_type": null, - "test": { - "state": "@flow.state.", - "type": "ward", - "district": "@flow.district" - } - }, - { - "category": { - "base": "Other" - }, - "uuid": "c1aa2a53-4d85-4fdd-953e-7e24b06cc7ea", - "destination": null, - "label": null, - "destination_type": null, - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "Ward", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 1584, - "x": 268, - "config": {} - } - ], - "metadata": { - "expires": 10080, - "revision": 19, - "uuid": "d7468d97-b8d7-482e-a09c-d0bfe839c555", - "name": "Type Flow", - "saved_on": "2017-10-30T19:38:39.814935Z" - } - } - ], - "triggers": [ - { - "trigger_type": "K", - "flow": { - "name": "Type Flow", - "uuid": "d7468d97-b8d7-482e-a09c-d0bfe839c555" - }, - "groups": [], - "keyword": "types", - "channel": null - } - ] -} \ No newline at end of file diff --git a/temba/api/v2/tests.py b/temba/api/v2/tests.py index 930c66db048..756fb7c07e7 100644 --- a/temba/api/v2/tests.py +++ b/temba/api/v2/tests.py @@ -2788,7 +2788,7 @@ def test_definitions(self): self.assertPostNotAllowed(endpoint_url) self.assertDeleteNotAllowed(endpoint_url) - self.import_file("subflow") + self.import_file("test_flows/subflow.json") flow = Flow.objects.get(name="Parent Flow") # all flow dependencies and we should get the child flow @@ -2806,7 +2806,7 @@ def test_definitions(self): ) # import the clinic app which has campaigns - self.import_file("the_clinic") + self.import_file("test_flows/the_clinic.json") # our catchall flow, all alone flow = Flow.objects.get(name="Catch All") @@ -2874,7 +2874,7 @@ def test_definitions(self): ) # test that flows are migrated - self.import_file("favorites_v13") + self.import_file("test_flows/favorites_v13.json") flow = Flow.objects.get(name="Favorites") self.assertGet( diff --git a/temba/campaigns/tests.py b/temba/campaigns/tests.py index c08f9aa0816..0f13426a3f7 100644 --- a/temba/campaigns/tests.py +++ b/temba/campaigns/tests.py @@ -10,7 +10,7 @@ from temba.campaigns.views import CampaignEventCRUDL from temba.contacts.models import ContactField -from temba.flows.models import Flow, FlowRevision +from temba.flows.models import Flow from temba.msgs.models import Msg from temba.orgs.models import DefinitionExport, Org from temba.tests import CRUDLTestMixin, MigrationTest, TembaTest, matchers, mock_mailroom @@ -159,7 +159,7 @@ def test_get_sorted_events(self): # create a campaign campaign = Campaign.create(self.org, self.user, "Planting Reminders", self.farmers) - flow = self.create_flow("Test") + flow = self.create_flow("Test 1") event1 = CampaignEvent.create_flow_event( self.org, self.admin, campaign, self.planting_date, offset=1, unit="W", flow=flow, delivery_hour="13" @@ -173,22 +173,15 @@ def test_get_sorted_events(self): self.assertEqual(campaign.get_sorted_events(), [event2, event1, event3]) - flow_json = self.get_flow_json("favorites") - flow = Flow.objects.create( - name="Call Me Maybe", - org=self.org, - is_system=True, - created_by=self.admin, - modified_by=self.admin, - saved_by=self.admin, - version_number="13.5.0", - flow_type="V", - ) - - FlowRevision.objects.create(flow=flow, definition=flow_json, spec_version=3, revision=1, created_by=self.admin) - event4 = CampaignEvent.create_flow_event( - self.org, self.admin, campaign, self.planting_date, offset=2, unit="W", flow=flow, delivery_hour="5" + self.org, + self.admin, + campaign, + self.planting_date, + offset=2, + unit="W", + flow=self.create_flow("Test 2"), + delivery_hour="5", ) self.assertEqual(campaign.get_sorted_events(), [event2, event1, event3, event4]) @@ -801,7 +794,7 @@ def test_eventfire_get_relative_to_value(self): self.assertIsNotNone(ev4.get_relative_to_value()) def test_import(self): - self.import_file("the_clinic") + self.import_file("test_flows/the_clinic.json") self.assertEqual(1, Campaign.objects.count()) campaign = Campaign.objects.get() diff --git a/temba/flows/legacy/tests.py b/temba/flows/legacy/tests.py index 9350fb45ea4..4e2e5a6b22b 100644 --- a/temba/flows/legacy/tests.py +++ b/temba/flows/legacy/tests.py @@ -88,6 +88,12 @@ def test_migrate_v7_template(self): class FlowMigrationTest(TembaTest): + def load_flow(self, filename: str, substitutions=None, name=None): + return self.get_flow(f"legacy/migrations/{filename}", substitutions=substitutions, name=name) + + def load_flow_def(self, filename: str, substitutions=None): + return self.load_json(f"test_flows/legacy/migrations/{filename}.json", substitutions=substitutions)["flows"][0] + def migrate_flow(self, flow, to_version=None): if not to_version: to_version = Flow.FINAL_LEGACY_VERSION @@ -120,7 +126,7 @@ def test_migrate_malformed_single_message_flow(self): version_number="3", ) - flow_json = self.get_flow_json("malformed_single_message")["definition"] + flow_json = self.load_flow_def("malformed_single_message")["definition"] FlowRevision.objects.create(flow=flow, definition=flow_json, spec_version=3, revision=1, created_by=self.admin) @@ -132,7 +138,7 @@ def test_migrate_malformed_single_message_flow(self): self.assertEqual(2, flow_json["revision"]) def test_migrate_to_11_12(self): - flow = self.get_flow("favorites") + flow = self.load_flow("favorites") definition = { "entry": "79b4776b-a995-475d-ae06-1cab9af8a28e", "rule_sets": [], @@ -225,23 +231,23 @@ def test_migrate_to_11_12(self): # removed the invalid reference self.assertEqual(len(migrated["action_sets"]), 2) - flow = self.get_flow("migrate_to_11_12") - flow_json = self.get_flow_json("migrate_to_11_12") + flow = self.load_flow("migrate_to_11_12") + flow_json = self.load_flow_def("migrate_to_11_12") migrated = migrate_to_version_11_12(flow_json, flow) self.assertEqual(migrated["action_sets"][0]["actions"][0]["msg"]["base"], "Hey there, Yes or No?") self.assertEqual(len(migrated["action_sets"]), 3) def test_migrate_to_11_12_with_one_node(self): - flow = self.get_flow("migrate_to_11_12_one_node") - flow_json = self.get_flow_json("migrate_to_11_12_one_node") + flow = self.load_flow("migrate_to_11_12_one_node") + flow_json = self.load_flow_def("migrate_to_11_12_one_node") migrated = migrate_to_version_11_12(flow_json, flow) self.assertEqual(len(migrated["action_sets"]), 0) def test_migrate_to_11_12_other_org_existing_flow(self): - flow = self.get_flow("migrate_to_11_12_other_org", {"CHANNEL-UUID": str(self.channel.uuid)}) - flow_json = self.get_flow_json("migrate_to_11_12_other_org", {"CHANNEL-UUID": str(self.channel.uuid)}) + flow = self.load_flow("migrate_to_11_12_other_org", {"CHANNEL-UUID": str(self.channel.uuid)}) + flow_json = self.load_flow_def("migrate_to_11_12_other_org", {"CHANNEL-UUID": str(self.channel.uuid)}) # change ownership of the channel it's referencing self.channel.org = self.org2 @@ -256,14 +262,14 @@ def test_migrate_to_11_12_channel_dependencies(self): self.channel.name = "1234" self.channel.save() - self.get_flow("migrate_to_11_12_one_node") + self.load_flow("migrate_to_11_12_one_node") flow = Flow.objects.filter(name="channel").first() self.assertEqual(flow.channel_dependencies.count(), 1) def test_migrate_to_11_11(self): - flow = self.get_flow("migrate_to_11_11") - flow_json = self.get_flow_json("migrate_to_11_11") + flow = self.load_flow("migrate_to_11_11") + flow_json = self.load_flow_def("migrate_to_11_11") migrated = migrate_to_version_11_11(flow_json, flow) migrated_labels = get_labels(migrated) @@ -271,7 +277,7 @@ def test_migrate_to_11_11(self): self.assertTrue(Label.objects.filter(uuid=uuid, name=name).exists(), msg="Label UUID mismatch") def test_migrate_to_11_10(self): - import_def = self.get_import_json("migrate_to_11_10") + import_def = self.load_json("test_flows/legacy/migrations/migrate_to_11_10.json") migrated_import = migrate_export_to_version_11_10(import_def, self.org) migrated = migrated_import["flows"][1] @@ -322,14 +328,14 @@ def test_migrate_to_11_10(self): ) def test_migrate_to_11_9(self): - flow = self.get_flow("migrate_to_11_9", name="Master") + flow = self.load_flow("migrate_to_11_9", name="Master") # give our flows same UUIDs as in import and make 2 of them invalid Flow.objects.filter(name="Valid1").update(uuid="b823cc3b-aaa6-4cd1-b7a5-28d6b492cfa3") Flow.objects.filter(name="Invalid1").update(uuid="ad40071e-a665-4df3-af14-0bc0fe589244", is_archived=True) Flow.objects.filter(name="Invalid2").update(uuid="136cdab3-e9d1-458c-b6eb-766afd92b478", is_active=False) - import_def = self.get_import_json("migrate_to_11_9") + import_def = self.load_json("test_flows/legacy/migrations/migrate_to_11_9.json") flow_def = import_def["flows"][-1] self.assertEqual(len(flow_def["rule_sets"]), 4) @@ -349,7 +355,7 @@ def get_rule_uuids(f): uuids.append(rule["uuid"]) return uuids - original = self.get_flow_json("migrate_to_11_8") + original = self.load_flow_def("migrate_to_11_8") original_uuids = get_rule_uuids(original) self.assertEqual(len(original_uuids), 9) @@ -363,7 +369,7 @@ def get_rule_uuids(f): self.assertEqual(len(set(migrated_uuids).difference(original_uuids)), 2) def test_migrate_to_11_7(self): - original = self.get_flow_json("migrate_to_11_7") + original = self.load_flow_def("migrate_to_11_7") self.assertEqual(len(original["action_sets"]), 5) self.assertEqual(len(original["rule_sets"]), 1) @@ -374,8 +380,8 @@ def test_migrate_to_11_7(self): self.assertEqual(len(migrated["rule_sets"]), 6) def test_migrate_to_11_6(self): - flow = self.get_flow("migrate_to_11_6") - flow_json = self.get_flow_json("migrate_to_11_6") + flow = self.load_flow("migrate_to_11_6") + flow_json = self.load_flow_def("migrate_to_11_6") migrated = migrate_to_version_11_6(flow_json, flow) migrated_groups = get_legacy_groups(migrated) @@ -383,7 +389,7 @@ def test_migrate_to_11_6(self): self.assertTrue(ContactGroup.objects.filter(uuid=uuid, name=name).exists(), msg="Group UUID mismatch") def test_migrate_to_11_5(self): - flow_json = self.get_flow_json("migrate_to_11_5") + flow_json = self.load_flow_def("migrate_to_11_5") flow_json = migrate_to_version_11_5(flow_json) # check text was updated in the reply action @@ -436,7 +442,7 @@ def test_migrate_to_11_5(self): @mock_mailroom def test_migrate_to_11_4(self, mr_mocks): - flow_json = self.get_flow_json("migrate_to_11_4") + flow_json = self.load_flow_def("migrate_to_11_4") migrated = migrate_to_version_11_4(flow_json.copy()) # gather up replies to check expressions were migrated @@ -463,7 +469,7 @@ def test_migrate_to_11_4(self, mr_mocks): self.assertEqual("", migrated["action_sets"][0]["actions"][0]["msg"]["eng"]) def test_migrate_to_11_3(self): - flow_json = self.get_flow_json("migrate_to_11_3") + flow_json = self.load_flow_def("migrate_to_11_3") migrated = migrate_to_version_11_3(flow_json) @@ -643,8 +649,8 @@ def test_migrate_to_11_0(self): self.create_field("district", "District", ContactField.TYPE_DISTRICT) self.create_field("joined_on", "Joined On", ContactField.TYPE_DATETIME) - flow = self.get_flow("type_flow") - flow_def = self.get_flow_json("type_flow") + flow = self.load_flow("type_flow") + flow_def = self.load_flow_def("type_flow") migrated = migrate_to_version_11_0(flow_def, flow) # gather up replies to check expressions were migrated @@ -672,7 +678,7 @@ def test_migrate_to_11_0(self): ) def test_migrate_to_11_0_with_null_ruleset_label(self): - flow = self.get_flow("migrate_to_11_0") + flow = self.load_flow("migrate_to_11_0") definition = { "rule_sets": [ { @@ -693,7 +699,7 @@ def test_migrate_to_11_0_with_null_ruleset_label(self): self.assertEqual(migrated, definition) def test_migrate_to_11_0_with_null_msg_text(self): - flow = self.get_flow("migrate_to_11_0") + flow = self.load_flow("migrate_to_11_0") definition = { "action_sets": [ { @@ -710,8 +716,8 @@ def test_migrate_to_11_0_with_null_msg_text(self): self.assertEqual(migrated, definition) def test_migrate_to_11_0_with_broken_localization(self): - flow = self.get_flow("migrate_to_11_0") - flow_def = self.get_flow_json("migrate_to_11_0") + flow = self.load_flow("migrate_to_11_0") + flow_def = self.load_flow_def("migrate_to_11_0") migrated = migrate_to_version_11_0(flow_def, flow) self.assertEqual( @@ -741,7 +747,7 @@ def test_migrate_to_10_4(self): self.assertIsNotNone(action["uuid"]) def test_migrate_to_10_3(self): - flow_def = self.get_flow_json("favorites") + flow_def = self.load_flow_def("favorites") migrated = migrate_to_version_10_3(flow_def, flow=None) # make sure all of our action sets have an exit uuid @@ -749,13 +755,13 @@ def test_migrate_to_10_3(self): self.assertIsNotNone(actionset.get("exit_uuid")) def test_migrate_to_10_2(self): - flow_def = self.get_flow_json("single_message_bad_localization") + flow_def = self.load_flow_def("single_message_bad_localization") migrated = migrate_to_version_10_2(flow_def) self.assertEqual("Campaign Message 12", migrated["action_sets"][0]["actions"][0]["msg"]["eng"]) def test_migrate_to_10_1(self): - flow_def = self.get_flow_json("favorites") + flow_def = self.load_flow_def("favorites") migrated = migrate_to_version_10_1(flow_def, flow=None) # make sure all of our actions have uuids set @@ -765,8 +771,8 @@ def test_migrate_to_10_1(self): def test_migrate_to_10(self): # this is really just testing our rewriting of webhook rulesets - flow = self.get_flow("dual_webhook") - flow_def = self.get_flow_json("dual_webhook") + flow = self.load_flow("dual_webhook") + flow_def = self.load_flow_def("dual_webhook") # get our definition out migrated = migrate_to_version_10(flow_def, flow=flow) @@ -793,7 +799,7 @@ def test_migrate_to_9(self): label_id=label.pk, ) - exported_json = self.get_import_json("migrate_to_9", substitutions) + exported_json = self.load_json("test_flows/legacy/migrations/migrate_to_9.json", substitutions) exported_json = migrate_export_to_version_9(exported_json, self.org, True) # our campaign events shouldn't have ids @@ -855,23 +861,23 @@ def test_migrate_to_9(self): self.assertNotIn("id", flow_json["metadata"]) # import the same thing again, should have the same uuids - new_exported_json = self.get_import_json("migrate_to_9", substitutions) + new_exported_json = self.load_json("test_flows/legacy/migrations/migrate_to_9.json", substitutions) new_exported_json = migrate_export_to_version_9(new_exported_json, self.org, True) self.assertEqual(flow_json["metadata"]["uuid"], new_exported_json["flows"][0]["metadata"]["uuid"]) # but when done as a different site, it should be unique - new_exported_json = self.get_import_json("migrate_to_9", substitutions) + new_exported_json = self.load_json("test_flows/legacy/migrations/migrate_to_9.json", substitutions) new_exported_json = migrate_export_to_version_9(new_exported_json, self.org, False) self.assertNotEqual(flow_json["metadata"]["uuid"], new_exported_json["flows"][0]["metadata"]["uuid"]) # can also just import a single flow - exported_json = self.get_import_json("migrate_to_9", substitutions) + exported_json = self.load_json("test_flows/legacy/migrations/migrate_to_9.json", substitutions) flow_json = migrate_to_version_9(exported_json["flows"][0], start_flow) self.assertIn("uuid", flow_json["metadata"]) self.assertNotIn("id", flow_json["metadata"]) # try it with missing metadata - flow_json = self.get_import_json("migrate_to_9", substitutions)["flows"][0] + flow_json = self.load_json("test_flows/legacy/migrations/migrate_to_9.json", substitutions)["flows"][0] del flow_json["metadata"] flow_json = migrate_to_version_9(flow_json, start_flow) self.assertEqual(1, flow_json["metadata"]["revision"]) @@ -885,7 +891,7 @@ def test_migrate_to_9(self): def test_migrate_to_8(self): # file uses old style expressions - flow_json = self.get_flow_json("old_expressions") + flow_json = self.load_flow_def("old_expressions") # migrate to the version right before us first flow_json = migrate_to_version_7(flow_json) @@ -904,7 +910,7 @@ def test_migrate_to_8(self): self.assertEqual(flow_json["rule_sets"][1]["operand"], "@(step.value + 3)") def test_migrate_to_7(self): - flow_json = self.get_flow_json("ivr_v3") + flow_json = self.load_flow_def("ivr_v3") # migrate to the version right before us first flow_json = migrate_to_version_5(flow_json) @@ -926,7 +932,7 @@ def test_migrate_to_7(self): def test_migrate_to_6(self): # file format is old non-localized format - voice_json = self.get_flow_json("ivr_v3") + voice_json = self.load_flow_def("ivr_v3") definition = voice_json.get("definition") # no language set @@ -948,7 +954,7 @@ def test_migrate_to_6(self): self.assertEqual("/recording.mp3", definition["action_sets"][0]["actions"][0]["recording"]["base"]) # now try one that doesn't have a recording set - voice_json = self.get_flow_json("ivr_v3") + voice_json = self.load_flow_def("ivr_v3") definition = voice_json.get("definition") del definition["action_sets"][0]["actions"][0]["recording"] voice_json = migrate_to_version_5(voice_json) @@ -957,7 +963,7 @@ def test_migrate_to_6(self): self.assertNotIn("recording", definition["action_sets"][0]["actions"][0]) def test_migrate_to_5_language(self): - flow_json = self.get_flow_json("multi_language_flow") + flow_json = self.load_flow_def("multi_language_flow") ruleset = flow_json["definition"]["rule_sets"][0] ruleset["operand"] = "@step.value|lower_case" @@ -980,7 +986,7 @@ def test_migrate_to_5_language(self): self.assertEqual("Otro", rules[0]["category"]["spa"]) def test_migrate_to_5(self): - flow = self.get_flow_json("favorites_v4") + flow = self.load_flow_def("favorites_v4") migrated = migrate_to_version_5(flow)["definition"] # first node should be a wait node @@ -1042,7 +1048,7 @@ def test_migrate_bad_group_names(self): # at the time of this fix for v in ("4", "5", "6", "7", "8", "9", "10"): error = 'Failure migrating group names "%s" forward from v%s' - flow = self.get_flow("favorites_bad_group_name_v%s" % v) + flow = self.load_flow("favorites_bad_group_name_v%s" % v) self.assertIsNotNone(flow, "Failure importing favorites from v%s" % v) self.assertTrue(ContactGroup.objects.filter(name="Contacts < 25").exists(), error % ("< 25", v)) self.assertTrue(ContactGroup.objects.filter(name="Contacts > 100").exists(), error % ("> 100", v)) @@ -1052,7 +1058,7 @@ def test_migrate_bad_group_names(self): flow.release(self.admin) def test_migrate_malformed_groups(self): - flow = self.get_flow("malformed_groups") + flow = self.load_flow("malformed_groups") self.assertIsNotNone(flow) self.assertTrue(ContactGroup.objects.filter(name="Contacts < 25").exists()) self.assertTrue(ContactGroup.objects.filter(name="Unknown").exists()) diff --git a/temba/flows/tests.py b/temba/flows/tests.py index da0f35f24b3..eee59e9a529 100644 --- a/temba/flows/tests.py +++ b/temba/flows/tests.py @@ -1156,24 +1156,6 @@ def test_flow_results_with_hidden_results(self): ], ) - def test_legacy_validate_definition(self): - with self.assertRaises(ValueError): - FlowRevision.validate_legacy_definition({"flow_type": "U", "nodes": []}) - - with self.assertRaises(ValueError): - FlowRevision.validate_legacy_definition(self.get_flow_json("not_fully_localized")) - - # base_language of null, but spec version 8 - with self.assertRaises(ValueError): - FlowRevision.validate_legacy_definition(self.get_flow_json("no_base_language_v8")) - - # base_language of 'eng' but non localized actions - with self.assertRaises(ValueError): - FlowRevision.validate_legacy_definition(self.get_flow_json("non_localized_with_language")) - - with self.assertRaises(ValueError): - FlowRevision.validate_legacy_definition(self.get_flow_json("non_localized_ruleset")) - def test_importing_dependencies(self): # create channel to be matched by name channel = self.create_channel("TG", "RapidPro Test", "12345324635") @@ -2143,7 +2125,7 @@ def test_get_definition(self): # make a flow that looks like a legacy flow flow = self.get_flow("color_v11") - original_def = self.get_flow_json("color_v11") + original_def = self.load_json("test_flows/color_v11.json")["flows"][0] flow.version_number = "11.12" flow.save(update_fields=("version_number",)) @@ -2173,7 +2155,7 @@ def test_fetch_revisions(self): # we should have one revision for an imported flow flow = self.get_flow("color_v11") - original_def = self.get_flow_json("color_v11") + original_def = self.load_json("test_flows/color_v11.json")["flows"][0] # rewind definition to legacy spec revision = flow.revisions.get() @@ -5297,6 +5279,28 @@ def test_mailroom_url(self): class FlowRevisionTest(TembaTest): + def test_validate_legacy_definition(self): + def validate(flow_def: dict, expected_error: str): + with self.assertRaises(ValueError) as cm: + FlowRevision.validate_legacy_definition(flow_def) + self.assertEqual(expected_error, str(cm.exception)) + + validate({"flow_type": "U", "nodes": []}, "unsupported flow type") + validate(self.load_json("test_flows/legacy/invalid/not_fully_localized.json"), "non-localized flow definition") + + # base_language of null, but spec version 8 + validate(self.load_json("test_flows/legacy/invalid/no_base_language_v8.json"), "non-localized flow definition") + + # base_language of 'eng' but non localized actions + validate( + self.load_json("test_flows/legacy/invalid/non_localized_with_language.json"), + "non-localized flow definition", + ) + + validate( + self.load_json("test_flows/legacy/invalid/non_localized_ruleset.json"), "non-localized flow definition" + ) + def test_trim_revisions(self): start = timezone.now() diff --git a/temba/orgs/tests.py b/temba/orgs/tests.py index 66f983b185a..ef2af8363c4 100644 --- a/temba/orgs/tests.py +++ b/temba/orgs/tests.py @@ -3901,7 +3901,7 @@ def test_import_validation(self): def test_trigger_dependency(self): # tests the case of us doing an export of only a single flow (despite dependencies) and making sure we # don't include the triggers of our dependent flows (which weren't exported) - self.import_file("parent_child_trigger") + self.import_file("test_flows/parent_child_trigger.json") parent = Flow.objects.filter(name="Parent Flow").first() @@ -3913,7 +3913,7 @@ def test_trigger_dependency(self): self.assertFalse(exported["triggers"]) def test_subflow_dependencies(self): - self.import_file("subflow") + self.import_file("test_flows/subflow.json") parent = Flow.objects.filter(name="Parent Flow").first() child = Flow.objects.filter(name="Child Flow").first() @@ -3993,7 +3993,7 @@ def test_import_errors(self): self.assertIsNone(Flow.objects.filter(org=self.org, name="New Mother").first()) def test_import_campaign_with_translations(self): - self.import_file("campaign_import_with_translations") + self.import_file("test_flows/campaign_import_with_translations.json") campaign = Campaign.objects.all().first() event = campaign.events.all().first() @@ -4011,7 +4011,7 @@ def test_import_campaign_with_translations(self): self.assertEqual(flow_def["localization"]["eng"][action["uuid"]]["text"], ["Hey"]) def test_reimport(self): - self.import_file("survey_campaign") + self.import_file("test_flows/survey_campaign.json") campaign = Campaign.objects.filter(is_active=True).last() event = campaign.events.filter(is_active=True).last() @@ -4021,7 +4021,7 @@ def test_reimport(self): campaign.group.contacts.add(sally) # importing it again shouldn't result in failures - self.import_file("survey_campaign") + self.import_file("test_flows/survey_campaign.json") # get our latest campaign and event new_campaign = Campaign.objects.filter(is_active=True).last() @@ -4032,7 +4032,7 @@ def test_reimport(self): self.assertNotEqual(event.id, new_event.id) def test_import_mixed_flow_versions(self): - self.import_file("mixed_versions") + self.import_file("test_flows/mixed_versions.json") group = ContactGroup.objects.get(name="Survey Audience") @@ -4051,7 +4051,7 @@ def test_import_mixed_flow_versions(self): self.assertEqual(dep_graph[parent], {child}) def test_import_dependency_types(self): - self.import_file("all_dependency_types") + self.import_file("test_flows/all_dependency_types.json") parent = Flow.objects.get(name="All Dep Types") child = Flow.objects.get(name="New Child") @@ -4081,7 +4081,7 @@ def test_import_flow_issues(self, mr_mocks): # final call is after new flows and dependencies have been committed so mailroom can see them mr_mocks.flow_inspect(dependencies=[{"key": "age", "name": "", "type": "field", "missing": False}]) - self.import_file("color") + self.import_file("test_flows/color.json") flow = Flow.objects.get() @@ -4089,7 +4089,7 @@ def test_import_flow_issues(self, mr_mocks): def test_import_missing_flow_dependency(self): # in production this would blow up validating the flow but we can't do that during tests - self.import_file("parent_without_its_child") + self.import_file("test_flows/parent_without_its_child.json") parent = Flow.objects.get(name="Single Parent") self.assertEqual(set(parent.flow_dependencies.all()), set()) @@ -4097,7 +4097,7 @@ def test_import_missing_flow_dependency(self): # create child with that name and re-import child1 = Flow.create(self.org, self.admin, "New Child", Flow.TYPE_MESSAGE) - self.import_file("parent_without_its_child") + self.import_file("test_flows/parent_without_its_child.json") self.assertEqual(set(parent.flow_dependencies.all()), {child1}) # create child with that UUID and re-import @@ -4105,7 +4105,7 @@ def test_import_missing_flow_dependency(self): self.org, self.admin, "New Child 2", Flow.TYPE_MESSAGE, uuid="a925453e-ad31-46bd-858a-e01136732181" ) - self.import_file("parent_without_its_child") + self.import_file("test_flows/parent_without_its_child.json") self.assertEqual(set(parent.flow_dependencies.all()), {child2}) def validate_flow_dependencies(self, definition): @@ -4132,7 +4132,7 @@ def test_implicit_field_and_group_imports(self): """ Tests importing flow definitions without fields and groups included in the export """ - data = self.get_import_json("cataclysm") + data = self.load_json("test_flows/cataclysm.json") del data["fields"] del data["groups"] @@ -4154,7 +4154,7 @@ def test_implicit_field_and_explicit_group_imports(self, mr_mocks): """ Tests importing flow definitions with groups included in the export but not fields """ - data = self.get_import_json("cataclysm") + data = self.load_json("test_flows/cataclysm.json") del data["fields"] mr_mocks.contact_parse_query("facts_per_day = 1", fields=["facts_per_day"]) @@ -4197,7 +4197,7 @@ def test_explicit_field_and_group_imports(self, mr_mocks): mr_mocks.contact_parse_query("facts_per_day = 1", fields=["facts_per_day"]) mr_mocks.contact_parse_query("likes_cats = true", cleaned='likes_cats = "true"', fields=["likes_cats"]) - self.import_file("cataclysm") + self.import_file("test_flows/cataclysm.json") flow = Flow.objects.get(name="Cataclysmic") self.validate_flow_dependencies(flow.get_definition()) @@ -4242,7 +4242,7 @@ def test_import_flow_with_triggers(self): self.org, self.admin, Trigger.TYPE_KEYWORD, flow2, keywords=["rating"], match_type=Trigger.MATCH_FIRST_WORD ) - data = self.get_import_json("rating_10") + data = self.load_json("test_flows/rating_10.json") self.org.import_app(data, self.admin, site="http://rapidpro.io") @@ -4264,7 +4264,7 @@ def test_import_flow_with_triggers(self): flow_trigger.archive(self.admin) # re import again will restore the trigger - data = self.get_import_json("rating_10") + data = self.load_json("test_flows/rating_10.json") self.org.import_app(data, self.admin, site="http://rapidpro.io") flow_trigger.refresh_from_db() @@ -4312,7 +4312,7 @@ def assert_object_counts(): ) # import all our bits - self.import_file("the_clinic") + self.import_file("test_flows/the_clinic.json") confirm_appointment = Flow.objects.get(name="Confirm Appointment") self.assertEqual(10080, confirm_appointment.expires_after_minutes) @@ -4334,7 +4334,7 @@ def assert_object_counts(): message_flow.update_single_message_flow(self.admin, {"eng": "No reminders for you!"}, base_language="eng") # now reimport - self.import_file("the_clinic") + self.import_file("test_flows/the_clinic.json") # our flow should get reset from the import confirm_appointment.refresh_from_db() diff --git a/temba/tests/base.py b/temba/tests/base.py index 34a7140e44f..1bc0b49a731 100644 --- a/temba/tests/base.py +++ b/temba/tests/base.py @@ -1,4 +1,5 @@ import copy +import os from datetime import datetime from functools import wraps from io import BytesIO @@ -165,26 +166,31 @@ def login(self, user, update_last_auth_on: bool = True, choose_org=None): session.update({"org_id": choose_org.id}) session.save() - def import_file(self, filename, site="http://rapidpro.io", substitutions=None): - data = self.get_import_json(filename, substitutions=substitutions) - self.org.import_app(data, self.admin, site=site) + def load_json(self, path: str, substitutions=None) -> dict: + """ + Loads a JSON test file from a path relatve to the media directory + """ - def get_import_json(self, filename, substitutions=None): - handle = open("%s/test_flows/%s.json" % (settings.MEDIA_ROOT, filename), "r+") - data = handle.read() - handle.close() + with open(os.path.join(settings.MEDIA_ROOT, path), "r") as f: + data = f.read() - if substitutions: - for k, v in substitutions.items(): - print('Replacing "%s" with "%s"' % (k, v)) - data = data.replace(k, str(v)) + if substitutions: + for k, v in substitutions.items(): + data = data.replace(k, str(v)) - return json.loads(data) + return json.loads(data) + + def import_file(self, path: str, substitutions=None): + """ + Imports definitions from a JSON file + """ + + self.org.import_app(self.load_json(path, substitutions), self.admin, site="http://rapidpro.io") def get_flow(self, filename, substitutions=None, name=None): now = timezone.now() - self.import_file(filename, substitutions=substitutions) + self.import_file(f"test_flows/{filename}.json", substitutions=substitutions) imported_flows = Flow.objects.filter(org=self.org, saved_on__gt=now) flow = imported_flows.filter(name=name).first() if name else imported_flows.order_by("id").last() @@ -194,10 +200,6 @@ def get_flow(self, filename, substitutions=None, name=None): flow.org = self.org return flow - def get_flow_json(self, filename, substitutions=None): - data = self.get_import_json(filename, substitutions=substitutions) - return data["flows"][0] - def create_user(self, email, group_names=(), **kwargs): user = User.objects.create_user(username=email, email=email, **kwargs) user.set_password(self.default_password) From b71fa5c66f0506cc3b53137552321384d27ff25a Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Fri, 23 Aug 2024 18:08:22 +0000 Subject: [PATCH 2/2] Delete no longer used test flows --- media/test_flows/add_label.json | 107 --- media/test_flows/bad_send_action.json | 57 -- media/test_flows/cataclysm_legacy.json | 252 ------ media/test_flows/child.json | 37 - media/test_flows/color_gender_age.json | 215 ----- media/test_flows/favorites_timeout.json | 341 -------- media/test_flows/flow_starts.json | 141 --- media/test_flows/group_split.json | 296 ------- media/test_flows/loop_detection.json | 275 ------ media/test_flows/no_ruleset_flow.json | 36 - .../numeric_rule_allows_variables.json | 104 --- media/test_flows/parent.json | 59 -- media/test_flows/pick_a_number.json | 89 -- media/test_flows/preprocess.json | 71 -- media/test_flows/quick_replies.json | 156 ---- media/test_flows/random_word.json | 74 -- media/test_flows/rules_first.json | 120 --- media/test_flows/ruleset_loop.json | 142 --- media/test_flows/send_all.json | 40 - media/test_flows/sms_form.json | 299 ------- media/test_flows/start_missing_flow.json | 164 ---- .../start_missing_flow_from_actionset.json | 50 -- media/test_flows/substitution.json | 98 --- media/test_flows/test_db.json | 822 ------------------ media/test_flows/triggered.json | 106 --- media/test_flows/triggered_flow.json | 69 -- media/test_flows/two_to_all.json | 48 - media/test_flows/ussd_example.json | 160 ---- media/test_flows/webhook_rule_first.json | 69 -- media/test_flows/with_message_topic.json | 47 - 30 files changed, 4544 deletions(-) delete mode 100644 media/test_flows/add_label.json delete mode 100644 media/test_flows/bad_send_action.json delete mode 100644 media/test_flows/cataclysm_legacy.json delete mode 100644 media/test_flows/child.json delete mode 100644 media/test_flows/color_gender_age.json delete mode 100644 media/test_flows/favorites_timeout.json delete mode 100644 media/test_flows/flow_starts.json delete mode 100644 media/test_flows/group_split.json delete mode 100644 media/test_flows/loop_detection.json delete mode 100644 media/test_flows/no_ruleset_flow.json delete mode 100644 media/test_flows/numeric_rule_allows_variables.json delete mode 100644 media/test_flows/parent.json delete mode 100644 media/test_flows/pick_a_number.json delete mode 100644 media/test_flows/preprocess.json delete mode 100644 media/test_flows/quick_replies.json delete mode 100644 media/test_flows/random_word.json delete mode 100644 media/test_flows/rules_first.json delete mode 100644 media/test_flows/ruleset_loop.json delete mode 100644 media/test_flows/send_all.json delete mode 100644 media/test_flows/sms_form.json delete mode 100644 media/test_flows/start_missing_flow.json delete mode 100644 media/test_flows/start_missing_flow_from_actionset.json delete mode 100644 media/test_flows/substitution.json delete mode 100644 media/test_flows/test_db.json delete mode 100644 media/test_flows/triggered.json delete mode 100644 media/test_flows/triggered_flow.json delete mode 100644 media/test_flows/two_to_all.json delete mode 100644 media/test_flows/ussd_example.json delete mode 100644 media/test_flows/webhook_rule_first.json delete mode 100644 media/test_flows/with_message_topic.json diff --git a/media/test_flows/add_label.json b/media/test_flows/add_label.json deleted file mode 100644 index 9a41dc555db..00000000000 --- a/media/test_flows/add_label.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "version": "11.10", - "site": "https://textit.in", - "flows": [ - { - "entry": "22505d46-43c5-42ba-975e-725c01ea440f", - "action_sets": [ - { - "uuid": "22505d46-43c5-42ba-975e-725c01ea440f", - "x": 100, - "y": 0, - "destination": "f3a1a671-5f5b-489e-9410-9a09fa5eaafb", - "actions": [ - { - "type": "reply", - "uuid": "27dfd8ac-55c5-49c9-88e3-3fb84a9894ff", - "msg": { - "eng": "Hey" - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "6e2b09ec-3cc0-4ee6-ae7b-b76bad3ab6d3" - }, - { - "uuid": "f3a1a671-5f5b-489e-9410-9a09fa5eaafb", - "x": 95, - "y": 101, - "destination": "78c20ee4-94bd-45e6-8510-8e602568fb6e", - "actions": [ - { - "type": "add_label", - "uuid": "bc82c11d-7654-44e4-966c-fb39e2851df0", - "labels": [ - { - "uuid": "0bfecd01-9612-48ab-8c49-72170de6ee49", - "name": "Hello" - } - ] - } - ], - "exit_uuid": "84bf44a1-13fd-44cb-8014-d6feb06e010f" - }, - { - "uuid": "7ca2b0ef-0b23-4c6e-bccb-c5f2d62d2663", - "x": 146, - "y": 358, - "destination": null, - "actions": [ - { - "type": "add_label", - "uuid": "910bf3b5-951f-47a8-93df-11a6eac8bf0f", - "labels": [ - { - "uuid": "0bfecd01-9612-48ab-8c49-72170de6ee49", - "name": "Hello" - } - ] - } - ], - "exit_uuid": "6d579c28-9f3f-4584-bd2e-74009612fdbb" - } - ], - "rule_sets": [ - { - "uuid": "78c20ee4-94bd-45e6-8510-8e602568fb6e", - "x": 85, - "y": 219, - "label": "Response 1", - "rules": [ - { - "uuid": "33438bbf-49bd-4468-9a74-bbd7e1f58f57", - "category": { - "eng": "All Responses" - }, - "destination": "7ca2b0ef-0b23-4c6e-bccb-c5f2d62d2663", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "wait_message", - "response_type": "", - "operand": "@step.value", - "config": {} - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.10", - "metadata": { - "name": "Add Label", - "saved_on": "2019-02-12T09:23:05.746930Z", - "revision": 7, - "uuid": "e9b5b8ba-43f4-4bc2-a790-811ee1cfe392", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/bad_send_action.json b/media/test_flows/bad_send_action.json deleted file mode 100644 index d5b66d3eae2..00000000000 --- a/media/test_flows/bad_send_action.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "base_language": "base", - "action_sets": [ - { - "y": 795, - "x": 705, - "destination": "610d3c9d-7d2c-4aa4-b0eb-a07c823f6964", - "uuid": "0406607c-e711-4cbb-9c69-cbe3ce785dbd", - "actions": [ - { - "uuid": "c7e3dc19-dc4a-45a0-a4f7-7f57720c3ce5", - "contacts": [ - { - "urns": [ - { - "priority": 50, - "path": "+14255551212", - "scheme": "tel" - } - ], - "id": "contact1_id", - "name": "Mark" - }, - { - "urns": [ - { - "priority": 50, - "path": "+12065551212", - "scheme": "tel" - } - ], - "id": "contact2_id", - "name": "Gregg" - } - ], - "variables": [], - "groups": [], - "msg": { - "base": "Hey there, here's a message." - }, - "type": "send" - } - ] - }], - "version": 8, - "flow_type": "F", - "entry": "d41f3f4d-1742-44a0-b5d5-3d814c804832", - "rule_sets": [], - "type": "F", - "metadata": { - "revision": 110, - "expires": 5, - "saved_on": "2015-12-08T17:55:01.020719Z", - "uuid": "9e73669a-e71b-4e2d-ba3e-336ff0e6447b", - "name": "Send Action Test" - } -} \ No newline at end of file diff --git a/media/test_flows/cataclysm_legacy.json b/media/test_flows/cataclysm_legacy.json deleted file mode 100644 index 64500d8117c..00000000000 --- a/media/test_flows/cataclysm_legacy.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "version": "11.5", - "site": "https://textit.in", - "flows": [ - { - "entry": "c4462613-5936-42cc-a286-82e5f1816793", - "action_sets": [ - { - "uuid": "eca0f1d7-59ef-4a7c-a4a9-9bbd049eb144", - "x": 76, - "y": 99, - "destination": "d21be990-5e48-4e4b-995f-c9df8f38e517", - "actions": [ - { - "type": "add_group", - "uuid": "feb7a33e-bc8b-44d8-9112-bc4e910fe304", - "groups": [ - { - "uuid": "1966e54a-fc30-4a96-81ea-9b0185b8b7de", - "name": "Cat Fanciers" - } - ] - }, - { - "type": "add_group", - "uuid": "ca82f0e0-43ca-426c-a77c-93cf297b8e7c", - "groups": [ - { - "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", - "name": "Catnado" - } - ] - }, - { - "type": "reply", - "uuid": "d57e9e9f-ada4-4a22-99ef-b8bf3dbcdcae", - "msg": { - "eng": "You are a cat fan! Purrrrr." - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "55f88a1e-73ad-4b6d-9a04-626046bbe5a8" - }, - { - "uuid": "ef389049-d2e3-4343-b91f-13ea2db5f943", - "x": 558, - "y": 94, - "destination": "d21be990-5e48-4e4b-995f-c9df8f38e517", - "actions": [ - { - "type": "del_group", - "uuid": "cea907a8-af81-49af-92e6-f246e52179fe", - "groups": [ - { - "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", - "name": "Catnado" - } - ] - }, - { - "type": "reply", - "uuid": "394a328f-f829-43f2-9975-fe2f27c8b786", - "msg": { - "eng": "You are not a cat fan. Hissssss." - }, - "media": {}, - "quick_replies": [], - "send_all": false - } - ], - "exit_uuid": "9ba78afa-948e-44c5-992f-84030f2eaa6b" - }, - { - "uuid": "d21be990-5e48-4e4b-995f-c9df8f38e517", - "x": 319, - "y": 323, - "destination": "35416fea-787d-48c1-b839-76eca089ad2e", - "actions": [ - { - "type": "channel", - "uuid": "78c58574-9f91-4c27-855e-73eacc99c395", - "channel": "bd55bb31-8ed4-4f89-b903-7103aa3762be", - "name": "Telegram: TextItBot" - } - ], - "exit_uuid": "c86638a9-2688-47c9-83ec-7f10ef49de1e" - }, - { - "uuid": "35416fea-787d-48c1-b839-76eca089ad2e", - "x": 319, - "y": 468, - "destination": null, - "actions": [ - { - "type": "reply", - "uuid": "30d35b8f-f439-482a-91b1-d3b1a4351071", - "msg": { - "eng": "All done." - }, - "media": {}, - "quick_replies": [], - "send_all": false - }, - { - "type": "send", - "uuid": "a7b6def8-d315-49bd-82e4-85887f39babe", - "msg": { - "eng": "Hey Cat Fans!" - }, - "contacts": [], - "groups": [ - { - "uuid": "47b1b36c-7736-47b9-b63a-c0ebfb610e61", - "name": "Cat Blasts" - } - ], - "variables": [], - "media": {} - }, - { - "type": "trigger-flow", - "uuid": "540965e5-bdfe-4416-b4dd-449220b1c588", - "flow": { - "uuid": "ef9603ff-3886-4e5e-8870-0f643b6098de", - "name": "Cataclysmic" - }, - "contacts": [], - "groups": [ - { - "uuid": "22a48356-71e9-4ae1-9f93-4021855c0bd5", - "name": "Cat Alerts" - } - ], - "variables": [] - } - ], - "exit_uuid": "f2ef5066-434d-42bc-a5cb-29c59e51432f" - } - ], - "rule_sets": [ - { - "uuid": "c4462613-5936-42cc-a286-82e5f1816793", - "x": 294, - "y": 0, - "label": "Response 1", - "rules": [ - { - "uuid": "17d69564-60c9-4a56-be8b-34e98a2ce14a", - "category": { - "eng": "Cat Facts" - }, - "destination": "eca0f1d7-59ef-4a7c-a4a9-9bbd049eb144", - "destination_type": "A", - "test": { - "type": "in_group", - "test": { - "name": "Cat Facts", - "uuid": "c7bc1eef-b7aa-4959-ab90-3e33e0d3b1f9" - } - }, - "label": null - }, - { - "uuid": "a9ec4d0a-2ddd-4a13-a1d2-c63ce9916a04", - "category": { - "eng": "Other" - }, - "destination": "ef389049-d2e3-4343-b91f-13ea2db5f943", - "destination_type": "A", - "test": { - "type": "true" - }, - "label": null - } - ], - "finished_key": null, - "ruleset_type": "group", - "response_type": "", - "operand": "@step.value", - "config": {} - } - ], - "base_language": "eng", - "flow_type": "M", - "version": "11.5", - "metadata": { - "name": "Cataclysmic", - "saved_on": "2018-10-18T17:03:54.835916Z", - "revision": 49, - "uuid": "ef9603ff-3886-4e5e-8870-0f643b6098de", - "expires": 10080, - "notes": [] - } - }, - { - "entry": "0429d1f9-82ed-4198-80a2-3b213aa11fd5", - "action_sets": [ - { - "uuid": "0429d1f9-82ed-4198-80a2-3b213aa11fd5", - "x": 100, - "y": 0, - "destination": null, - "actions": [ - { - "type": "add_group", - "uuid": "11f61fc6-834e-4cbc-88ee-c834279345e6", - "groups": [ - { - "uuid": "22a48356-71e9-4ae1-9f93-4021855c0bd5", - "name": "Cat Alerts" - }, - { - "uuid": "c7bc1eef-b7aa-4959-ab90-3e33e0d3b1f9", - "name": "Cat Facts" - }, - { - "uuid": "47b1b36c-7736-47b9-b63a-c0ebfb610e61", - "name": "Cat Blasts" - }, - { - "uuid": "1966e54a-fc30-4a96-81ea-9b0185b8b7de", - "name": "Cat Fanciers" - }, - { - "uuid": "bc4d7100-60ac-44f0-aa78-0ec9373d2c2f", - "name": "Catnado" - } - ] - } - ], - "exit_uuid": "029a7c9d-c935-4ed1-9573-543ded29d954" - } - ], - "rule_sets": [], - "base_language": "eng", - "flow_type": "M", - "version": "11.5", - "metadata": { - "name": "Catastrophe", - "saved_on": "2018-10-18T19:03:07.702388Z", - "revision": 1, - "uuid": "d6dd96b1-d500-4c7a-9f9c-eae3f2a2a7c5", - "expires": 10080 - } - } - ], - "campaigns": [], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/child.json b/media/test_flows/child.json deleted file mode 100644 index 3edf4d2111e..00000000000 --- a/media/test_flows/child.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "entry": "f692e793-75a8-45a7-ba8c-4d568bd9d8a8", - "rule_sets": [], - "action_sets": [ - { - "y": 1, - "x": 107, - "destination": null, - "uuid": "f692e793-75a8-45a7-ba8c-4d568bd9d8a8", - "actions": [ - { - "uuid": "c9d2abd9-0966-435a-8663-d716b4393df5", - "value": "@date", - "label": "Campaign Date", - "field": "campaign_date", - "action": "GET", - "type": "save" - } - ] - } - ], - "last_saved": "2014-11-20T20:49:08.254645Z", - "metadata": {} - }, - "flow_type": "F", - "name": "Child", - "id": 300 - } - ], - "triggers": [] -} diff --git a/media/test_flows/color_gender_age.json b/media/test_flows/color_gender_age.json deleted file mode 100644 index 93387ef4308..00000000000 --- a/media/test_flows/color_gender_age.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "entry": "5dc9d8e1-90c6-4043-bf97-73d35138dc00", - "rule_sets": [ - { - "uuid": "c1911a46-ba8e-48e2-be8f-7c0be30edcdd", - "response_type": "C", - "rules": [ - { - "test": { - "test": "red", - "type": "contains_any" - }, - "category": "Red", - "destination": "f3b33749-c799-47f2-b242-160be2001550", - "uuid": "5a6cd1ec-6d09-4356-9fc0-7b7b71739add" - }, - { - "test": { - "test": "blue", - "type": "contains_any" - }, - "category": "Blue", - "destination": "f3b33749-c799-47f2-b242-160be2001550", - "uuid": "9e496bfe-227c-484e-9a3d-2ba607383c52" - }, - { - "test": { - "test": "green", - "type": "contains_any" - }, - "category": "Green", - "destination": "f3b33749-c799-47f2-b242-160be2001550", - "uuid": "075bb3b0-b104-4acf-8ee7-33046b207343" - }, - { - "test": { - "test": "maroon", - "type": "contains_any" - }, - "category": "Red", - "destination": "f3b33749-c799-47f2-b242-160be2001550", - "uuid": "2c9eb7fe-6084-47f3-9a70-745b11e76991" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": "f3b33749-c799-47f2-b242-160be2001550", - "uuid": "7d217ae2-0a07-45db-95bb-32a887dc1f94" - } - ], - "label": "Color", - "operand": "@step.value", - "y": 146, - "x": 290 - }, - { - "uuid": "fd47736c-6b31-4330-8d49-7dfff3e391a1", - "response_type": "C", - "rules": [ - { - "test": { - "test": "Male", - "type": "contains_any" - }, - "category": "Male", - "destination": "5ad1b145-58ba-4b65-8cb5-84d98172b221", - "uuid": "e86168bc-64fc-4458-a970-884b11b96ffa" - }, - { - "test": { - "test": "Female", - "type": "contains_any" - }, - "category": "Female", - "destination": "5ad1b145-58ba-4b65-8cb5-84d98172b221", - "uuid": "5caa68fe-d64e-4ca6-a782-305930095c62" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": "5ad1b145-58ba-4b65-8cb5-84d98172b221", - "uuid": "129ee4dc-2dff-4973-9d59-d9ccfc8748e1" - } - ], - "label": "Gender", - "operand": "@step.value", - "y": 414, - "x": 384 - }, - { - "uuid": "edec8286-536b-4924-8b94-0af69b41d4c2", - "response_type": "C", - "rules": [ - { - "test": { - "test": "18", - "type": "lt" - }, - "category": "Child", - "destination": "f25f5e8b-dc93-442b-a92d-8d01730e1d99", - "uuid": "c299e0cd-9c6a-4a3c-b7d5-9aa162d58062" - }, - { - "test": { - "test": "65", - "type": "lt" - }, - "category": "Adult", - "destination": "f25f5e8b-dc93-442b-a92d-8d01730e1d99", - "uuid": "139189b0-b4bf-4cfd-ab66-91ea3b40b406" - }, - { - "test": { - "type": "number" - }, - "category": "Senior", - "destination": "f25f5e8b-dc93-442b-a92d-8d01730e1d99", - "uuid": "23265c0d-4a6e-44a7-8d55-f549c801ccd9" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": "f25f5e8b-dc93-442b-a92d-8d01730e1d99", - "uuid": "323b6e22-ae27-405e-b19d-b266f50b2db8" - } - ], - "label": "Age", - "operand": "@step.value", - "y": 695, - "x": 390 - } - ], - "action_sets": [ - { - "y": 0, - "x": 228, - "destination": "c1911a46-ba8e-48e2-be8f-7c0be30edcdd", - "uuid": "5dc9d8e1-90c6-4043-bf97-73d35138dc00", - "actions": [ - { - "msg": "What is your favorite color?", - "type": "reply" - } - ] - }, - { - "y": 298, - "x": 223, - "destination": "fd47736c-6b31-4330-8d49-7dfff3e391a1", - "uuid": "f3b33749-c799-47f2-b242-160be2001550", - "actions": [ - { - "msg": "What is your gender?", - "type": "reply" - } - ] - }, - { - "y": 557, - "x": 224, - "destination": "edec8286-536b-4924-8b94-0af69b41d4c2", - "uuid": "5ad1b145-58ba-4b65-8cb5-84d98172b221", - "actions": [ - { - "type": "save", - "field": "gender", - "label": "Gender", - "value": "@flow.gender" - }, - { - "msg": "What is your age?", - "type": "reply" - } - ] - }, - { - "y": 832, - "x": 217, - "destination": null, - "uuid": "f25f5e8b-dc93-442b-a92d-8d01730e1d99", - "actions": [ - { - "msg": "Thanks.", - "type": "reply" - } - ] - } - ], - "last_saved": "2014-06-26T14:18:09.205715Z", - "metadata": { - "notes": [] - } - }, - "flow_type": "F", - "name": "Color Age Gender", - "id": 23323 - } - ], - "triggers": [] -} diff --git a/media/test_flows/favorites_timeout.json b/media/test_flows/favorites_timeout.json deleted file mode 100644 index 276578cf45f..00000000000 --- a/media/test_flows/favorites_timeout.json +++ /dev/null @@ -1,341 +0,0 @@ -{ - "version": 7, - "flows": [ - { - "version": 7, - "flow_type": "M", - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "2bff5c33-9d29-4cfc-8bb7-0a1b9f97d830", - "uuid": "127f3736-77ce-4006-9ab0-0c07cea88956", - "actions": [ - { - "msg": { - "base": "What is your favorite color?" - }, - "type": "reply" - } - ] - }, - { - "y": 237, - "x": 131, - "destination": "a5fc5f8a-f562-4b03-a54f-51928f9df07e", - "uuid": "44471ade-7979-4c94-8028-6cfb68836337", - "actions": [ - { - "msg": { - "base": "Good choice, I like @flow.color.category too! What is your favorite beer?" - }, - "type": "reply" - } - ] - }, - { - "y": 8, - "x": 456, - "destination": "2bff5c33-9d29-4cfc-8bb7-0a1b9f97d830", - "uuid": "f9adf38f-ab18-49d3-a8ac-db2fe8f1e77f", - "actions": [ - { - "msg": { - "base": "I don't know that color. Try again." - }, - "type": "reply" - } - ] - }, - { - "y": 535, - "x": 191, - "destination": "ba95c5cd-e428-4a15-8b4b-23dd43943f2c", - "uuid": "89c5624e-3320-4668-a066-308865133080", - "actions": [ - { - "msg": { - "base": "Mmmmm... delicious @flow.beer.category. If only they made @flow.color|lower_case @flow.beer.category! Lastly, what is your name?" - }, - "type": "reply" - } - ] - }, - { - "y": 265, - "x": 512, - "destination": "a5fc5f8a-f562-4b03-a54f-51928f9df07e", - "uuid": "a269683d-8229-4870-8585-be8320b9d8ca", - "actions": [ - { - "msg": { - "base": "I don't know that one, try again please." - }, - "type": "reply" - } - ] - }, - { - "y": 805, - "x": 191, - "destination": null, - "uuid": "10e483a8-5ffb-4c4f-917b-d43ce86c1d65", - "actions": [ - { - "msg": { - "base": "Thanks @flow.name, we are all done!" - }, - "type": "reply" - } - ] - }, - { - "uuid": "ba96d1c6-c721-470a-a04c-74015b1fdd35", - "x": 752, - "y": 1278, - "destination": null, - "actions": [ - { - "type": "reply", - "msg": { - "base": "Sorry you can't participate right now, I'll try again later." - } - } - ] - } - ], - "last_saved": "2015-09-15T02:37:08.805578Z", - "entry": "127f3736-77ce-4006-9ab0-0c07cea88956", - "rule_sets": [ - { - "uuid": "2bff5c33-9d29-4cfc-8bb7-0a1b9f97d830", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "base": "Red" - }, - "type": "contains_any" - }, - "category": { - "base": "Red" - }, - "destination": "44471ade-7979-4c94-8028-6cfb68836337", - "uuid": "8cd25a3f-0be2-494b-8b4c-3a4f0de7f9b2", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Green" - }, - "type": "contains_any" - }, - "category": { - "base": "Green" - }, - "destination": "44471ade-7979-4c94-8028-6cfb68836337", - "uuid": "db2863cf-7fda-4489-9345-d44dacf4e750", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Blue" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "44471ade-7979-4c94-8028-6cfb68836337", - "uuid": "2f462678-b176-49c1-bb5c-6e152502b0db", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Navy" - }, - "type": "contains_any" - }, - "category": { - "base": "Blue" - }, - "destination": "44471ade-7979-4c94-8028-6cfb68836337", - "uuid": "ecaeb59a-d7f1-4c21-a207-b2a29cc2488f", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Cyan" - }, - "type": "contains_any" - }, - "category": { - "base": "Cyan" - }, - "destination": null, - "uuid": "6f463a78-b176-49c1-bb5c-6e152502b0db", - "destination_type": null - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "f9adf38f-ab18-49d3-a8ac-db2fe8f1e77f", - "uuid": "df4455c2-806b-4af4-8ea9-f40278ec10e4", - "destination_type": "A" - }, - { - "uuid": "1023e76b-bd81-4720-a95e-a54a8fc3c328", - "category": { - "base": "No Response" - }, - "destination": "ba96d1c6-c721-470a-a04c-74015b1fdd35", - "destination_type": "A", - "test": { - "type": "timeout", - "minutes": 5 - } - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Color", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 129, - "x": 98, - "config": {} - }, - { - "uuid": "a5fc5f8a-f562-4b03-a54f-51928f9df07e", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "base": "Mutzig" - }, - "type": "contains_any" - }, - "category": { - "base": "Mutzig" - }, - "destination": "89c5624e-3320-4668-a066-308865133080", - "uuid": "ea304225-332e-49d4-9768-1e804cd0b6c2", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Primus" - }, - "type": "contains_any" - }, - "category": { - "base": "Primus" - }, - "destination": "89c5624e-3320-4668-a066-308865133080", - "uuid": "57f8688e-c263-43d7-bd06-bdb98f0c58a8", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Turbo King" - }, - "type": "contains_any" - }, - "category": { - "base": "Turbo King" - }, - "destination": "89c5624e-3320-4668-a066-308865133080", - "uuid": "670f0205-bb39-4e12-ae95-5e29251b8a3e", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Skol" - }, - "type": "contains_any" - }, - "category": { - "base": "Skol" - }, - "destination": "89c5624e-3320-4668-a066-308865133080", - "uuid": "2ff4713f-c62f-445c-880c-de8f6532d090", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "a269683d-8229-4870-8585-be8320b9d8ca", - "uuid": "1fc4c133-d038-4f75-a69e-6e7e3190e5d8", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Beer", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 387, - "x": 112, - "config": {} - }, - { - "uuid": "ba95c5cd-e428-4a15-8b4b-23dd43943f2c", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "destination": "10e483a8-5ffb-4c4f-917b-d43ce86c1d65", - "uuid": "c072ecb5-0686-40ea-8ed3-898dc1349783", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Name", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 702, - "x": 191, - "config": {} - } - ], - "metadata": { - "notes": [], - "name": "Favorites", - "id": 35559, - "expires": 720, - "revision": 1 - } - } - ], - "triggers": [] -} diff --git a/media/test_flows/flow_starts.json b/media/test_flows/flow_starts.json deleted file mode 100644 index 702c333367a..00000000000 --- a/media/test_flows/flow_starts.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "campaigns": [], - "version": 4, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "f4eba3d0-3bfc-4564-a3ee-662cb0fac950", - "uuid": "f1eaf53b-27d8-4e93-818e-4c4808b21976", - "actions": [] - } - ], - "last_saved": "2015-03-31T13:24:32.741812Z", - "entry": "f1eaf53b-27d8-4e93-818e-4c4808b21976", - "rule_sets": [ - { - "uuid": "f4eba3d0-3bfc-4564-a3ee-662cb0fac950", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses", - "eng": "Other" - }, - "destination": null, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - }, - "uuid": "e0d2f9fb-a300-4a21-b258-e594bd260310" - } - ], - "webhook": null, - "label": "Message Response", - "operand": "@step.value", - "finished_key": null, - "response_type": "C", - "y": 0, - "x": 200 - } - ], - "metadata": {} - }, - "id": 13968, - "flow_type": "F", - "name": "Child Flow" - }, - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 163, - "x": 201, - "destination": null, - "uuid": "59fa8d6c-50fd-4686-a45f-d9a30f616b80", - "actions": [ - { - "type": "flow", - "name": "Child Flow", - "id": 13968 - } - ] - } - ], - "last_saved": "2015-03-31T13:27:02.568148Z", - "entry": "f4eba3d0-3bfc-4564-a3ee-662cb0fac9f0", - "rule_sets": [ - { - "uuid": "f4eba3d0-3bfc-4564-a3ee-662cb0fac9f0", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": { - "eng": "Foo" - }, - "base": "Foo", - "type": "contains_any" - }, - "category": { - "base": "Foo", - "eng": "Foo" - }, - "config": { - "type": "contains_any", - "verbose_name": "has any of these words", - "name": "Contains any", - "localized": true, - "operands": 1 - }, - "uuid": "0265fb76-e6df-458f-8727-0b2d08f040ec" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses", - "eng": "Other" - }, - "destination": "59fa8d6c-50fd-4686-a45f-d9a30f616b80", - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - }, - "uuid": "e0d2f9fb-a300-4a21-b258-e594bd26030d" - } - ], - "webhook": null, - "label": "Response 1", - "operand": "@contact.groups", - "finished_key": null, - "response_type": "C", - "y": 0, - "x": 129 - } - ], - "metadata": {} - }, - "id": 600, - "flow_type": "F", - "name": "Parent Flow" - } - ], - "triggers": [] -} diff --git a/media/test_flows/group_split.json b/media/test_flows/group_split.json deleted file mode 100644 index 02be28c5123..00000000000 --- a/media/test_flows/group_split.json +++ /dev/null @@ -1,296 +0,0 @@ -{ - "campaigns": [], - "version": 10, - "site": "https://textit.in", - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 83, - "destination": "fa26edf9-e78f-4131-b5df-3bd84a1390f5", - "uuid": "1bf3f286-be43-45c3-8146-020a8f224591", - "actions": [ - { - "msg": { - "eng": "Group management! Toggle group membership with:\n(Add|Remove) \n\n@contact.groups" - }, - "type": "reply" - } - ] - }, - { - "y": 376, - "x": 545, - "destination": "403ded9b-edcc-4392-adf1-3de81088cdc1", - "uuid": "21b3cd69-e67c-402a-b977-566f94e8e7ec", - "actions": [ - { - "type": "add_group", - "groups": [ - "@flow.group_name" - ] - } - ] - }, - { - "y": 375, - "x": 786, - "destination": "403ded9b-edcc-4392-adf1-3de81088cdc1", - "uuid": "60d74019-f9c2-4665-bcab-0a4ba659b6af", - "actions": [ - { - "type": "del_group", - "groups": [ - "@flow.group_name" - ] - } - ] - }, - { - "y": 24, - "x": 733, - "destination": "1bf3f286-be43-45c3-8146-020a8f224591", - "uuid": "514fc3f0-fd04-4c27-92fb-bc348121c8ef", - "actions": [ - { - "msg": { - "eng": "Sorry, don't get that command." - }, - "type": "reply" - } - ] - }, - { - "y": 493, - "x": 177, - "destination": "403ded9b-edcc-4392-adf1-3de81088cdc1", - "uuid": "a9cd6587-61a7-4ab6-9a20-edf1f9cff033", - "actions": [ - { - "msg": { - "eng": "You are in @flow.member.category" - }, - "type": "reply" - } - ] - }, - { - "y": 466, - "x": 397, - "destination": "403ded9b-edcc-4392-adf1-3de81088cdc1", - "uuid": "f0c02e2b-6f24-48a7-9c8b-d49165387014", - "actions": [ - { - "msg": { - "eng": "You aren't in either group." - }, - "type": "reply" - } - ] - }, - { - "y": 587, - "x": 545, - "destination": "fa26edf9-e78f-4131-b5df-3bd84a1390f5", - "uuid": "403ded9b-edcc-4392-adf1-3de81088cdc1", - "actions": [ - { - "msg": { - "eng": "Awaiting command." - }, - "type": "reply" - } - ] - } - ], - "version": 10, - "flow_type": "F", - "entry": "1bf3f286-be43-45c3-8146-020a8f224591", - "rule_sets": [ - { - "uuid": "fa26edf9-e78f-4131-b5df-3bd84a1390f5", - "rules": [ - { - "test": { - "test": { - "eng": "split" - }, - "type": "starts" - }, - "category": { - "eng": "Split" - }, - "destination": "ec361b3c-7979-4cfb-b7ca-997d985aba40", - "uuid": "ef6d80e8-775d-4872-8dfc-4f61ae09c814", - "destination_type": "R" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "Other" - }, - "destination": "e7feaa40-b815-4619-b7b2-4a28c8fd4d10", - "uuid": "bd9ee747-fb19-4752-8dd5-d4a3f666b278", - "destination_type": "R" - } - ], - "ruleset_type": "wait_message", - "label": "Response", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 139, - "x": 351, - "config": {} - }, - { - "uuid": "2e616cfc-217d-4782-9522-c2bb0ee38ff8", - "rules": [ - { - "test": { - "test": { - "eng": "add" - }, - "type": "starts" - }, - "category": { - "eng": "Add" - }, - "destination": "21b3cd69-e67c-402a-b977-566f94e8e7ec", - "uuid": "51280d07-a741-4d2a-8b7c-199739e7f17e", - "destination_type": "A" - }, - { - "test": { - "test": { - "eng": "remove" - }, - "type": "starts" - }, - "category": { - "eng": "Remove" - }, - "destination": "60d74019-f9c2-4665-bcab-0a4ba659b6af", - "uuid": "90d49357-be6f-4a26-a92c-35571b949bf0", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "Other" - }, - "destination": "514fc3f0-fd04-4c27-92fb-bc348121c8ef", - "uuid": "1af92c00-e94f-4a49-97d2-1486083f2342", - "destination_type": "A" - } - ], - "ruleset_type": "expression", - "label": "Response 3", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 257, - "x": 633, - "config": {} - }, - { - "uuid": "e7feaa40-b815-4619-b7b2-4a28c8fd4d10", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "2e616cfc-217d-4782-9522-c2bb0ee38ff8", - "uuid": "ba782061-da19-4f97-9a64-d8b22c78641d", - "destination_type": "R" - } - ], - "ruleset_type": "expression", - "label": "Group Name", - "operand": "@(REMOVE_FIRST_WORD(step.value))", - "finished_key": null, - "response_type": "", - "y": 140, - "x": 671, - "config": {} - }, - { - "uuid": "ec361b3c-7979-4cfb-b7ca-997d985aba40", - "rules": [ - { - "test": { - "test": { - "name": "Group A", - "uuid": "ebccb83d-f407-4e66-86ff-b174c952b7d3" - }, - "type": "in_group" - }, - "category": { - "eng": "Group A" - }, - "destination": "a9cd6587-61a7-4ab6-9a20-edf1f9cff033", - "uuid": "e7da6d33-8b82-4d42-8b20-454a4460f0f6", - "destination_type": "A" - }, - { - "test": { - "test": { - "name": "Group B", - "uuid": "61d455f9-52e5-40c7-ae88-809644ffb028" - }, - "type": "in_group" - }, - "category": { - "eng": "Group B" - }, - "destination": "a9cd6587-61a7-4ab6-9a20-edf1f9cff033", - "uuid": "2b240091-2cc5-45e4-ad18-ade35d0bd320", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "Other" - }, - "destination": "f0c02e2b-6f24-48a7-9c8b-d49165387014", - "uuid": "66410d8d-a539-4e9a-b039-717da23bbdd2", - "destination_type": "A" - } - ], - "ruleset_type": "group", - "label": "Member", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 255, - "x": 196, - "config": {} - } - ], - "metadata": { - "uuid": "2d60a782-5805-488b-bf4d-b8154614c170", - "notes": [], - "expires": 10080, - "name": "Grouppo", - "saved_on": "2016-09-14T22:51:59.257419Z", - "revision": 304 - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/loop_detection.json b/media/test_flows/loop_detection.json deleted file mode 100644 index 91542485279..00000000000 --- a/media/test_flows/loop_detection.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "campaigns": [], - "version": 7, - "site": "http://rapidpro.io", - "flows": [ - { - "version": 7, - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 132, - "destination": "9e348f0c-f7fa-4c06-a78b-9ffa839e5779", - "uuid": "13977cf2-68ee-49b9-8d88-2b9dbce12c5b", - "actions": [ - { - "msg": { - "eng": "Message One" - }, - "type": "reply" - } - ] - }, - { - "y": 167, - "x": 133, - "destination": "1f1adefb-0791-4e3c-9e8f-10dc6d56d3a5", - "uuid": "fb3e6f98-2cf3-40e8-ba1a-ea87dfcbd458", - "actions": [ - { - "msg": { - "eng": "You are in Group A" - }, - "type": "reply" - } - ] - }, - { - "y": 400, - "x": 434, - "destination": null, - "uuid": "3a0f77d1-f6bf-47f1-b194-de2051ba0738", - "actions": [ - { - "msg": { - "eng": "You picked @flow.message_split_a.category" - }, - "type": "reply" - } - ] - } - ], - "last_saved": "2015-05-04T19:48:06.359817Z", - "entry": "13977cf2-68ee-49b9-8d88-2b9dbce12c5b", - "rule_sets": [ - { - "uuid": "9e348f0c-f7fa-4c06-a78b-9ffa839e5779", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": { - "eng": "Group A" - }, - "base": "Group A", - "type": "contains_any" - }, - "category": { - "eng": "Group A", - "base": "Group A" - }, - "destination": "fb3e6f98-2cf3-40e8-ba1a-ea87dfcbd458", - "uuid": "605e4e98-5d85-45e7-a885-9c198977b63c" - }, - { - "test": { - "test": { - "eng": "Group B" - }, - "base": "Group B", - "type": "contains_any" - }, - "category": { - "eng": "Group B", - "base": "Group B" - }, - "destination": "1f1adefb-0791-4e3c-9e8f-10dc6d56d3a5", - "uuid": "81ba32a2-b3ea-4d46-aa7e-2ef32d7ced1e" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "Other", - "base": "Other" - }, - "destination": "782e9e71-c116-4195-add3-1867132f95b6", - "uuid": "9e712fa4-d988-483b-9820-e6bcc6d0cfba" - } - ], - "webhook": null, - "label": "Group Split A", - "operand": "@contact.groups", - "finished_key": null, - "ruleset_type": "expression", - "y": 70, - "x": 401 - }, - { - "uuid": "1f1adefb-0791-4e3c-9e8f-10dc6d56d3a5", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "eng": "Red" - }, - "base": "Red", - "type": "contains_any" - }, - "category": { - "eng": "Red", - "base": "Red" - }, - "destination": "3a0f77d1-f6bf-47f1-b194-de2051ba0738", - "uuid": "77f97500-0f06-443d-aec1-8d045962c7b8" - }, - { - "test": { - "test": { - "eng": "Green" - }, - "base": "Green", - "type": "contains_any" - }, - "category": { - "eng": "Green", - "base": "Green" - }, - "destination": "3a0f77d1-f6bf-47f1-b194-de2051ba0738", - "uuid": "15fa4511-c63e-4e45-be09-c63c87480189" - }, - { - "test": { - "test": { - "eng": "Blue" - }, - "base": "Blue", - "type": "contains_any" - }, - "category": { - "eng": "Blue", - "base": "Blue" - }, - "destination": "3a0f77d1-f6bf-47f1-b194-de2051ba0738", - "uuid": "8b8dc778-7d49-4572-af9f-97d5aee5dce8" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "Other", - "base": "All Responses" - }, - "destination": "3a0f77d1-f6bf-47f1-b194-de2051ba0738", - "uuid": "1d9900bc-9315-4ee2-892f-60013dd9541d" - } - ], - "webhook": null, - "label": "Message Split A", - "operand": "@step.value", - "finished_key": null, - "ruleset_type": "wait_message", - "y": 265, - "x": 356 - }, - { - "uuid": "782e9e71-c116-4195-add3-1867132f95b6", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": { - "eng": "Rowan" - }, - "base": "Rowan", - "type": "contains_any" - }, - "category": { - "eng": "Rowan", - "base": "Rowan" - }, - "destination": "1f1adefb-0791-4e3c-9e8f-10dc6d56d3a5", - "uuid": "f78edeea-4339-4f06-b95e-141975b97cb8" - }, - { - "test": { - "test": { - "eng": "Norbert" - }, - "base": "Norbert", - "type": "contains_any" - }, - "category": { - "eng": "Norbert", - "base": "Norbert" - }, - "destination": "1f1adefb-0791-4e3c-9e8f-10dc6d56d3a5", - "uuid": "e399c915-6226-4b00-bd9a-8347bd03a85a" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "Other", - "base": "Other" - }, - "destination": "1f1adefb-0791-4e3c-9e8f-10dc6d56d3a5", - "uuid": "7247d462-6ac5-4302-8ace-5a61c714377d" - } - ], - "webhook": null, - "label": "Name Split", - "operand": "@contact.name", - "finished_key": null, - "ruleset_type": "contact_field", - "y": 153, - "x": 735 - }, - { - "uuid": "771088fd-fc77-4966-8541-93c3c59c923d", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses", - "eng": "All Responses" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - }, - "uuid": "865baac0-da29-4752-be1e-1488457f708c" - } - ], - "webhook": null, - "label": "Message Split B", - "operand": "@step.value", - "finished_key": null, - "ruleset_type": "wait_message", - "y": 555, - "x": 419 - } - ], - "flow_type": "F", - "metadata": { - "name": "Loop Detection", - "id": 1000 - } - } - ], - "triggers": [] -} diff --git a/media/test_flows/no_ruleset_flow.json b/media/test_flows/no_ruleset_flow.json deleted file mode 100644 index 46c1806a98c..00000000000 --- a/media/test_flows/no_ruleset_flow.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "version": 8, - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "e41e7aad-de93-4cc0-ae56-d6af15ba1ac5", - "actions": [ - { - "msg": { - "eng": "Hello world" - }, - "type": "reply" - } - ] - } - ], - "version": 8, - "flow_type": "F", - "entry": "e41e7aad-de93-4cc0-ae56-d6af15ba1ac5", - "rule_sets": [], - "metadata": { - "expires": 10080, - "revision": 1, - "id": 41049, - "name": "No ruleset flow", - "saved_on": "2015-11-20T11:02:19.790131Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/numeric_rule_allows_variables.json b/media/test_flows/numeric_rule_allows_variables.json deleted file mode 100644 index 7b5fe83750b..00000000000 --- a/media/test_flows/numeric_rule_allows_variables.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "version": 8, - "flows": [ - { - "base_language": "base", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "31065f6b-4054-4560-adac-d8f4a0ec57c7", - "uuid": "f08c61ae-8757-4b4a-924b-9e97afdf15f4", - "actions": [ - { - "msg": { - "base": "How old will you be in the next world cup?" - }, - "type": "reply" - } - ] - }, - { - "y": 370, - "x": 59, - "destination": null, - "uuid": "116b7cc1-5086-4e0d-b0ee-ea3f73d0f06f", - "actions": [ - { - "msg": { - "base": "Good count" - }, - "type": "reply" - } - ] - }, - { - "y": 358, - "x": 429, - "destination": null, - "uuid": "34ca7cb8-b899-46b3-a5d2-11dd13f89541", - "actions": [ - { - "msg": { - "base": "Try again" - }, - "type": "reply" - } - ] - } - ], - "version": 8, - "flow_type": "F", - "entry": "f08c61ae-8757-4b4a-924b-9e97afdf15f4", - "rule_sets": [ - { - "uuid": "31065f6b-4054-4560-adac-d8f4a0ec57c7", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "@contact.age", - "type": "gt" - }, - "category": { - "base": "> @contact.age" - }, - "destination": "116b7cc1-5086-4e0d-b0ee-ea3f73d0f06f", - "uuid": "d164c264-1f48-478c-9ffb-f7207e679ed5", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "34ca7cb8-b899-46b3-a5d2-11dd13f89541", - "uuid": "2d0e800d-ec33-4fcd-a660-3782cf65dcff", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 210, - "x": 153, - "config": {} - } - ], - "metadata": { - "expires": 10080, - "revision": 7, - "id": 41052, - "name": "Numeric rule allows variables", - "saved_on": "2015-11-30T19:29:37.385369Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/parent.json b/media/test_flows/parent.json deleted file mode 100644 index a413e7369ce..00000000000 --- a/media/test_flows/parent.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "entry": "2f0e3397-3b9e-4593-b1d2-04ecfddb4f8f", - "rule_sets": [], - "action_sets": [ - { - "y": 1, - "x": 127, - "destination": null, - "uuid": "2f0e3397-3b9e-4593-b1d2-04ecfddb4f8f", - "actions": [ - { - "uuid": "59d5ba21-e61d-4bb7-a898-33bb2164987e", - "value": "None", - "label": "Campaign Date", - "field": "campaign_date", - "action": "GET", - "type": "save" - }, - { - "uuid": "40b35b95-fdbc-4ba4-b91e-c3c1911c1f3c", - "type": "flow", - "name": "Child Flow", - "id": CHILD_ID - }, - { - "action": "GET", - "type": "add_group", - "uuid": "4ea70294-ca92-478c-b0f4-ffc4fd858412", - "groups": [ - { - "name": "Campaign" - } - ] - }, - { - "msg": "Added to campaign.", - "action": "GET", - "type": "reply", - "uuid": "8a267e99-1b75-4e6d-bafc-9bc65629ad0a" - } - ] - } - ], - "last_saved": "2014-11-20T21:14:51.848399Z", - "metadata": {} - }, - "flow_type": "F", - "name": "Parent", - "id": 2000 - } - ], - "triggers": [] -} diff --git a/media/test_flows/pick_a_number.json b/media/test_flows/pick_a_number.json deleted file mode 100644 index 8db008735f1..00000000000 --- a/media/test_flows/pick_a_number.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "rule_sets": [ - { - "y": 106, - "x": 100, - "response_type": "C", - "rules": [ - { - "test": { - "max": "10", - "type": "between", - "min": "1" - }, - "destination": "9a8ba8b2-8c80-4635-9f5d-015c15fdc44a", - "uuid": "41418f9d-73e5-43b8-a341-3f7af70e13c1" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": null, - "uuid": "e53c2616-7b8d-4821-968a-4488e9980454" - } - ], - "uuid": "06bb3899-5de4-4cbc-ad5f-70b9634d80c4", - "label": "number" - }, - { - "y": 300, - "x": 300, - "response_type": "C", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": "All Responses", - "destination": "06bb3899-5de4-4cbc-ad5f-70b9634d80c4", - "uuid": "9df37f4c-73ca-4876-8490-35f984486df6" - } - ], - "uuid": "c1a5c78e-560b-45b1-83b1-1dad9ce57a06", - "label": "passive", - "operand": "@contact.name" - } - ], - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "06bb3899-5de4-4cbc-ad5f-70b9634d80c4", - "uuid": "2f2adf23-87db-41d3-9436-afe48ab5403c", - "actions": [ - { - "msg": "Pick a number between 1-10.", - "type": "reply" - } - ] - }, - { - "y": 228, - "x": 118, - "destination": null, - "uuid": "9a8ba8b2-8c80-4635-9f5d-015c15fdc44a", - "actions": [ - { - "msg": "You picked @flow.number!", - "type": "reply" - } - ] - } - ] - }, - "flow_type": "F", - "name": "Pick a Number", - "id": 2100 - } - ], - "triggers": [] -} diff --git a/media/test_flows/preprocess.json b/media/test_flows/preprocess.json deleted file mode 100644 index d8616b5068a..00000000000 --- a/media/test_flows/preprocess.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "rule_sets": [ - { - "y": 106, - "x": 100, - "webhook": "http://preprocessor.com/endpoint.php", - "response_type": "N", - "rules": [ - { - "test": { - "max": "10", - "type": "between", - "min": "1" - }, - "destination": "9a8ba8b2-8c80-4635-9f5d-015c15fdc44a", - "uuid": "41418f9d-73e5-43b8-a341-3f7af70e13c1" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": null, - "uuid": "e53c2616-7b8d-4821-968a-4488e9980454" - } - ], - "uuid": "06bb3899-5de4-4cbc-ad5f-70b9634d80c4", - "label": "number" - } - ], - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "06bb3899-5de4-4cbc-ad5f-70b9634d80c4", - "uuid": "2f2adf23-87db-41d3-9436-afe48ab5403c", - "actions": [ - { - "msg": "Pick a number between 1-10.", - "type": "reply" - } - ] - }, - { - "y": 228, - "x": 118, - "destination": null, - "uuid": "9a8ba8b2-8c80-4635-9f5d-015c15fdc44a", - "actions": [ - { - "msg": "You picked @flow.number!", - "type": "reply" - } - ] - } - ] - }, - "flow_type": "F", - "name": "Preprocess", - "id": 2200 - } - ], - "triggers": [] -} diff --git a/media/test_flows/quick_replies.json b/media/test_flows/quick_replies.json deleted file mode 100644 index c48ef44d30b..00000000000 --- a/media/test_flows/quick_replies.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "campaigns": [], - "version": 10, - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 44, - "x": 223, - "destination": "4297b822-734e-44cb-a1c9-2e20bc2cdb19", - "uuid": "163462f8-8a82-49df-ab8a-4eee3f7b9feb", - "actions": [ - { - "msg": { - "por": "Voc\u00ea gosta de jogar futebol?", - "eng": "Do you like to play football?" - }, - "media": {}, - "send_all": false, - "type": "reply", - "quick_replies": [ - { - "por": "Sim", - "eng": "Yes" - }, - { - "eng": "No" - } - ] - } - ] - }, - { - "y": 319, - "x": 262, - "destination": null, - "uuid": "a26a36b9-d4d7-4355-aad3-2fc86e84a7f1", - "actions": [ - { - "msg": { - "eng": "Good!" - }, - "media": {}, - "send_all": false, - "type": "reply", - "quick_replies": [] - } - ] - }, - { - "y": 318, - "x": 509, - "destination": null, - "uuid": "cdf0b558-6a44-44c9-8bee-6a6b6e8ad9c4", - "actions": [ - { - "msg": { - "eng": ":(" - }, - "media": {}, - "send_all": false, - "type": "reply", - "quick_replies": [] - } - ] - }, - { - "y": 173, - "x": 749, - "destination": "4297b822-734e-44cb-a1c9-2e20bc2cdb19", - "uuid": "4b7366eb-6099-4135-9a00-72492e6fdb8d", - "actions": [ - { - "msg": { - "eng": "Sorry, I don't understand." - }, - "media": {}, - "send_all": false, - "type": "reply", - "quick_replies": [] - } - ] - } - ], - "version": 10, - "flow_type": "F", - "entry": "163462f8-8a82-49df-ab8a-4eee3f7b9feb", - "rule_sets": [ - { - "uuid": "4297b822-734e-44cb-a1c9-2e20bc2cdb19", - "rules": [ - { - "category": { - "eng": "Yes" - }, - "uuid": "e8014483-e9ee-4384-85ea-f88c67ddf494", - "destination": "a26a36b9-d4d7-4355-aad3-2fc86e84a7f1", - "label": null, - "destination_type": "A", - "test": { - "test": { - "eng": "Yes, Sim" - }, - "type": "contains_any" - } - }, - { - "category": { - "eng": "No" - }, - "uuid": "a0b594ae-491f-4f2c-93af-0f158f69a5d8", - "destination": "cdf0b558-6a44-44c9-8bee-6a6b6e8ad9c4", - "label": null, - "destination_type": "A", - "test": { - "test": { - "eng": "No" - }, - "type": "contains_any" - } - }, - { - "category": { - "eng": "Other" - }, - "uuid": "b27d6067-f3fd-4b9b-a79a-127791987ec5", - "destination": "4b7366eb-6099-4135-9a00-72492e6fdb8d", - "label": null, - "destination_type": "A", - "test": { - "type": "true" - } - } - ], - "ruleset_type": "wait_message", - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 160, - "x": 381, - "config": {} - } - ], - "metadata": { - "expires": 10080, - "revision": 106, - "uuid": "711489ef-87c9-4fbc-8e6e-92af2b671fc4", - "name": "Quick Replies", - "saved_on": "2017-10-13T13:09:02.747795Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/random_word.json b/media/test_flows/random_word.json deleted file mode 100644 index 45cd0b0e5a2..00000000000 --- a/media/test_flows/random_word.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "fbb21cb8-eaf0-45fc-a5e3-31c5f5c1d55e", - "uuid": "8731e312-cdf1-412c-8a7d-6cc603de9cf9", - "actions": [ - { - "msg": { - "eng": "Write me a random word." - }, - "type": "reply" - } - ] - }, - { - "y": 406, - "x": 228, - "destination": null, - "uuid": "395f0a8e-b4fa-4a73-af33-98134505a3d7", - "actions": [ - { - "msg": { - "eng": "Thank you" - }, - "type": "reply" - } - ] - } - ], - "last_saved": "2014-08-11T15:08:22.724512Z", - "entry": "8731e312-cdf1-412c-8a7d-6cc603de9cf9", - "rule_sets": [ - { - "uuid": "fbb21cb8-eaf0-45fc-a5e3-31c5f5c1d55e", - "response_type": "O", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "395f0a8e-b4fa-4a73-af33-98134505a3d7", - "uuid": "3ec97b15-cfd8-4500-947f-56cae2441c99" - } - ], - "label": "Random", - "operand": "@step.value", - "y": 239, - "x": 136 - } - ], - "metadata": { - "notes": [] - } - }, - "flow_type": "F", - "name": "Random Word", - "id": 2300 - } - ], - "triggers": [] -} diff --git a/media/test_flows/rules_first.json b/media/test_flows/rules_first.json deleted file mode 100644 index 35d52c9b652..00000000000 --- a/media/test_flows/rules_first.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "version": 7, - "flows": [ - { - "version": 7, - "base_language": "base", - "action_sets": [ - { - "y": 161, - "x": 114, - "destination": null, - "uuid": "0fa491db-a447-4940-a7c8-c682f0e9ae3b", - "actions": [ - { - "msg": { - "base": "You've got to be kitten me" - }, - "type": "reply" - } - ] - }, - { - "y": 160, - "x": 342, - "destination": null, - "uuid": "29825823-69e3-47d7-a139-90c4851de0a3", - "actions": [ - { - "msg": { - "base": "Raise the woof!" - }, - "type": "reply" - } - ] - }, - { - "y": 100, - "x": 602, - "destination": "737527ae-ade5-4b55-944a-94a67b79cec5", - "uuid": "8e89b350-4b96-480c-b4e5-31f38f40bfe5", - "actions": [ - { - "msg": { - "base": "Is that even an animal?" - }, - "type": "reply" - } - ] - } - ], - "last_saved": "2015-09-15T02:38:14.494272Z", - "entry": "737527ae-ade5-4b55-944a-94a67b79cec5", - "rule_sets": [ - { - "uuid": "737527ae-ade5-4b55-944a-94a67b79cec5", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "base": "Cats" - }, - "type": "contains_any" - }, - "category": { - "base": "Cats" - }, - "destination": "0fa491db-a447-4940-a7c8-c682f0e9ae3b", - "uuid": "be41b657-cbfa-433a-9ffe-4fbcaf7fe15e", - "destination_type": "A" - }, - { - "test": { - "test": { - "base": "Dogs" - }, - "type": "contains_any" - }, - "category": { - "base": "Dogs" - }, - "destination": "29825823-69e3-47d7-a139-90c4851de0a3", - "uuid": "f1b8745b-beb3-4431-9e8e-01a214f20e3e", - "destination_type": "A" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": "8e89b350-4b96-480c-b4e5-31f38f40bfe5", - "uuid": "a329fbaa-49cf-4a5e-8e12-8df801344715", - "destination_type": "A" - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Animal", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 0, - "x": 260, - "config": {} - } - ], - "flow_type": "F", - "metadata": { - "notes": [], - "expires": 720, - "id": 35560, - "name": "Rules First" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/ruleset_loop.json b/media/test_flows/ruleset_loop.json deleted file mode 100644 index 71a1dc327e4..00000000000 --- a/media/test_flows/ruleset_loop.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "campaigns": [], - "version": 4, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "base_language": "ind", - "action_sets": [ - { - "y": 189, - "x": 157, - "destination": null, - "uuid": "c1474749-cfcb-4911-a93f-31ba67b64d57", - "actions": [ - { - "type": "flow", - "name": "Flow 2", - "id": 27668 - } - ] - } - ], - "last_saved": "2015-03-25T23:18:57.977877Z", - "entry": "e41fa402-0946-451f-8971-ac6adb6a0cc6", - "rule_sets": [ - { - "uuid": "e41fa402-0946-451f-8971-ac6adb6a0cc6", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": { - "ind": "awesome" - }, - "type": "contains_any" - }, - "category": { - "ind": "Awesome", - "base": "Awesome" - }, - "destination": null, - "uuid": "d0f480bb-a1e4-4aed-bbfe-04bb34ada1f2" - }, - { - "test": { - "type": "true" - }, - "category": { - "ind": "Other", - "base": "Other" - }, - "destination": "c1474749-cfcb-4911-a93f-31ba67b64d57", - "uuid": "5a2aa691-9103-4cf0-a2af-7df9be3658b7" - } - ], - "webhook": null, - "label": "Response 1", - "operand": "@contact.name", - "finished_key": null, - "response_type": "C", - "y": 0, - "x": 110 - } - ], - "metadata": { - "notes": [] - } - }, - "id": 27667, - "flow_type": "F", - "name": "Flow 1" - }, - { - "definition": { - "base_language": "ind", - "action_sets": [ - { - "y": 241, - "x": 180, - "destination": null, - "uuid": "e32f191b-d667-4a9e-9820-6faaf98d9a27", - "actions": [ - { - "type": "flow", - "name": "Flow 1", - "id": 27667 - } - ] - } - ], - "last_saved": "2015-03-25T23:18:28.682837Z", - "entry": "1b155cb4-1457-4430-899e-72a21a1843e8", - "rule_sets": [ - { - "uuid": "1b155cb4-1457-4430-899e-72a21a1843e8", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": { - "ind": "awesome" - }, - "type": "contains_any" - }, - "category": { - "ind": "Awesome", - "base": "Awesome" - }, - "destination": null, - "uuid": "024aea08-84e2-4ce7-9032-422bdf9d4a79" - }, - { - "test": { - "type": "true" - }, - "category": { - "ind": "Other", - "base": "All Responses" - }, - "destination": "e32f191b-d667-4a9e-9820-6faaf98d9a27", - "uuid": "1469f833-3b09-4a25-bccf-fb5c05d50876" - } - ], - "webhook": null, - "label": "Response 1", - "operand": "@contact.name", - "finished_key": null, - "response_type": "C", - "y": 0, - "x": 126 - } - ], - "metadata": {} - }, - "id": 2700, - "flow_type": "F", - "name": "Flow 2" - } - ], - "triggers": [] -} diff --git a/media/test_flows/send_all.json b/media/test_flows/send_all.json deleted file mode 100644 index 292a1991240..00000000000 --- a/media/test_flows/send_all.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "campaigns": [], - "version": 10, - "site": "https://app.rapidpro.io", - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "14fb87aa-22cc-4e9a-a8d6-dd4640426bed", - "actions": [ - { - "msg": { - "eng": "Hey, how are you?" - }, - "media": {}, - "send_all": true, - "type": "reply" - } - ] - } - ], - "version": 10, - "flow_type": "F", - "entry": "14fb87aa-22cc-4e9a-a8d6-dd4640426bed", - "rule_sets": [], - "metadata": { - "expires": 10080, - "revision": 1, - "uuid": "4b8089fb-bb10-4cbc-800f-a0aa8bb21713", - "name": "Send All", - "saved_on": "2017-03-16T14:53:04.119831Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/sms_form.json b/media/test_flows/sms_form.json deleted file mode 100644 index 3b7767fdfe0..00000000000 --- a/media/test_flows/sms_form.json +++ /dev/null @@ -1,299 +0,0 @@ -{ - "version": 5, - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 119, - "destination": "d0e01dde-dcd2-43e9-8f8e-ae1699a80395", - "uuid": "2e6aaa75-ffb7-4c48-baee-57e4149e452c", - "actions": [ - { - "msg": { - "eng": "What is your age, sex, location? Separate your responses with a space. For example \"15 f seattle\"." - }, - "type": "reply" - } - ] - }, - { - "y": 265, - "x": 904, - "destination": "d0e01dde-dcd2-43e9-8f8e-ae1699a80395", - "uuid": "9f1c79ae-581a-45ff-a9ea-4096f8231aad", - "actions": [ - { - "msg": { - "eng": "Sorry, @flow.age doesn't look like a valid age, please try again." - }, - "type": "reply" - } - ] - }, - { - "y": 414, - "x": 831, - "destination": "d0e01dde-dcd2-43e9-8f8e-ae1699a80395", - "uuid": "1cc063a7-afea-460d-b8a0-c8c2a2e37e35", - "actions": [ - { - "msg": { - "eng": "Sorry, @flow.gender doesn't look like a valid gender. Try again." - }, - "type": "reply" - } - ] - }, - { - "y": 571, - "x": 735, - "destination": "d0e01dde-dcd2-43e9-8f8e-ae1699a80395", - "uuid": "6be94ef5-bffc-4864-bd71-8e7cd87d7178", - "actions": [ - { - "msg": { - "eng": "I don't know the location @flow.location. Please try again." - }, - "type": "reply" - } - ] - }, - { - "y": 234, - "x": 116, - "destination": null, - "uuid": "0b18b474-00ab-40a0-af25-5d7c91aa64d7", - "actions": [ - { - "msg": { - "eng": "Thanks for your submission. We have that as:\n\n@flow.age / @flow.gender / @flow.location" - }, - "type": "reply" - } - ] - } - ], - "last_saved": "2015-08-05T19:02:29.296446Z", - "entry": "2e6aaa75-ffb7-4c48-baee-57e4149e452c", - "rule_sets": [ - { - "uuid": "d0e01dde-dcd2-43e9-8f8e-ae1699a80395", - "webhook_action": null, - "rules": [ - { - "category": { - "base": "All Responses", - "eng": "All Responses" - }, - "uuid": "bb0c523f-d216-4bf3-8794-664a9d9b3ccb", - "destination": "b7563d6f-279a-4b19-bff6-0ee3ccfa5d5f", - "destination_type": "R", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": null, - "ruleset_type": "wait_message", - "label": "Message Form", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 117, - "x": 459, - "config": {} - }, - { - "uuid": "b7563d6f-279a-4b19-bff6-0ee3ccfa5d5f", - "webhook_action": null, - "rules": [ - { - "test": { - "max": "100", - "type": "between", - "min": "0" - }, - "category": { - "base": "0 - 100", - "eng": "0 - 100" - }, - "destination": "eb669471-fadf-489b-9ce6-c10bb4add673", - "uuid": "a9c7276e-2f5d-4e6d-9efd-2b8d39c3ec50", - "destination_type": "R" - }, - { - "category": { - "base": "Other", - "eng": "Other" - }, - "uuid": "83ce1500-c6e6-4eb1-8feb-76cd439c6e36", - "destination": "9f1c79ae-581a-45ff-a9ea-4096f8231aad", - "destination_type": "A", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": null, - "ruleset_type": "form_field", - "label": "Age", - "operand": "@flow.message_form", - "finished_key": null, - "response_type": "", - "y": 226, - "x": 460, - "config": { - "field_delimiter": " ", - "field_index": 0 - } - }, - { - "uuid": "eb669471-fadf-489b-9ce6-c10bb4add673", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "eng": "Male m" - }, - "base": "Male m", - "type": "contains_any" - }, - "category": { - "base": "Male", - "eng": "Male" - }, - "destination": "3d8c9a32-fe04-4b95-9b2c-c66dd4ff2b24", - "uuid": "bda1d6b0-2b8d-4ddb-a888-3e41b3243a0f", - "destination_type": "R" - }, - { - "test": { - "test": { - "eng": "Female f" - }, - "base": "Female f", - "type": "contains_any" - }, - "category": { - "base": "Female", - "eng": "Female" - }, - "destination": "3d8c9a32-fe04-4b95-9b2c-c66dd4ff2b24", - "uuid": "4b8421ab-209f-4638-a267-82c4f83c73b2", - "destination_type": "R" - }, - { - "category": { - "base": "Other", - "eng": "Other" - }, - "uuid": "b61d7b97-21ab-4df5-a475-d16122aba572", - "destination": "1cc063a7-afea-460d-b8a0-c8c2a2e37e35", - "destination_type": "A", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": null, - "ruleset_type": "form_field", - "label": "Gender", - "operand": "@flow.message_form", - "finished_key": null, - "response_type": "", - "y": 344, - "x": 385, - "config": { - "field_delimiter": " ", - "field_index": 1 - } - }, - { - "uuid": "3d8c9a32-fe04-4b95-9b2c-c66dd4ff2b24", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "eng": "seattle chicago miami" - }, - "base": "seattle chicago miami", - "type": "contains_any" - }, - "category": { - "base": "Valid", - "eng": "Valid" - }, - "destination": "0b18b474-00ab-40a0-af25-5d7c91aa64d7", - "uuid": "1b36cb64-b0ce-43cc-9b50-8f45f29c9643", - "destination_type": "A" - }, - { - "category": { - "base": "Other", - "eng": "Other" - }, - "uuid": "b9419b3c-0cd0-4956-93ac-b6fd0da2964a", - "destination": "6be94ef5-bffc-4864-bd71-8e7cd87d7178", - "destination_type": "A", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": null, - "ruleset_type": "form_field", - "label": "Location", - "operand": "@flow.message_form", - "finished_key": null, - "response_type": "", - "y": 486, - "x": 366, - "config": { - "field_delimiter": " ", - "field_index": 2 - } - } - ], - "metadata": {} - }, - "expires": 10080, - "id": 34393, - "flow_type": "F", - "name": "SMS Form" - } - ], - "triggers": [] -} diff --git a/media/test_flows/start_missing_flow.json b/media/test_flows/start_missing_flow.json deleted file mode 100644 index 3dc5f4ee8bb..00000000000 --- a/media/test_flows/start_missing_flow.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "campaigns": [], - "version": 4, - "site": "http://textit.in", - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "10cca2b1-f587-410b-b07d-10ef75df3590", - "uuid": "3839c698-832f-4584-88c8-f57bb1a6ef5a", - "actions": [ - { - "msg": { - "eng": "Hi there, would you like to start a flow?" - }, - "type": "reply" - } - ] - }, - { - "y": 160, - "x": 90, - "destination": null, - "uuid": "418d4ec8-976e-4f4e-aea8-28147bb93ae1", - "actions": [ - { - "type": "flow", - "name": "Missing Flow", - "id": 27122 - } - ] - }, - { - "y": 233, - "x": 395, - "destination": null, - "uuid": "6e8d145c-1b20-477c-a839-f703eeafe1fa", - "actions": [ - { - "name": "Missing Flow", - "contacts": [], - "variables": [ - { - "id": "@step.contact.tel" - } - ], - "groups": [], - "type": "trigger-flow", - "id": 27122 - } - ] - }, - { - "y": 145, - "x": 731, - "destination": null, - "uuid": "a56641a9-c62c-4361-8960-fa2a03b5757a", - "actions": [ - { - "msg": { - "eng": "This actionset should stay." - }, - "type": "reply" - }, - { - "type": "flow", - "name": "Missing Flow", - "id": 27122 - } - ] - } - ], - "last_saved": "2015-03-16T18:04:39.520660Z", - "entry": "3839c698-832f-4584-88c8-f57bb1a6ef5a", - "rule_sets": [ - { - "uuid": "10cca2b1-f587-410b-b07d-10ef75df3590", - "webhook_action": null, - "rules": [ - { - "test": { - "test": { - "eng": "Yes" - }, - "base": "Yes", - "type": "contains_any" - }, - "category": { - "base": "Yes", - "eng": "Yes" - }, - "destination": "418d4ec8-976e-4f4e-aea8-28147bb93ae1", - "config": { - "type": "contains_any", - "verbose_name": "has any of these words", - "name": "Contains any", - "localized": true, - "operands": 1 - }, - "uuid": "53de7473-1439-40fa-9c08-25a609264416" - }, - { - "test": { - "test": { - "eng": "No" - }, - "base": "No", - "type": "contains_any" - }, - "category": { - "base": "No", - "eng": "No" - }, - "destination": "6e8d145c-1b20-477c-a839-f703eeafe1fa", - "config": { - "type": "contains_any", - "verbose_name": "has any of these words", - "name": "Contains any", - "localized": true, - "operands": 1 - }, - "uuid": "dda639b2-f775-47c2-9f4d-fa5e35f79839" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses", - "eng": "Other" - }, - "destination": "a56641a9-c62c-4361-8960-fa2a03b5757a", - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - }, - "uuid": "942d62cd-9f56-4d06-bde0-6816989a41f0" - } - ], - "webhook": null, - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "C", - "y": 77, - "x": 361 - } - ], - "metadata": {} - }, - "id": 2800, - "flow_type": "F", - "name": "Start Missing Flow" - } - ], - "triggers": [] -} diff --git a/media/test_flows/start_missing_flow_from_actionset.json b/media/test_flows/start_missing_flow_from_actionset.json deleted file mode 100644 index 6e122c2eba2..00000000000 --- a/media/test_flows/start_missing_flow_from_actionset.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "campaigns": [], - "version": 6, - "site": "https://textit.in", - "flows": [ - { - "definition": { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": "53ab0927-f33b-46ab-a32c-50cd144cc9e7", - "uuid": "68df3ab0-a39d-48b1-81c6-72cc73c86f2f", - "actions": [ - { - "msg": { - "eng": "This is the first message." - }, - "type": "reply" - } - ] - }, - { - "y": 126, - "x": 272, - "destination": null, - "uuid": "53ab0927-f33b-46ab-a32c-50cd144cc9e7", - "actions": [ - { - "type": "flow", - "name": "Missing Flow", - "id": 35582 - } - ] - } - ], - "last_saved": "2015-10-12T21:21:09.106022Z", - "entry": "68df3ab0-a39d-48b1-81c6-72cc73c86f2f", - "rule_sets": [], - "metadata": {} - }, - "expires": 10080, - "id": 35583, - "flow_type": "F", - "name": "Start Missing Flow" - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/substitution.json b/media/test_flows/substitution.json deleted file mode 100644 index 995b40c8f9e..00000000000 --- a/media/test_flows/substitution.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapidpro.io", - "flows": [ - { - "definition": { - "rule_sets": [ - { - "uuid": "6c67aed5-a7ac-472f-903e-4eb1d43f913e", - "response_type": "C", - "rules": [ - { - "test": { - "type": "phone" - }, - "category": "phone", - "destination": "96c41cd1-b177-4e4e-b1bc-3359588be10b", - "uuid": "50f988f0-8401-4d24-82c4-165c474e9cca" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": "Other", - "destination": "77663a2e-cb80-46dd-9fed-944514301bf4", - "uuid": "b83a7dcc-122e-4164-8334-23e5837e0bfe" - } - ], - "label": "Phone", - "operand": "@step.value", - "y": 207, - "x": 276 - } - ], - "entry": "632bd152-98c6-4b83-8a5d-0f9343fcf884", - "action_sets": [ - { - "y": 351, - "x": 175, - "destination": null, - "uuid": "96c41cd1-b177-4e4e-b1bc-3359588be10b", - "actions": [ - { - "msg": "Thanks, you typed @flow.phone", - "type": "reply" - }, - { - "msg": "Hi from @step.contact! Your phone is @contact.tel.", - "variables": [ - { - "id": "@flow.phone", - "name": "@flow.phone" - } - ], - "type": "send", - "groups": [], - "contacts": [] - } - ] - }, - { - "y": 309, - "x": 576, - "destination": "6c67aed5-a7ac-472f-903e-4eb1d43f913e", - "uuid": "77663a2e-cb80-46dd-9fed-944514301bf4", - "actions": [ - { - "msg": "Sorry, that isn't a valid phone.", - "type": "reply" - } - ] - }, - { - "y": 0, - "x": 100, - "destination": "6c67aed5-a7ac-472f-903e-4eb1d43f913e", - "uuid": "632bd152-98c6-4b83-8a5d-0f9343fcf884", - "actions": [ - { - "msg": "Hi @step.contact, what is your phone number?", - "type": "reply" - } - ] - } - ], - "metadata": { - "notes": [] - } - }, - "flow_type": "F", - "name": "Substitution", - "id": 2900 - } - ], - "triggers": [] -} diff --git a/media/test_flows/test_db.json b/media/test_flows/test_db.json deleted file mode 100644 index ce62910e0b5..00000000000 --- a/media/test_flows/test_db.json +++ /dev/null @@ -1,822 +0,0 @@ -{ - "version": "13", - "site": "https://textit.com", - "flows": [ - { - "_ui": { - "nodes": { - "5bac8056-d24b-4134-9620-dbc0a4b81492": { - "position": { - "left": 0, - "top": 0 - }, - "type": "execute_actions" - }, - "5ff349ab-e74a-47d3-9ada-9fe1bd99416e": { - "position": { - "left": 480, - "top": 60 - }, - "type": "execute_actions" - }, - "70e72b75-eb66-436a-a0c9-ce890ff8f537": { - "type": "wait_for_response", - "position": { - "left": 0, - "top": 120 - }, - "config": { - "cases": {} - } - }, - "b2bd251a-d241-4bb1-a60b-6caf16014eda": { - "position": { - "left": 0, - "top": 280 - }, - "type": "execute_actions" - }, - "2e539a4c-68ff-4bf7-be23-b57845d2a550": { - "position": { - "left": 520, - "top": 560 - }, - "type": "execute_actions" - }, - "34ae02f2-4cb2-4b63-8ec5-38b5c128e497": { - "position": { - "left": 80, - "top": 480 - }, - "type": "wait_for_response" - }, - "8362d6e8-6bf9-43a5-8f74-44fd0955ec75": { - "position": { - "left": 120, - "top": 680 - }, - "type": "execute_actions" - }, - "0406725d-7701-463e-86a5-88a8af1ca42a": { - "position": { - "left": 120, - "top": 900 - }, - "type": "wait_for_response" - }, - "440d670a-4ed5-46ff-9906-228e6ed498a4": { - "position": { - "left": 120, - "top": 1040 - }, - "type": "execute_actions" - }, - "60d2ee45-5570-4ab9-8dfd-8d512732f765": { - "position": { - "left": 260, - "top": 300 - }, - "type": "execute_actions" - } - }, - "stickies": {} - }, - "expire_after_minutes": 720, - "language": "und", - "localization": {}, - "name": "Favorites", - "nodes": [ - { - "actions": [ - { - "text": "What is your favorite color?", - "type": "send_msg", - "uuid": "cbcd7a22-2835-4ef9-889d-1a0ae9c9293e", - "quick_replies": [] - } - ], - "exits": [ - { - "destination_uuid": "70e72b75-eb66-436a-a0c9-ce890ff8f537", - "uuid": "79c8dfd7-bfc9-47a9-a39a-0daba71b7e47" - } - ], - "uuid": "5bac8056-d24b-4134-9620-dbc0a4b81492" - }, - { - "actions": [ - { - "text": "I don't know that color. Try again.", - "type": "send_msg", - "uuid": "557efd8d-1e92-4150-94cd-18b26204b23d", - "quick_replies": [] - } - ], - "exits": [ - { - "destination_uuid": "70e72b75-eb66-436a-a0c9-ce890ff8f537", - "uuid": "7bb84345-0ba5-4c63-86f8-bc02f24be7c5" - } - ], - "uuid": "5ff349ab-e74a-47d3-9ada-9fe1bd99416e" - }, - { - "uuid": "70e72b75-eb66-436a-a0c9-ce890ff8f537", - "actions": [], - "router": { - "type": "switch", - "default_category_uuid": "1c864609-e85d-42fb-ad7c-0819825a1295", - "cases": [ - { - "arguments": [ - "Red" - ], - "type": "has_any_word", - "uuid": "0e33aa43-bc0d-47e5-8b6f-0a76154e1956", - "category_uuid": "4397bdc7-749b-4441-9e5b-299cb6405c16" - }, - { - "arguments": [ - "Green" - ], - "type": "has_any_word", - "uuid": "86e49280-ba0a-4960-a94d-315cfb2bf323", - "category_uuid": "95b43ef3-9e17-453c-8bf3-b0c92f6f2e54" - }, - { - "arguments": [ - "Blue" - ], - "type": "has_any_word", - "uuid": "4d9224e3-fa56-4601-b190-26a095912804", - "category_uuid": "1e95e408-b060-420a-a4c4-b9d6a1bb3ea0" - }, - { - "arguments": [ - "Navy" - ], - "type": "has_any_word", - "uuid": "e4bebbcf-cc80-4751-a0c6-e0912a815381", - "category_uuid": "1e95e408-b060-420a-a4c4-b9d6a1bb3ea0" - } - ], - "categories": [ - { - "exit_uuid": "cc45b6f3-08fd-40a8-a4d3-b910f27a98bc", - "name": "Red", - "uuid": "4397bdc7-749b-4441-9e5b-299cb6405c16" - }, - { - "exit_uuid": "832c7893-d2fb-4431-b76a-2cb948aa16c0", - "name": "Green", - "uuid": "95b43ef3-9e17-453c-8bf3-b0c92f6f2e54" - }, - { - "exit_uuid": "ad5c10d9-d5cc-4123-abe1-649a471241cc", - "name": "Blue", - "uuid": "1e95e408-b060-420a-a4c4-b9d6a1bb3ea0" - }, - { - "exit_uuid": "ddc28771-2373-4a0e-a93b-f5dbf50130b0", - "name": "Other", - "uuid": "1c864609-e85d-42fb-ad7c-0819825a1295" - }, - { - "exit_uuid": "272fe4ef-0151-479b-9710-2df520a96aa0", - "name": "No Response", - "uuid": "0ed4ec87-3146-4e51-939f-6ce04e9dc372" - } - ], - "operand": "@input.text", - "wait": { - "type": "msg", - "timeout": { - "seconds": 300, - "category_uuid": "0ed4ec87-3146-4e51-939f-6ce04e9dc372" - } - }, - "result_name": "Color" - }, - "exits": [ - { - "destination_uuid": "b2bd251a-d241-4bb1-a60b-6caf16014eda", - "uuid": "cc45b6f3-08fd-40a8-a4d3-b910f27a98bc" - }, - { - "destination_uuid": "b2bd251a-d241-4bb1-a60b-6caf16014eda", - "uuid": "832c7893-d2fb-4431-b76a-2cb948aa16c0" - }, - { - "destination_uuid": "b2bd251a-d241-4bb1-a60b-6caf16014eda", - "uuid": "ad5c10d9-d5cc-4123-abe1-649a471241cc" - }, - { - "destination_uuid": "5ff349ab-e74a-47d3-9ada-9fe1bd99416e", - "uuid": "ddc28771-2373-4a0e-a93b-f5dbf50130b0" - }, - { - "destination_uuid": "60d2ee45-5570-4ab9-8dfd-8d512732f765", - "uuid": "272fe4ef-0151-479b-9710-2df520a96aa0" - } - ] - }, - { - "actions": [ - { - "text": "Good choice, I like @results.color.category_localized too! What is your favorite beer?", - "type": "send_msg", - "uuid": "0760d41c-0b19-416e-a456-0fa07d1f9d1d", - "quick_replies": [] - } - ], - "exits": [ - { - "destination_uuid": "34ae02f2-4cb2-4b63-8ec5-38b5c128e497", - "uuid": "344bc8ef-75d6-4462-ab30-346d0e8328b1" - } - ], - "uuid": "b2bd251a-d241-4bb1-a60b-6caf16014eda" - }, - { - "actions": [ - { - "text": "Sorry you can't participate right now, I'll try again later.", - "type": "send_msg", - "uuid": "f6aa4c18-b7b6-4076-9ece-516bacf90214", - "quick_replies": [] - } - ], - "exits": [ - { - "uuid": "4c1d34db-478b-47d1-ad17-4f03a9598333" - } - ], - "uuid": "60d2ee45-5570-4ab9-8dfd-8d512732f765" - }, - { - "exits": [ - { - "destination_uuid": "8362d6e8-6bf9-43a5-8f74-44fd0955ec75", - "uuid": "7644fb28-942f-4fca-a515-3e52f2678bae" - }, - { - "destination_uuid": "8362d6e8-6bf9-43a5-8f74-44fd0955ec75", - "uuid": "165d9dce-7a8b-4d12-a633-8b82552678db" - }, - { - "destination_uuid": "8362d6e8-6bf9-43a5-8f74-44fd0955ec75", - "uuid": "d4bf9e11-f2ac-4b72-aa92-91b39fa8ba8e" - }, - { - "destination_uuid": "8362d6e8-6bf9-43a5-8f74-44fd0955ec75", - "uuid": "8eaea6ac-f9a7-490e-9aaa-f76dba22b298" - }, - { - "destination_uuid": "2e539a4c-68ff-4bf7-be23-b57845d2a550", - "uuid": "fa156c46-bd39-4bc2-91ca-c9710ad2cd5f" - } - ], - "router": { - "cases": [ - { - "arguments": [ - "Mutzig" - ], - "category_uuid": "afa671f5-8425-44be-ac8d-6c8508055739", - "type": "has_any_word", - "uuid": "dc2b1193-a214-4269-b3fd-9f20863e822d" - }, - { - "arguments": [ - "Primus" - ], - "category_uuid": "a6549d2f-38c5-4b07-be95-a599f6d468fa", - "type": "has_any_word", - "uuid": "21e62688-4e9c-4f9a-b4e7-476b87b37517" - }, - { - "arguments": [ - "Turbo King" - ], - "category_uuid": "81469d86-54c4-451a-b0b0-525f404d2b05", - "type": "has_any_word", - "uuid": "d9c60b83-fe0e-4ad6-8f48-57878f2b9185" - }, - { - "arguments": [ - "Skol" - ], - "category_uuid": "b98bdd8f-97d5-4fc5-b7dc-d352e467f8f1", - "type": "has_any_word", - "uuid": "35bfdcd2-45e9-483c-aa2b-3b2dc61e60f6" - } - ], - "categories": [ - { - "exit_uuid": "7644fb28-942f-4fca-a515-3e52f2678bae", - "name": "Mutzig", - "uuid": "afa671f5-8425-44be-ac8d-6c8508055739" - }, - { - "exit_uuid": "165d9dce-7a8b-4d12-a633-8b82552678db", - "name": "Primus", - "uuid": "a6549d2f-38c5-4b07-be95-a599f6d468fa" - }, - { - "exit_uuid": "d4bf9e11-f2ac-4b72-aa92-91b39fa8ba8e", - "name": "Turbo King", - "uuid": "81469d86-54c4-451a-b0b0-525f404d2b05" - }, - { - "exit_uuid": "8eaea6ac-f9a7-490e-9aaa-f76dba22b298", - "name": "Skol", - "uuid": "b98bdd8f-97d5-4fc5-b7dc-d352e467f8f1" - }, - { - "exit_uuid": "fa156c46-bd39-4bc2-91ca-c9710ad2cd5f", - "name": "Other", - "uuid": "ebe96e2f-8a66-4974-848e-6524b0e8893b" - } - ], - "default_category_uuid": "ebe96e2f-8a66-4974-848e-6524b0e8893b", - "operand": "@input", - "result_name": "Beer", - "type": "switch", - "wait": { - "type": "msg" - } - }, - "uuid": "34ae02f2-4cb2-4b63-8ec5-38b5c128e497", - "actions": [] - }, - { - "actions": [ - { - "text": "I don't know that one, try again please.", - "type": "send_msg", - "uuid": "75bf7db1-1cb9-4c63-8936-4691f08ba1e1", - "quick_replies": [] - } - ], - "exits": [ - { - "destination_uuid": "34ae02f2-4cb2-4b63-8ec5-38b5c128e497", - "uuid": "72774a1d-858f-498c-ad69-d04bb49af876" - } - ], - "uuid": "2e539a4c-68ff-4bf7-be23-b57845d2a550" - }, - { - "actions": [ - { - "text": "Mmmmm... delicious @results.beer.category_localized. If only they made @(lower(results.color)) @results.beer.category_localized! Lastly, what is your name?", - "type": "send_msg", - "uuid": "5d6c182b-f5d9-4ac9-be02-81337b73c503", - "quick_replies": [] - } - ], - "exits": [ - { - "destination_uuid": "0406725d-7701-463e-86a5-88a8af1ca42a", - "uuid": "6a28d354-a156-45db-8ae9-e4fe67c263a5" - } - ], - "uuid": "8362d6e8-6bf9-43a5-8f74-44fd0955ec75" - }, - { - "exits": [ - { - "destination_uuid": "440d670a-4ed5-46ff-9906-228e6ed498a4", - "uuid": "d740a951-37b2-4851-8fe8-406268f3eeec" - } - ], - "router": { - "cases": [], - "categories": [ - { - "exit_uuid": "d740a951-37b2-4851-8fe8-406268f3eeec", - "name": "All Responses", - "uuid": "b38fdc7f-b2e2-4dd6-acf2-68bb8e9cc84f" - } - ], - "default_category_uuid": "b38fdc7f-b2e2-4dd6-acf2-68bb8e9cc84f", - "operand": "@input", - "result_name": "Name", - "type": "switch", - "wait": { - "type": "msg" - } - }, - "uuid": "0406725d-7701-463e-86a5-88a8af1ca42a", - "actions": [] - }, - { - "actions": [ - { - "text": "Thanks @results.name, we are all done!", - "type": "send_msg", - "uuid": "1d09b2b7-8fc5-48ca-8c69-70a7f4e4ba0b", - "quick_replies": [] - }, - { - "uuid": "90a1eb56-bf99-42ba-82c8-e4bfcaf738d7", - "type": "set_contact_name", - "name": "@results.name" - } - ], - "exits": [ - { - "uuid": "ac30d632-1389-45c2-8b36-a5394feadf7f" - } - ], - "uuid": "440d670a-4ed5-46ff-9906-228e6ed498a4" - } - ], - "spec_version": "13.5.0", - "type": "messaging", - "uuid": "4fad232a-ca3a-4da7-be93-21492d407a33", - "revision": 38 - }, - { - "name": "Support", - "uuid": "de428d9c-3f63-4c66-bfa0-0c67e65aed66", - "spec_version": "13.5.0", - "language": "eng", - "type": "messaging", - "nodes": [ - { - "uuid": "6d796df5-0e15-4d93-98ee-0d4ffa78adef", - "actions": [ - { - "attachments": [], - "text": "Hi there, thanks for reaching out. Please give me as much detail as possible and I'll make sure we get somebody over to you right away!", - "type": "send_msg", - "quick_replies": [], - "uuid": "f05569c5-7a83-49d5-a09f-cf0d24780fae" - } - ], - "exits": [ - { - "uuid": "59fc2ad8-1728-4ff4-a9b3-cd10eac8da32", - "destination_uuid": "d634053c-c012-42d6-97d3-e18d4d8499d7" - } - ] - }, - { - "uuid": "d634053c-c012-42d6-97d3-e18d4d8499d7", - "actions": [ - { - "uuid": "b0a8d89b-b278-4129-bb41-d3f7f5075e02", - "type": "open_ticket", - "body": "", - "topic": { - "uuid": "ba121ac9-e7ff-4ef7-bf62-af81a6511f5a", - "name": "General", - "counts": { - "open": 0, - "closed": 0 - }, - "system": true, - "created_on": "2024-05-01T22:45:59.841309Z" - }, - "assignee": null, - "result_name": "Result" - } - ], - "router": { - "type": "switch", - "operand": "@results.result", - "cases": [ - { - "uuid": "0d7e136d-4d52-410f-861a-8e900468b145", - "type": "has_category", - "arguments": [ - "Success" - ], - "category_uuid": "f0652a4e-7b3f-4a68-b565-010d18386c19" - } - ], - "categories": [ - { - "uuid": "f0652a4e-7b3f-4a68-b565-010d18386c19", - "name": "Success", - "exit_uuid": "6166dc7f-b343-4f1a-879f-b03e75fa4766" - }, - { - "uuid": "0af54548-598d-40ef-8e68-20bad9d7c03e", - "name": "Failure", - "exit_uuid": "0068e8de-10e3-4bd7-9bf6-57294dccfbc9" - } - ], - "default_category_uuid": "0af54548-598d-40ef-8e68-20bad9d7c03e" - }, - "exits": [ - { - "uuid": "6166dc7f-b343-4f1a-879f-b03e75fa4766", - "destination_uuid": null - }, - { - "uuid": "0068e8de-10e3-4bd7-9bf6-57294dccfbc9", - "destination_uuid": null - } - ] - } - ], - "_ui": { - "nodes": { - "6d796df5-0e15-4d93-98ee-0d4ffa78adef": { - "position": { - "left": 20, - "top": 0 - }, - "type": "execute_actions" - }, - "d634053c-c012-42d6-97d3-e18d4d8499d7": { - "type": "split_by_ticket", - "position": { - "left": 20, - "top": 200 - }, - "config": {} - } - } - }, - "revision": 11, - "expire_after_minutes": 10080, - "localization": {} - }, - { - "name": "New Chat", - "uuid": "5fe7d119-9fca-41f4-adde-a4171301152f", - "spec_version": "13.5.0", - "language": "eng", - "type": "messaging", - "nodes": [ - { - "uuid": "f805ec81-be27-4d1d-bd1a-a513df850235", - "actions": [ - { - "attachments": [], - "text": "\ud83d\udc4b Welcome! Thanks for visiting our web page. Is there any thing I can answer for you?", - "type": "send_msg", - "quick_replies": [], - "uuid": "a0610c91-5e1c-43dd-bb31-88ce650d56ae" - } - ], - "exits": [ - { - "uuid": "941a4343-6eee-439f-9c1d-77cb81cbf78f", - "destination_uuid": "6fe16e87-40ea-46dd-8975-21e734270b86" - } - ] - }, - { - "uuid": "6fe16e87-40ea-46dd-8975-21e734270b86", - "actions": [], - "router": { - "type": "switch", - "default_category_uuid": "53c5cee4-963c-47d0-92fc-817647758d6b", - "cases": [ - { - "arguments": [ - "yes" - ], - "type": "has_any_word", - "uuid": "c14c8f2f-74bc-46ed-87d6-e5676a4baf73", - "category_uuid": "be9f6f8d-7401-46df-85ba-a929f5e36430" - }, - { - "arguments": [ - "no" - ], - "type": "has_any_word", - "uuid": "3b2875fe-ce4c-4ece-b518-af875b3bcef3", - "category_uuid": "8b1387c9-319c-4d21-851a-489404324390" - } - ], - "categories": [ - { - "uuid": "be9f6f8d-7401-46df-85ba-a929f5e36430", - "name": "Yes", - "exit_uuid": "606b7207-eb1c-4f7b-a0ee-12c7da8d0e7b" - }, - { - "uuid": "8b1387c9-319c-4d21-851a-489404324390", - "name": "No", - "exit_uuid": "9bcc3740-5fee-4829-84be-fe85f9498792" - }, - { - "uuid": "53c5cee4-963c-47d0-92fc-817647758d6b", - "name": "Other", - "exit_uuid": "5389008f-d3c7-4d86-97bb-952c116f6762" - } - ], - "operand": "@input.text", - "wait": { - "type": "msg" - }, - "result_name": "Result 1" - }, - "exits": [ - { - "uuid": "606b7207-eb1c-4f7b-a0ee-12c7da8d0e7b", - "destination_uuid": "81f59084-b989-4bfc-9fab-b944c65647c2" - }, - { - "uuid": "9bcc3740-5fee-4829-84be-fe85f9498792", - "destination_uuid": "dcf59feb-82d7-4eae-a63f-23905e8961b3" - }, - { - "uuid": "5389008f-d3c7-4d86-97bb-952c116f6762", - "destination_uuid": "81f59084-b989-4bfc-9fab-b944c65647c2" - } - ] - }, - { - "uuid": "dcf59feb-82d7-4eae-a63f-23905e8961b3", - "actions": [ - { - "attachments": [], - "text": "Hey, no problem, if you need anything, you know where to find me!", - "type": "send_msg", - "quick_replies": [], - "uuid": "31e3b9fc-719f-4ed1-8f68-4e9d6d10a9ea" - } - ], - "exits": [ - { - "uuid": "95c0c45b-effe-4350-bc7d-d128680925a5", - "destination_uuid": null - } - ] - }, - { - "uuid": "81f59084-b989-4bfc-9fab-b944c65647c2", - "actions": [ - { - "attachments": [], - "text": "Ok, please add as much additional detail as possible and I'll get somebody over to help.", - "type": "send_msg", - "quick_replies": [], - "uuid": "3f3dc468-043f-4386-93e2-c448428c8f38" - } - ], - "exits": [ - { - "uuid": "82398b8f-df44-4069-af05-f8a41f3056ff", - "destination_uuid": "f43743df-3d6c-4ae2-8f24-c6bef3e999fc" - } - ] - }, - { - "uuid": "f43743df-3d6c-4ae2-8f24-c6bef3e999fc", - "actions": [ - { - "uuid": "8b26cc8c-85d7-490c-9494-5986141a751c", - "type": "open_ticket", - "body": "", - "topic": { - "uuid": "ba121ac9-e7ff-4ef7-bf62-af81a6511f5a", - "name": "General", - "counts": { - "open": 0, - "closed": 0 - }, - "system": true, - "created_on": "2024-05-01T22:45:59.841309Z" - }, - "assignee": null, - "result_name": "Result" - } - ], - "router": { - "type": "switch", - "operand": "@results.result", - "cases": [ - { - "uuid": "7e7ac0f5-1249-484d-8774-eaffced73e4d", - "type": "has_category", - "arguments": [ - "Success" - ], - "category_uuid": "380bb0c4-913f-45e0-806c-f1e6ea75933e" - } - ], - "categories": [ - { - "uuid": "380bb0c4-913f-45e0-806c-f1e6ea75933e", - "name": "Success", - "exit_uuid": "f36e4bb3-5f73-4334-b25a-e4f43e0f1955" - }, - { - "uuid": "d43e8367-cd56-4063-88cc-5be83643c0d9", - "name": "Failure", - "exit_uuid": "797d6c62-34c0-4486-96e3-a7a2808c8784" - } - ], - "default_category_uuid": "d43e8367-cd56-4063-88cc-5be83643c0d9" - }, - "exits": [ - { - "uuid": "f36e4bb3-5f73-4334-b25a-e4f43e0f1955", - "destination_uuid": null - }, - { - "uuid": "797d6c62-34c0-4486-96e3-a7a2808c8784", - "destination_uuid": null - } - ] - } - ], - "_ui": { - "nodes": { - "f805ec81-be27-4d1d-bd1a-a513df850235": { - "position": { - "left": 0, - "top": 0 - }, - "type": "execute_actions" - }, - "6fe16e87-40ea-46dd-8975-21e734270b86": { - "type": "wait_for_response", - "position": { - "left": 0, - "top": 160 - }, - "config": { - "cases": {} - } - }, - "dcf59feb-82d7-4eae-a63f-23905e8961b3": { - "position": { - "left": 300, - "top": 320 - }, - "type": "execute_actions" - }, - "81f59084-b989-4bfc-9fab-b944c65647c2": { - "position": { - "left": 0, - "top": 360 - }, - "type": "execute_actions" - }, - "f43743df-3d6c-4ae2-8f24-c6bef3e999fc": { - "type": "split_by_ticket", - "position": { - "left": 0, - "top": 540 - }, - "config": {} - } - } - }, - "revision": 72, - "expire_after_minutes": 10080, - "localization": {} - } - ], - "campaigns": [], - "triggers": [ - { - "trigger_type": "K", - "flow": { - "uuid": "4fad232a-ca3a-4da7-be93-21492d407a33", - "name": "Favorites" - }, - "groups": [], - "exclude_groups": [], - "channel": null, - "keywords": [ - "fav" - ], - "match_type": "F" - }, - { - "trigger_type": "N", - "flow": { - "uuid": "5fe7d119-9fca-41f4-adde-a4171301152f", - "name": "New Chat" - }, - "groups": [], - "exclude_groups": [], - "channel": null - }, - { - "trigger_type": "K", - "flow": { - "uuid": "de428d9c-3f63-4c66-bfa0-0c67e65aed66", - "name": "Support" - }, - "groups": [], - "exclude_groups": [], - "channel": null, - "keywords": [ - "help" - ], - "match_type": "F" - } - ], - "fields": [], - "groups": [] -} \ No newline at end of file diff --git a/media/test_flows/triggered.json b/media/test_flows/triggered.json deleted file mode 100644 index 87f3505df1e..00000000000 --- a/media/test_flows/triggered.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "campaigns": [], - "version": 8, - "site": "http://rapidpro.io", - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "7b99bb2e-054f-4a60-a986-367ecf114879", - "actions": [ - { - "msg": { - "eng": "Honey, I triggered the flow! @extra.text" - }, - "type": "reply" - } - ] - } - ], - "version": 8, - "flow_type": "F", - "entry": "7b99bb2e-054f-4a60-a986-367ecf114879", - "rule_sets": [], - "metadata": { - "expires": 10080, - "saved_on": "2016-07-21T16:34:32.457154Z", - "id": 25994, - "name": "Triggeree", - "revision": 1 - } - }, - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "06a3be8b-36f9-4f73-b31a-95a1e8ee920d", - "actions": [ - { - "name": "Triggeree", - "contacts": [ - { - "name": "Marshawn", - "id": contact_id - } - ], - "variables": [], - "groups": [], - "type": "trigger-flow", - "id": 25994 - }, - { - "name": "Triggeree", - "type": "flow", - "id": 25994 - } - ] - } - ], - "version": 8, - "flow_type": "F", - "entry": "98d0948b-c50d-4033-b07c-403d324aa147", - "rule_sets": [{ - "uuid": "98d0948b-c50d-4033-b07c-403d324aa147", - "webhook_action": "GET", - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "eng": "All Responses" - }, - "destination": "06a3be8b-36f9-4f73-b31a-95a1e8ee920d", - "uuid": "1e89ff33-80fe-4d34-9ced-3b96f5aacd50", - "destination_type": "A" - } - ], - "webhook": "http://localhost:49999/where", - "ruleset_type": "webhook", - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 0, - "x": 328, - "config": {} - }], - "metadata": { - "expires": 10080, - "revision": 1, - "id": 25995, - "name": "Triggerer", - "saved_on": "2016-07-21T16:35:05.717556Z" - } - } - ], - "triggers": [] -} diff --git a/media/test_flows/triggered_flow.json b/media/test_flows/triggered_flow.json deleted file mode 100644 index cfe6901a54e..00000000000 --- a/media/test_flows/triggered_flow.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "campaigns": [], - "version": 3, - "site": "http://rapdipro.io", - "flows": [ - { - "definition": { - "entry": "4ec3d47a-eef3-4d80-b5b1-38dab8e518dc", - "rule_sets": [], - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "4ec3d47a-eef3-4d80-b5b1-38dab8e518dc", - "actions": [ - { - "msg": "This is the triggered flow", - "type": "reply" - } - ] - } - ], - "metadata": { - "notes": [] - } - }, - "id": 12140, - "flow_type": "F", - "name": "Triggered Flow" - }, - { - "definition": { - "entry": "b6c4d782-5165-4541-bb2e-7348c9676882", - "rule_sets": [], - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "b6c4d782-5165-4541-bb2e-7348c9676882", - "actions": [ - { - "name": "Triggered Flow", - "contacts": [], - "variables": [], - "groups": [ - { - "name": "Survey Audience", - "id": 6250 - } - ], - "type": "trigger-flow", - "id": 12140 - } - ] - } - ], - "metadata": { - "notes": [] - } - }, - "id": 12141, - "flow_type": "F", - "name": "Trigger a Flow" - } - ], - "triggers": [] -} diff --git a/media/test_flows/two_to_all.json b/media/test_flows/two_to_all.json deleted file mode 100644 index b9d3e9e2b66..00000000000 --- a/media/test_flows/two_to_all.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "campaigns": [], - "version": 10, - "site": "https://app.rapidpro.io", - "flows": [ - { - "base_language": "eng", - "action_sets": [ - { - "y": 0, - "x": 100, - "destination": null, - "uuid": "a42b6981-1b8c-44a9-8260-3bf504c9bb25", - "actions": [ - { - "msg": { - "eng": "first message" - }, - "media": {}, - "send_all": true, - "type": "reply" - }, - { - "msg": { - "eng": "second message" - }, - "media": {}, - "send_all": true, - "type": "reply" - } - ] - } - ], - "version": 10, - "flow_type": "F", - "entry": "a42b6981-1b8c-44a9-8260-3bf504c9bb25", - "rule_sets": [], - "metadata": { - "expires": 10080, - "revision": 3, - "uuid": "a9de95b7-2959-40b7-afdd-99ef1975b812", - "name": "Two to all", - "saved_on": "2017-03-17T14:27:29.032085Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/ussd_example.json b/media/test_flows/ussd_example.json deleted file mode 100644 index 8f52a2ea9a7..00000000000 --- a/media/test_flows/ussd_example.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "version": 8, - "flows": [ - { - "base_language": "base", - "action_sets": [], - "version": 8, - "flow_type": "U", - "entry": "5e0fe53f-1caa-434d-97e7-189f33353372", - "rule_sets": [ - { - "uuid": "5e0fe53f-1caa-434d-97e7-189f33353372", - "webhook_action": null, - "rules": [ - { - "category": { - "base": "Sports" - }, - "test": { - "test": 1, - "type": "eq" - }, - "destination": "66aa0bb5-d1e5-4026-a056-fd22c353539e", - "uuid": "337e5e25-204b-4786-bee6-ff4c431986eb", - "destination_type": "R" - }, - { - "category": { - "base": "Politics" - }, - "test": { - "test": 2, - "type": "eq" - }, - "destination": "66aa0bb5-d1e5-4026-a056-fd22c353539e", - "uuid": "45803c40-aaf3-44d3-a301-f7eb35fa6be4", - "destination_type": "R" - }, - { - "category": { - "base": "Movies" - }, - "test": { - "test": 3, - "type": "eq" - }, - "destination": "66aa0bb5-d1e5-4026-a056-fd22c353539e", - "uuid": "13f3ed00-44d0-4119-b5fd-269c8f09fce3", - "destination_type": "R" - }, - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "Other" - }, - "destination": null, - "uuid": "6006a206-10f0-4937-a33f-7ec80deb8540" - } - ], - "webhook": null, - "ruleset_type": "wait_menu", - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 0, - "x": 624, - "config": { - "ussd_menu": [ - { - "category": { - "base": "Sports" - }, - "uuid": "337e5e25-204b-4786-bee6-ff4c431986eb", - "option": 1, - "label": "I'm interested in sports" - }, - { - "category": { - "base": "Politics" - }, - "uuid": "45803c40-aaf3-44d3-a301-f7eb35fa6be4", - "option": 2, - "label": "I'm interested in politics" - }, - { - "category": { - "base": "Movies" - }, - "uuid": "13f3ed00-44d0-4119-b5fd-269c8f09fce3", - "option": 3, - "label": "I'm interested in movies" - } - ], - "ussd_message": { - "base": "What would you like to read about?" - } - } - }, - { - "uuid": "66aa0bb5-d1e5-4026-a056-fd22c353539e", - "webhook_action": null, - "rules": [ - { - "test": { - "test": "true", - "type": "true" - }, - "category": { - "base": "All Responses" - }, - "uuid": "0df9b0ac-d241-460c-9b7c-f9f350a661bf" - } - ], - "webhook": null, - "ruleset_type": "wait_ussd", - "label": "Response 2", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 310, - "x": 725, - "config": { - "ussd_menu": [ - { - "category": { - "base": "Dfd" - }, - "uuid": "03f39461-b649-4cb0-97f9-9ce6ecb5c606", - "option": 1, - "label": "dfdf" - }, - { - "category": {}, - "uuid": "8211b1dc-b443-4b1c-8849-bf18a69e13ef", - "option": 2, - "label": "" - } - ], - "ussd_message": { - "base": "Thank you!" - } - } - } - ], - "metadata": { - "name": "USSD example", - "notes": [], - "expires": 10080, - "revision": 37, - "id": 26, - "saved_on": "2016-02-17T16:17:48.396242Z" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/webhook_rule_first.json b/media/test_flows/webhook_rule_first.json deleted file mode 100644 index 6be5a7e436b..00000000000 --- a/media/test_flows/webhook_rule_first.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "version": 7, - "flows": [ - { - "version": 7, - "base_language": "eng", - "action_sets": [ - { - "y": 140, - "x": 190, - "destination": null, - "uuid": "c81d60ec-9a74-48d6-a55f-e70a5d7195d3", - "actions": [ - { - "msg": { - "eng": "Testing this out" - }, - "type": "reply" - } - ] - } - ], - "last_saved": "2015-07-29T20:57:32.146036Z", - "entry": "9b3b6b7d-13ec-46ea-8918-a83a4099be33", - "rule_sets": [ - { - "uuid": "9b3b6b7d-13ec-46ea-8918-a83a4099be33", - "webhook_action": "GET", - "rules": [ - { - "category": { - "base": "All Responses", - "eng": "All Responses" - }, - "uuid": "0734d69a-99c1-45f6-a3df-7246408c4565", - "destination": "c81d60ec-9a74-48d6-a55f-e70a5d7195d3", - "destination_type": "A", - "test": { - "test": "true", - "type": "true" - }, - "config": { - "type": "true", - "verbose_name": "contains anything", - "name": "Other", - "operands": 0 - } - } - ], - "webhook": "http://google.com", - "ruleset_type": "webhook", - "label": "Response 1", - "operand": "@step.value", - "finished_key": null, - "response_type": "", - "y": 0, - "x": 100 - } - ], - "flow_type": "F", - "metadata": { - "expires": 10080, - "id": 33868, - "name": "Test Webhook First" - } - } - ], - "triggers": [] -} \ No newline at end of file diff --git a/media/test_flows/with_message_topic.json b/media/test_flows/with_message_topic.json deleted file mode 100644 index b99e4a0aafa..00000000000 --- a/media/test_flows/with_message_topic.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "version": "13", - "flows": [ - { - "uuid": "c07d368e-fe1d-469d-b267-bca02d17c3e3", - "name": "Topic Flow", - "spec_version": "13.0.0", - "language": "eng", - "type": "messaging", - "revision": 1, - "expire_after_minutes": 10080, - "localization": {}, - "nodes": [ - { - "uuid": "5bf98a89-d38d-40ba-8e5e-d54cad1777f1", - "actions": [ - { - "attachments": [], - "text": "This is a message with a topic.", - "type": "send_msg", - "quick_replies": [], - "uuid": "b103d563-9320-40fe-8f96-c9d3fbe0262d", - "templating": null, - "topic": "agent" - } - ], - "exits": [ - { - "uuid": "29dd720b-00ed-4304-97b0-38c65bc38e30" - } - ] - } - ], - "_ui": { - "nodes": { - "5bf98a89-d38d-40ba-8e5e-d54cad1777f1": { - "position": { - "left": 20, - "top": 40 - }, - "type": "execute_actions" - } - } - } - } - ] -}