View Source Glific.Flows.Exit (Glific v5.1.6)

The Exit object which encapsulates one exit in a given node.

Link to this section Summary

Functions

Execute a exit, given a message stream.

Process a json structure from floweditor to the Glific data types

Link to this section Types

@type t() :: %Glific.Flows.Exit{
  destination_node: Glific.Flows.Node.t() | nil,
  destination_node_uuid: Ecto.UUID.t() | nil,
  id: term(),
  node: Glific.Flows.Node.t() | nil,
  node_uuid: Ecto.UUID.t() | nil,
  uuid: Ecto.UUID.t() | nil
}

Link to this section Functions

Link to this function

execute(exit, context, messages)

View Source
@spec execute(atom() | t(), atom() | Glific.Flows.FlowContext.t(), [
  Glific.Messages.Message.t()
]) ::
  {:ok, Glific.Flows.FlowContext.t() | nil, [Glific.Messages.Message.t()]}
  | {:error, String.t()}

Execute a exit, given a message stream.

Link to this function

process(json, uuid_map, node)

View Source
@spec process(map(), map(), Glific.Flows.Node.t()) :: {t(), map()}

Process a json structure from floweditor to the Glific data types

Link to this function

validate(exit, errors, flow)

View Source
@spec validate(t(), Keyword.t(), map()) :: Keyword.t()

Validate a exit