Updates state and transitions to incorporate multi token setup.

This commit is contained in:
PhilipWafula 2021-11-22 12:42:26 +03:00
parent 74c159d7d3
commit 3cad3eb515
Signed by untrusted user: mango-habanero
GPG Key ID: B00CE9034DA19FB7
5 changed files with 150 additions and 3 deletions

View File

@ -287,7 +287,36 @@
"display_key": "ussd.kenya.dob_edit_pin_authorization", "display_key": "ussd.kenya.dob_edit_pin_authorization",
"name": "dob_edit_pin_authorization", "name": "dob_edit_pin_authorization",
"parent": "metadata_management" "parent": "metadata_management"
},
"49": {
"description": "Menu to display first set of tokens in the account's token list.",
"display_key": "ussd.kenya.first_account_tokens_set",
"name": "first_account_tokens_set",
"parent": null
},
"50": {
"description": "Menu to display middle set of tokens in the account's token list.",
"display_key": "ussd.kenya.middle_account_tokens_set",
"name": "middle_account_tokens_set",
"parent": null
},
"51": {
"description": "Menu to display last set of tokens in the account's token list.",
"display_key": "ussd.kenya.last_account_tokens_set",
"name": "last_account_tokens_set",
"parent": null
},
"52": {
"description": "Pin entry menu for setting an active token.",
"display_key": "ussd.kenya.token_selection_pin_authorization",
"name": "token_selection_pin_authorization",
"parent": null
},
"53": {
"description": "Exit following a successful active token setting.",
"display_key": "ussd.kenya.exit_successful_token_selection",
"name": "exit_successful_token_selection",
"parent": null
} }
} }
} }

View File

@ -0,0 +1,7 @@
[
"first_account_tokens_set",
"middle_account_tokens_set",
"last_account_tokens_set",
"token_selection_pin_authorization",
"exit_successful_token_selection"
]

View File

@ -58,5 +58,17 @@
"source": "exit_successful_transaction", "source": "exit_successful_transaction",
"dest": "exit", "dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_ninety_nine_selected" "conditions": "cic_ussd.state_machine.logic.menu.menu_ninety_nine_selected"
},
{
"trigger": "scan_data",
"source": "exit_successful_token_selection",
"dest": "start",
"conditions": "cic_ussd.state_machine.logic.menu.menu_zero_zero_selected"
},
{
"trigger": "scan_data",
"source": "exit_successful_token_selection",
"dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_ninety_nine_selected"
} }
] ]

View File

@ -8,15 +8,21 @@
{ {
"trigger": "scan_data", "trigger": "scan_data",
"source": "start", "source": "start",
"dest": "account_management", "dest": "first_account_tokens_set",
"conditions": "cic_ussd.state_machine.logic.menu.menu_two_selected" "conditions": "cic_ussd.state_machine.logic.menu.menu_two_selected"
}, },
{ {
"trigger": "scan_data", "trigger": "scan_data",
"source": "start", "source": "start",
"dest": "help", "dest": "account_management",
"conditions": "cic_ussd.state_machine.logic.menu.menu_three_selected" "conditions": "cic_ussd.state_machine.logic.menu.menu_three_selected"
}, },
{
"trigger": "scan_data",
"source": "start",
"dest": "help",
"conditions": "cic_ussd.state_machine.logic.menu.menu_four_selected"
},
{ {
"trigger": "scan_data", "trigger": "scan_data",
"source": "start", "source": "start",

View File

@ -0,0 +1,93 @@
[
{
"trigger": "scan_data",
"source": "first_account_tokens_set",
"dest": "middle_account_tokens_set",
"conditions": "cic_ussd.state_machine.logic.menu.menu_eleven_selected"
},
{
"trigger": "scan_data",
"source": "first_account_tokens_set",
"dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_zero_zero_selected"
},
{
"trigger": "scan_data",
"source": "first_account_tokens_set",
"dest": "token_selection_pin_authorization",
"conditions": "cic_ussd.state_machine.logic.tokens.is_valid_token_selection",
"after": "cic_ussd.state_machine.logic.tokens.process_token_selection"
},
{
"trigger": "scan_data",
"source": "first_account_tokens_set",
"dest": "exit_invalid_menu_option"
},
{
"trigger": "scan_data",
"source": "middle_account_tokens_set",
"dest": "last_account_tokens_set",
"conditions": "cic_ussd.state_machine.logic.menu.menu_eleven_selected"
},
{
"trigger": "scan_data",
"source": "middle_account_tokens_set",
"dest": "first_account_tokens_set",
"conditions": "cic_ussd.state_machine.logic.menu.menu_twenty_two_selected"
},
{
"trigger": "scan_data",
"source": "middle_account_tokens_set",
"dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_zero_zero_selected"
},
{
"trigger": "scan_data",
"source": "middle_account_tokens_set",
"dest": "token_selection_pin_authorization",
"conditions": "cic_ussd.state_machine.logic.tokens.is_valid_token_selection",
"after": "cic_ussd.state_machine.logic.tokens.process_token_selection"
},
{
"trigger": "scan_data",
"source": "middle_account_tokens_set",
"dest": "exit_invalid_menu_option"
},
{
"trigger": "scan_data",
"source": "last_account_tokens_set",
"dest": "middle_account_tokens_set",
"conditions": "cic_ussd.state_machine.logic.menu.menu_twenty_two_selected"
},
{
"trigger": "scan_data",
"source": "last_account_tokens_set",
"dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_zero_zero_selected"
},
{
"trigger": "scan_data",
"source": "last_account_tokens_set",
"dest": "token_selection_pin_authorization",
"conditions": "cic_ussd.state_machine.logic.tokens.is_valid_token_selection",
"after": "cic_ussd.state_machine.logic.tokens.process_token_selection"
},
{
"trigger": "scan_data",
"source": "last_account_tokens_set",
"dest": "exit_invalid_menu_option"
},
{
"trigger": "scan_data",
"source": "token_selection_pin_authorization",
"dest": "exit_successful_token_selection",
"conditions": "cic_ussd.state_machine.logic.pin.is_authorized_pin",
"after": "cic_ussd.state_machine.logic.tokens.set_selected_active_token"
},
{
"trigger": "scan_data",
"source": "token_selection_pin_authorization",
"dest": "exit",
"conditions": "cic_ussd.state_machine.logic.menu.menu_zero_zero_selected"
}
]