BPXE.Engine.Process (bpxe v0.1.0)
Link to this section Summary
Functions
Adds Precedence Gateway (BPXE.Engine.PrecedenceGateway
). Please note that this is not a standard gateway.
Returns a specification to start this module under a supervisor.
Convenience helper for adding and connecting sequence flow programmatically.
Callback implementation for GenServer.init/1
.
Publishes a process log to listeners.
Passively listen for log messages from a process. This will start delivering messages in the following format
Stop receiving passive log messages from a process (initiated by subscribe_logs/2
). If you were not listening
originally, it will return {:error, :not_listening}
. Otherwise, it will return :ok
.
Link to this section Functions
add_event(pid, id, type, options)
add_event_based_gateway(pid, id, options)
add_exclusive_gateway(pid, id, options)
add_parallel_gateway(pid, id, options)
add_precedence_gateway(pid, id, options)
Adds Precedence Gateway (BPXE.Engine.PrecedenceGateway
). Please note that this is not a standard gateway.
add_sequence_flow(pid, id, options)
add_task(pid, id, type, options)
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
enter_loop(state)
establish_sequence_flow(pid, id, source, target, options \\ [])
Specs
establish_sequence_flow(pid(), term(), pid(), pid(), Map.t() | [term()]) :: {:ok, pid()} | {:error, term()}
Convenience helper for adding and connecting sequence flow programmatically.
Instead of having to to orchestrate BPXE.Engine.FlowNode.add_incoming/2
,
BPXE.Engine.FlowNode.add_outgoing/2
and add_sequence_flow/3
, this allows
to do all of that in just one call.
This reduces the amount of code that has to be written and therefore makes it easier to debug.
flow_nodes(pid)
id(pid)
init(arg)
Callback implementation for GenServer.init/1
.
init_recoverable(state)
initialize(state)
log(pid, log)
Specs
Publishes a process log to listeners.
set_variables(pid, variables)
start(pid)
start(pid, id)
start_link(id, options, instance)
subscribe_log(pid, subscriber \\ self())
Specs
Passively listen for log messages from a process. This will start delivering messages in the following format:
{BPXE.Engine.Process.Log, message}
to subscriber
(self()
by default). Most (if not all?) log messages should be defined in
BPXE.Engine.Process.Log
module.
This is particularly useful for testing, rendering visualizations, etc.
to stop listening, call unsubscribe_log/2
.
synthesize(pid)
unsubscribe_log(pid, subscriber \\ self())
Specs
Stop receiving passive log messages from a process (initiated by subscribe_logs/2
). If you were not listening
originally, it will return {:error, :not_listening}
. Otherwise, it will return :ok
.