% In this table record we hold the state (work item) of a transaction that is currently processed (worked on). A work
% item is created when a requiest from the IPAd positively maps to a pending order in the REST table
% (see mnesia_db_rest). A work item can be understood as the dynamic state of the ongoing connection between eIM and
% IPAd (and SM-DP+). When the transaction is done and the work is finished, the related work item is deleted and the
% outcome is recorded at the related REST resource.
-record(work, {
    % PID of the sub-process (cowbow) on which the work item is processed.
    pid :: pid(),
    % identifier of the related REST resource
    resourceId :: binary(),
    % transaction ID (either eimTransactionId or transactionId, see also SGP.32 and SGP.22)
    transactionId :: binary(),
    % EID of the related eUICC
    eidValue :: binary(),
    % order parameters received on creation of the related REST resource
    order :: tuple(),
    % intermediate results and states generated while processing the requested order
    state :: any()
}).
