View Source wfnet_srv (wfnet v0.1.0)
This is tha main workflow engine/controller.
Currently it can only handle one workflow at a time, within a single node.Summary
Functions
tell the server to load a new workflow from a file
tell the server to load a new workflow
start the current workflow
Starts the server
handle task done
return the current server status.
Types
-type task_data() :: term().
-type task_id() :: integer().
-type task_rec() :: #task_rec{}.
-type task_state() :: inactive | done | waiting | running.
-type task_type() :: wfenter | wftask | wfands | wfandj | wfxors | wfxorj | wfexit.
Functions
-spec load_file(file:name_all()) -> ok | {error, term()}.
-spec load_wf(file:name_all()) -> ok | {error, term()}.
-spec run_wf() -> ok | {error, term()}.
-spec start_link() ->
{ok, Pid :: pid()} |
{error, Error :: {already_started, pid()}} |
{error, Error :: term()} |
ignore.
-spec task_done(integer(), term()) -> ok | {error, term()}.
-spec wf_info() -> term().