- rule: Activate company dir form
steps:
- intent: company_directory
- action: company_dir_form
- active_loop: company_dir_form
- slot_was_set:
- requested_slot: EmpSearch
- rule: Submit Company dir form
condition:
- active_loop: company_dir_form
steps:
- action: company_dir_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: display_comp_dir_data
- action: restart_conversation
I am using rasa 2.8 above is a rule that I have created
Now everything works but EmpSearch is a requested slot, if a wrong input is given and it gets failed in validation then it doesn’t ask for EmpSearch again, instead it goes on with rule, I want if value of EmpSearch fails in validation then form should ask again from user until it passes in validation.
This happens correctly in stories but i want same behaviour in rules
Thanks
Hi @NIkhilBhaskar, could you please also share your other YAML files from your setup, especially domain.yml
where the slots and form are defined and the actions file containing the form validation action? In your validation action, do you set the slot value to None
in case validation fails, as shown in this example? This should usually trigger the form to re-ask for the requested slot.
Hi @MatthiasLeimeister ,
Yes I do set the slot to None in case it fails, usually it re asks in case of stories but it is not happening in rules
I would not be able to send the whole domain.yml file but I am pasting the code for defining this particular form.
forms:
company_dir_form:
EmpSearch:
- entity: EmpSearch
type: from_entity
Can you help using this?
Hi, the form definition looks correct to me. Another potential source of the issue: did you register the validation action in domain.yml
? Such as
actions:
- validate_company_dir_form
If this is missing, the validation would be skipped I think.
This is present,
The problem is it doesn’t re asks,it asks for the first time
if there would be any syntax error it would have been skipped altogether and not asked for validation at all
Hi, could you provide a minimal example of a complete bot that triggers the issue? If you cannot share your data and domain, could you replace the sensitive parts with something general/a different use case? Then I would try to reproduce it to be able to debug. Thanks!