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

The Case object which encapsulates one category in a given node.

Link to this section Summary

Functions

Execute a case, given a message. This is the only execute function which has a different signature, since it just consumes one message at a time and executes it against a predefined function It also returns a boolean, rather than a tuple

Process a json structure from flow editor to the Glific data types

Link to this section Types

@type t() :: %Glific.Flows.Case{
  arguments: [String.t()],
  category: Glific.Flows.Category.t() | nil,
  category_uuid: Ecto.UUID.t() | nil,
  id: term(),
  name: term(),
  parsed_arguments: term(),
  type: String.t() | nil,
  uuid: Ecto.UUID.t() | nil
}

Link to this section Functions

Link to this function

execute(flow_case, context, msg)

View Source
@spec execute(t(), Glific.Flows.FlowContext.t(), Glific.Messages.Message.t()) ::
  boolean()

Execute a case, given a message. This is the only execute function which has a different signature, since it just consumes one message at a time and executes it against a predefined function It also returns a boolean, rather than a tuple

Link to this function

process(json, uuid_map, object \\ nil)

View Source
@spec process(map(), map(), any()) :: {t(), map()}

Process a json structure from flow editor to the Glific data types

Link to this function

validate(case, errors, flow, wait)

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

Validate a case