Glific v0.3.1 Glific.Flows.Router View Source

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 floweditor to the Glific data types

Link to this section Types

Specs

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(),
  node: Glific.Flows.Node.t() | nil,
  node_uuid: Ecto.UUID.t() | nil,
  operand: term(),
  result_name: String.t() | nil,
  type: String.t() | nil,
  wait: Glific.Flows.Wait.t() | nil,
  wait_type: term()
}

Link to this section Functions

Link to this function

execute(router, context, message_stream)

View Source

Specs

execute(t(), Glific.Flows.FlowContext.t(), [String.t()]) ::
  {:ok, Glific.Flows.FlowContext.t(), [String.t()]} | {:error, String.t()}

Execute a router, given a message stream. Consume the message stream as processing occurs

Link to this function

process(json, uuid_map, node)

View Source

Specs

process(map(), map(), Glific.Flows.Node.t()) :: {t(), map()}

Process a json structure from floweditor to the Glific data types