# How to clear the slot value in java action server

**URL:** <https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813>\
**Category:** Rasa Open Source\
**Created:** [October 17, 2022, 9:11am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813 "2022-10-17T09:11:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yubiaohyb](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yubiaohyb/32/21769_2.png) [@yubiaohyb](https://forum.rasa.com/u/yubiaohyb)\
**Post date:** [October 17, 2022, 9:11am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/1 "2022-10-17T09:11:27Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![anoopshrma](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anoopshrma/32/13349_2.png) [@anoopshrma](https://forum.rasa.com/u/anoopshrma)\
**Post date:** [October 17, 2022, 9:17am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/2 "2022-10-17T09:17:49Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![yubiaohyb](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yubiaohyb/32/21769_2.png) [@yubiaohyb](https://forum.rasa.com/u/yubiaohyb)\
**Post date:** [October 17, 2022, 9:22am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/3 "2022-10-17T09:22:10Z")

</div>

> [@anoopshrma](#):
>
> saved

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

---

<div class="post-metadata">

**Author:** ![anoopshrma](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anoopshrma/32/13349_2.png) [@anoopshrma](https://forum.rasa.com/u/anoopshrma)\
**Post date:** [October 17, 2022, 9:27am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/4 "2022-10-17T09:27:15Z")

</div>

@yubiaohyb

To know more about the slots, Follow this article [Slots in Rasa](https://rasa.com/docs/rasa/domain/#slots)

To create actions in Rasa, Follow this article - [Rasa Actions](https://rasa.com/docs/rasa/actions)

---

<div class="post-metadata">

**Author:** ![yubiaohyb](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yubiaohyb/32/21769_2.png) [@yubiaohyb](https://forum.rasa.com/u/yubiaohyb)\
**Post date:** [October 17, 2022, 9:42am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/5 "2022-10-17T09:42:02Z")

</div>

> [@anoopshrma](#):
>
> `action: action_reset_required_slot`

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

---

<div class="post-metadata">

**Author:** ![yubiaohyb](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yubiaohyb/32/21769_2.png) [@yubiaohyb](https://forum.rasa.com/u/yubiaohyb)\
**Post date:** [October 17, 2022, 9:44am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/6 "2022-10-17T09:44:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anoopshrma](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anoopshrma/32/13349_2.png) [@anoopshrma](https://forum.rasa.com/u/anoopshrma)\
**Post date:** [October 17, 2022, 9:54am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/7 "2022-10-17T09:54:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yubiaohyb](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yubiaohyb/32/21769_2.png) [@yubiaohyb](https://forum.rasa.com/u/yubiaohyb)\
**Post date:** [October 17, 2022, 10:01am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/8 "2022-10-17T10:01:17Z")

</div>

> [@anoopshrma](#):
>
> Based

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

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/8/6/86e0bbcb752bf4af6bd01121eccebab6134b920f.png)  
i think i should code the logic in the “action\_query\_store\_by\_name\_submit” section.

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [October 17, 2022, 2:43pm UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/9 "2022-10-17T14:43:05Z")

</div>

If you’re not going to use python then you’ll need to write the [rasa-sdk](https://github.com/RasaHQ/rasa-sdk/tree/365376f0e6ff5932c4271ac292696e4cf9c5b76e/rasa_sdk) python functions in Java.

---

<div class="post-metadata">

**Author:** ![yubiaohyb](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yubiaohyb/32/21769_2.png) [@yubiaohyb](https://forum.rasa.com/u/yubiaohyb)\
**Post date:** [October 18, 2022, 1:20am UTC](https://forum.rasa.com/t/how-to-clear-the-slot-value-in-java-action-server/55813/10 "2022-10-18T01:20:04Z")

</div>

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