Class: Swarm::SubprocessExpression
- Inherits:
-
Expression
- Object
- HiveDweller
- Expression
- Swarm::SubprocessExpression
- Defined in:
- lib/swarm/expressions/subprocess_expression.rb
Instance Attribute Summary
Attributes inherited from HiveDweller
Instance Method Summary collapse
Methods inherited from Expression
#_apply, #_reply, #apply, #arguments, #branch_position, #command, #evaluator, inherited, #meets_conditions?, #node, #node_at_position, #parent, #replied?, #replied_at, #reply, #reply_to_parent, #root?, storage_type, #tree
Methods inherited from HiveDweller
#==, all, #attributes, #change_attribute, #changed?, create, #delete, each, fetch, ids, inherited, #initialize, many_to_one, #new?, new_from_storage, one_to_many, #reload!, #save, #set_attributes, set_columns, #storage, #storage_id, storage_id_for_key, storage_type, #to_hash
Constructor Details
This class inherits a constructor from Swarm::HiveDweller
Instance Method Details
#move_on_from(process) ⇒ Object
9 10 11 12 |
# File 'lib/swarm/expressions/subprocess_expression.rb', line 9 def move_on_from(process) self.workitem = process.workitem reply end |
#work ⇒ Object
3 4 5 6 7 |
# File 'lib/swarm/expressions/subprocess_expression.rb', line 3 def work definition = ProcessDefinition.find_by_name(arguments.fetch("name", nil)) raise Swarm::ProcessDefinition::RecordNotFoundError unless definition process = definition.launch_process(workitem: workitem, parent_expression_id: id) end |