View Source Glific.Flows.Router (Glific v5.1.6)
The Router object which encapsulates the router in a given node.
Link to this section Summary
Functions
Execute a router, given a message stream. Consume the message stream as processing occurs
Process a json structure from flow editor to the Glific data types
Validate a action and all its children
Link to this section Types
@type t() :: %Glific.Flows.Router{ __meta__: term(), cases: [Glific.Flows.Case.t()] | nil, categories: [Glific.Flows.Category.t()] | nil, default_category: Glific.Flows.Category.t() | nil, default_category_uuid: Ecto.UUID.t() | nil, id: term(), no_response_exit_uuid: Ecto.UUID.t() | nil, node: Glific.Flows.Node.t() | nil, node_uuid: Ecto.UUID.t() | nil, operand: term(), other_exit_uuid: Ecto.UUID.t() | nil, result_name: String.t() | nil, type: String.t() | nil, wait: Glific.Flows.Wait.t() | nil, wait_type: term() }
Link to this section Functions
@spec execute(t(), Glific.Flows.FlowContext.t(), [Glific.Messages.Message.t()]) :: {:ok, Glific.Flows.FlowContext.t(), [Glific.Messages.Message.t()]} | {:error, String.t()}
Execute a router, given a message stream. Consume the message stream as processing occurs
@spec process(map(), map(), Glific.Flows.Node.t()) :: {t(), map()}
Process a json structure from flow editor to the Glific data types
Validate a action and all its children