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

Link to this function

add_event(pid, id, type, options)

Link to this function

add_event_based_gateway(pid, id, options)

Link to this function

add_exclusive_gateway(pid, id, options)

Link to this function

add_parallel_gateway(pid, id, options)

Link to this function

add_precedence_gateway(pid, id, options)

Adds Precedence Gateway (BPXE.Engine.PrecedenceGateway). Please note that this is not a standard gateway.

Link to this function

add_sequence_flow(pid, id, options)

Link to this function

add_task(pid, id, type, options)

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

enter_loop(state)

Link to this function

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.

Link to this function

flow_nodes(pid)

Callback implementation for GenServer.init/1.

Link to this function

init_recoverable(state)

Link to this function

initialize(state)

Specs

log(pid(), term()) :: :ok

Publishes a process log to listeners.

Link to this function

set_variables(pid, variables)

Link to this function

start_link(id, options, instance)

Link to this function

subscribe_log(pid, subscriber \\ self())

Specs

subscribe_log(pid(), pid()) :: :ok

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.

Link to this function

synthesize(pid)

Link to this function

unsubscribe_log(pid, subscriber \\ self())

Specs

unsubscribe_log(pid(), pid()) :: :ok | {:error, term()}

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.