Repository: rasahq/rasa
Issue: Forms do not provide action endpoint to call custom ask slot actions

<!-- THIS INFORMATION IS MANDATORY - YOUR ISSUE WILL BE CLOSED IF IT IS MISSING. If you don't know your Rasa version, use `rasa --version`. 
Please format any code or console output with three ticks ``` above and below.
If you are asking a usage question (e.g. "How do I do xyz") please post your question on https://forum.rasa.com instead -->

**Rasa version**: 2.0.0a2

**Rasa SDK version** (if used & relevant):

**Rasa X version** (if used & relevant):

**Python version**: 3.6.8

**Operating system** (windows, osx, ...): Ubuntu 18.04

**Issue**:
When providing a custom action to ask for a slot in a 2.0 form, the call fails because it the action endpoint is not passed to the custom action. I reproduced this case easily with the formbot in the examples. I added this action:
```python
class ActionAskCuisine(Action):
    def name(self) -> Text:
        return "action_ask_cuisine"

    def run(
        self,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
    ) -> List[Dict[Text, Any]]:
        dispatcher.utter_message(template="utter_ask_cuisine")

        return []
```
in actions.py, and 

```yml
actions:
  - action_ask_cuisine
```
in domain.yml, and changed nothing else. The action can be called if named directly in the rules but not if called by the restaurant form, getting the following result:

**Error (including full traceback)**:
```
2020-08-26 16:45:44 DEBUG    rasa.core.actions.forms  - Request next slot 'cuisine'
2020-08-26 16:45:44 ERROR    rasa.core.actions.action  - The model predicted the custom action 'action_ask_cuisine', but you didn't configure an endpoint to run this custom action. Please take a look at the docs and set an endpoint configuration via the --endpoints flag. https://rasa.com/docs/rasa/core/actions
2020-08-26 16:45:44 ERROR    rasa.core.processor  - Encountered an exception while running action 'restaurant_form'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
2020-08-26 16:45:44 DEBUG    rasa.core.processor  - Failed to execute custom action.
Traceback (most recent call last):
  File "/home/kdery/.local/lib/python3.6/site-packages/rasa/core/processor.py", line 644, in _run_action
    events = await action.run(output_channel, nlg, tracker, self.domain)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/kdery/.local/lib/python3.6/site-packages/rasa/core/actions/loops.py", line 29, in run
    events += await self.do(output_channel, nlg, tracker, domain, events)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/kdery/.local/lib/python3.6/site-packages/rasa/core/actions/forms.py", line 586, in do
    tracker, domain, output_channel, nlg, events_so_far + events
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/kdery/.local/lib/python3.6/site-packages/rasa/core/actions/forms.py", line 424, in request_next_slot
    domain, nlg, output_channel, slot_to_request, temp_tracker
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/kdery/.local/lib/python3.6/site-packages/rasa/core/actions/forms.py", line 472, in _ask_for_slot
    output_channel, nlg, tracker, domain
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/kdery/.local/lib/python3.6/site-packages/rasa/core/actions/action.py", line 557, in run
    raise Exception("Failed to execute custom action.")
Exception: Failed to execute custom action.
2020-08-26 16:45:44 DEBUG    rasa.core.processor  - Action 'restaurant_form' ended with events '[]'.
```

**Command or request that led to error**:
```
rasa run actions&
rasa shell -m models --endpoints endpoints.yml --debug
...
Your input -> I want to find a restaurant
```

**Content of domain file (domain.yml)** (if relevant): (Same as formbot and modified as mentionned)

The problem seems to be in the FormAction definition, right where I commented in the following code. I could submit a PR, unless there is some kind of ramification I don't see/know about.

```python
class FormAction(LoopAction):
    ...
    async def _ask_for_slot(
        self,
        domain: Domain,
        nlg: NaturalLanguageGenerator,
        output_channel: OutputChannel,
        slot_name: Text,
        tracker: DialogueStateTracker,
    ) -> List[Event]:
        logger.debug(f"Request next slot '{slot_name}'")

        action_to_ask_for_next_slot = action.action_from_name(
            self._name_of_utterance(domain, slot_name), None, domain.user_actions # None should be self.action_endpoint
        )
        events_to_ask_for_next_slot = await action_to_ask_for_next_slot.run(
            output_channel, nlg, tracker, domain
        )
        return events_to_ask_for_next_slot
```


Changed files:
rasa/core/actions/forms.py, tests/core/actions/test_forms.py

diff --git a/rasa/core/actions/forms.py b/rasa/core/actions/forms.py
index 67bfdff83c8..34ce203dea7 100644
--- a/rasa/core/actions/forms.py
+++ b/rasa/core/actions/forms.py
@@ -466,7 +466,9 @@ class FormAction(LoopAction):
         logger.debug(f"Request next slot '{slot_name}'")
 
         action_to_ask_for_next_slot = action.action_from_name(
-            self._name_of_utterance(domain, slot_name), None, domain.user_actions
+            self._name_of_utterance(domain, slot_name),
+            self.action_endpoint,
+            domain.user_actions,
         )
         events_to_ask_for_next_slot = await action_to_ask_for_next_slot.run(
             output_channel, nlg, tracker, domain
diff --git a/tests/core/actions/test_forms.py b/tests/core/actions/test_forms.py
index a29958dd493..5e96e473165 100644
--- a/tests/core/actions/test_forms.py
+++ b/tests/core/actions/test_forms.py
@@ -996,9 +996,10 @@ async def test_ask_for_slot(
     slot_name = "sun"
 
     action_from_name = Mock(return_value=action.ActionListen())
+    endpoint_config = Mock()
     monkeypatch.setattr(action, action.action_from_name.__name__, action_from_name)
 
-    form = FormAction("my_form", None)
+    form = FormAction("my_form", endpoint_config)
     await form._ask_for_slot(
         Domain.from_dict(domain),
         None,
@@ -1007,4 +1008,4 @@ async def test_ask_for_slot(
         DialogueStateTracker.from_events("dasd", []),
     )
 
-    action_from_name.assert_called_once_with(expected_action, None, ANY)
+    action_from_name.assert_called_once_with(expected_action, endpoint_config, ANY)