Modules and Functions

Copy Markdown View Source

Here is a brief summary of the modules and functions exposed by Journey.

Journey (Main Module)

The entry point for the Journey library. Provides functions for creating and managing computation graphs, starting and managing executions, and retrieving values from executions.

Graph Management

  • Journey.new_graph/4 - Creates a new computation graph with the given name, version, and node definitions. Accepts options including singleton: true for singleton graphs and keep_latest_completed_computations: N for graph-wide computation retention.

Execution Lifecycle

Value Operations

  • Journey.set/2, Journey.set/3 - Sets values for input node(s) in an execution (potentially unblocking downstream computations). Accepts an execution struct or an execution ID.
  • Journey.unset/2 - Removes values from input nodes and invalidates all dependent computed nodes. Accepts an execution struct or an execution ID.
  • Journey.get/3 - Returns the value of a node in an execution and its revision, optionally waits for the value to be set or updated. Accepts an execution struct or an execution ID.

Data Retrieval

  • Journey.values/2 - Returns a map of all set node values in an execution, excluding unset nodes. Accepts an execution struct or an execution ID.
  • Journey.values_all/2 - Returns a map of all nodes in an execution with their current status, including unset nodes. Accepts an execution struct or an execution ID.

Deprecated

Journey.Node

Functions for creating various types of nodes in a graph.

Functions:

Journey.Node.Conditions

Helper functions for use in graph definitions, when defining upstream dependencies for compute modules.

Functions:

Journey.Node.UpstreamDependencies

Functions for defining complex conditions under which nodes are unblocked.

Functions:

Journey.Tools

Utility functions for debugging, analysis, and visualization of Journey executions.

Functions:

Deprecated

Journey.Insights.FlowAnalytics

System-wide aggregate data about the state of executions for a particular graph. Business-focused analytics for understanding customer behavior.

Functions:

Journey.Insights.Status

System health and monitoring insights for Journey executions.

Functions:

Example: Journey.Examples.CreditCardApplication

Demonstrates building a complete credit card application workflow using Journey.

See the full implementation: lib/journey/examples/credit_card_application.ex

Example: Journey.Examples.UselessMachine

Contains a simple example of building a "Useless Machine" using Journey - a reactive system that automatically turns itself off when turned on.

See the full implementation: lib/journey/examples/useless_machine.ex