Workflow Engine v0.1.0 WE.InMemoryStorage View Source

In-memory storage is an in memory implementation of the WE.StorageAdapter behaviour. It is a naieve implementation mainly used for testing purposes or to get up to speed quickly in dev. The data in this storage is stored in memory and won't persist once the application is stopped.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the InMemoryStorage server

Stops the InMemoryStorage server

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

find_all_history_records(history_id)

View Source
find_all_history_records(String.t()) :: [WE.HistoryRecord.t()]
Link to this function

find_document(document_name)

View Source
find_document(String.t()) :: {:ok, WE.Document.t()} | {:error, String.t()}

Starts the InMemoryStorage server

Stops the InMemoryStorage server

Link to this function

store_document(doc)

View Source
store_document(WE.Document.t()) :: {:ok, WE.Document.t()} | {:error, String.t()}
Link to this function

store_history_record(history_id, record)

View Source
store_history_record(String.t(), WE.HistoryRecord.t()) ::
  {:ok, WE.HistoryRecord.t()} | {:error, Stirng.t()}
Link to this function

update_document(doc)

View Source
update_document(WE.Document.t()) ::
  {:ok, WE.Document.t()} | {:error, String.t()}