Workflow Engine v0.1.0 WE.StorageAdapter behaviour View Source
A behaviour for storage adapters. This adapter is responsible for storing the engine's history
and the documents into a storage solution. By default the WE.Adapter.Local is loaded and used.
It is recommended to only use this in memory adapter in dev and test becasue a restart will
purge all its data.
Link to this section Summary
Types
The name of the document given as parameter in WE.Document.document/1 during workflow construction.
The unique identifier of a history record. This id is equal to the business_id.
Callbacks
Find a document by history_id/0
Find a document by the document's name.
Store a document.
Store a history record.
Update a document.
Link to this section Types
The name of the document given as parameter in WE.Document.document/1 during workflow construction.
The unique identifier of a history record. This id is equal to the business_id.
Link to this section Callbacks
find_all_history_records(history_id)
View Source (since 0.1.0)find_all_history_records(history_id()) :: [WE.HistoryRecord.t()]
Find a document by history_id/0
find_document(document_name)
View Source (since 0.1.0)find_document(document_name()) :: WE.Document.t() | {:error, String.t()}
Find a document by the document's name.
store_document(arg1)
View Source (since 0.1.0)store_document(WE.Document.t()) :: {:ok, WE.Document.t()} | {:error, String.t()}
Store a document.
store_history_record(history_id, arg2)
View Source (since 0.1.0)store_history_record(history_id(), WE.HistoryRecord.t()) :: {:ok, WE.HistoryRecord} | {:error, String.t()}
Store a history record.
update_document(arg1)
View Source (since 0.1.0)update_document(WE.Document.t()) :: {:ok, WE.Document.t()} | {:error, String.t()}
Update a document.