Class Ruote::Worker
In: lib/ruote/worker.rb
Parent: Object

Workers fetch ‘msgs’ and ‘schedules’ from the storage and process them.

Read more at ruote.rubyforge.org/configuration.html

Methods

Constants

EXP_ACTIONS = %w[ reply cancel fail receive dispatched ]
PROC_ACTIONS = %w[ cancel_process kill_process ]   ‘apply’ is comprised in ‘launch’ ‘receive’ is a ParticipantExpression alias for ‘reply‘
DISP_ACTIONS = %w[ dispatch dispatch_cancel ]

Attributes

context  [R] 
run_thread  [R] 
running  [R] 
storage  [R] 

Public Class methods

Public Instance methods

Returns true if the engine system is inactive, ie if all the process instances are terminated or are stuck in an error.

NOTE : for now, if a branch of a process is in error while another is still running, this method will consider the process instance inactive (and it will return true if all the processes are considered inactive).

Joins the run thread of this worker (if there is no such thread, this method will return immediately, without any effect).

Runs the worker in the current thread. See run_in_thread for running in a dedicated thread.

Triggers the run method of the worker in a dedicated thread.

Protected Instance methods

Should always return false. Except when the message is a ‘dispatch’ and it‘s for a participant only available to an ‘engine_worker’ (block participants, stateful participants)

kill_process(msg)

Alias for cancel_process

Works for both the ‘launch’ and the ‘apply’ msgs.

[Validate]