Jido.Actions.StateManager.Get (Jido v1.1.0-rc.2)
View SourceAction for retrieving a value from the agent's state.
Gets a value from the agent's state at the specified path.
Summary
Functions
Callback implementation for Jido.Action.on_after_run/1
.
Callback implementation for Jido.Action.on_after_validate_params/1
.
Callback implementation for Jido.Action.on_before_validate_params/1
.
Callback implementation for Jido.Action.on_error/4
.
Executes the Action with the given parameters and context.
Validates the input parameters for the Action.
Functions
Callback implementation for Jido.Action.on_after_run/1
.
Callback implementation for Jido.Action.on_after_validate_params/1
.
Callback implementation for Jido.Action.on_before_validate_params/1
.
Callback implementation for Jido.Action.on_error/4
.
Executes the Action with the given parameters and context.
The run/2
function must be implemented in the module using Jido.Action.
Validates the input parameters for the Action.
Examples
iex> defmodule ExampleAction do
...> use Jido.Action,
...> name: "example_action",
...> schema: [
...> input: [type: :string, required: true]
...> ]
...> end
...> ExampleAction.validate_params(%{input: "test"})
{:ok, %{input: "test"}}
iex> ExampleAction.validate_params(%{})
{:error, "Invalid parameters for Action: Required key :input not found"}