How to clear the slot value in java action server

hello,all. i’m trying to test a form. now i have completed the flow, but when i trigger the intent again, the form doesn’t ask me for the slot as expect, it goes to submit the form directly. i’m confused how to clear the slot value in java action server , help, brothers !

Hi @yubiaohyb ,

Rasa slots keep the value saved into them, so to enter value in the same slot again, You can add one slot resetting action in the beginning or at the end of the story flow so that whenever the flow is invoked you will have the required slot empty as the action would reset the slot for you to save new value.

story: RESET SLOT
  - action: action_reset_required_slot
  .   Your rest of the story goes here
  .
  . OR Add the reset action here at the end

that’s nice, where i can find the part in the docs?

@yubiaohyb

To know more about the slots, Follow this article Slots in Rasa

To create actions in Rasa, Follow this article - Rasa Actions

still need some help , how to code this in java for this action , i need to know the response data structure.

actually, i’m stuck in this step for several days.

Action server in Rasa is Python Based, have you created some sort of wrapper over this server?

no, i use a java application as action server, that would simplify my work.


i think i should code the logic in the “action_query_store_by_name_submit” section.

If you’re not going to use python then you’ll need to write the rasa-sdk python functions in Java.

ok, thx, i get it , i igonored the event defefinition part in rasa-java-sdk before. :see_no_evil: