Form Action not working when connected to Mongodb


I have created the flight related chat bot for that i have used custom form actions. This Form action is working when bot is not connected to mongo db database. If i have connected to database From actions is skipping and triggering the Fallback action. May i know the reason for this. please help me