Module OpenWFE::ExpoolMethods
In: lib/openwfe/engine/expool_methods.rb

ExpressionPool methods available via the engine.

Methods

Public Instance methods

abort_process(exp_or_wfid)

Alias for cancel_process

Cancels the given expression (and its children if any) (warning : advanced method)

Cancelling the root expression of a process is equivalent to cancelling the process.

[Source]

     # File lib/openwfe/engine/expool_methods.rb, line 125
125:         def cancel_expression (exp_or_fei)
126: 
127:             get_expression_pool.cancel_expression exp_or_fei
128:         end
cancel_flow(exp_or_wfid)

Alias for cancel_process

Given any expression of a process, cancels the complete process instance.

[Source]

     # File lib/openwfe/engine/expool_methods.rb, line 111
111:         def cancel_process (exp_or_wfid)
112: 
113:             get_expression_pool.cancel_process exp_or_wfid
114:         end

Forgets the given expression (make it an orphan) (warning : advanced method)

[Source]

     # File lib/openwfe/engine/expool_methods.rb, line 134
134:         def forget_expression (exp_or_fei)
135: 
136:             get_expression_pool.forget exp_or_fei 
137:         end
get_flow_stack(workflow_instance_id, unapplied=false)

Alias for process_stack

get_process_stack(workflow_instance_id, unapplied=false)

Alias for process_stack

Lists all workflow (process) instances currently in the expool (in the engine). This method will return a list of "process-definition" expressions (i.e. OpenWFE::DefineExpression objects — each representing the root element of a flow).

:wfid :will list only one process, :wfid => ‘20071208-gipijiwozo‘
:parent_wfid :will list only one process, and its subprocesses, :parent_wfid => ‘20071208-gipijiwozo‘
:consider_subprocesses :if true, "process-definition" expressions of subprocesses will be returned as well.
:wfid_prefix :allows your to query for specific workflow instance id prefixes. for example : :wfid_prefix => "200712" for the processes started in December.
:wfname :will return only the process instances who belongs to the given workflow [name].
:wfrevision :usued in conjuction with :wfname, returns only the process instances of a given workflow revision.

[Source]

     # File lib/openwfe/engine/expool_methods.rb, line 101
101:         def list_processes (options={})
102: 
103:             get_expression_pool.list_processes options
104:         end
list_workflows(options={})

Alias for list_processes

Returns the list of applied expressions belonging to a given workflow instance. May be used to determine where a process instance currently is.

This method returns all the expressions (the stack) a process went through to reach its current state.

If the unapplied optional parameter is set to true, all the expressions (even those not yet applied) that compose the process instance will be returned.

[Source]

    # File lib/openwfe/engine/expool_methods.rb, line 66
66:         def process_stack (workflow_instance_id, unapplied=false)
67: 
68:             get_expression_pool.process_stack workflow_instance_id, unapplied
69:         end

Protected Instance methods

In case of wfid, returns the root expression of the process, in case of fei, returns the expression itself.

[Source]

     # File lib/openwfe/engine/expool_methods.rb, line 145
145:             def fetch_exp (fei_or_wfid)
146: 
147:                 exp = if fei_or_wfid.is_a?(String)
148: 
149:                     get_expression_pool.fetch_root fei_or_wfid
150: 
151:                 else
152: 
153:                     get_expression_pool.fetch_expression fei_or_wfid
154:                 end
155: 
156:                 exp or raise "no expression found for '#{fei_or_wfid.to_s}'"
157:             end

[Validate]