Class: BPMN::Task
Instance Attribute Summary
Attributes inherited from Activity
#attachments
Attributes inherited from Step
#default, #default_ref, #incoming, #outgoing
Attributes inherited from Element
#extension_elements, #id, #name
Instance Method Summary
collapse
Methods inherited from Activity
#initialize
Methods inherited from Step
#converging?, #diverging?, #initialize, #input_mappings, #leave, #outgoing_flows, #output_mappings
Methods inherited from Element
#initialize, #inspect
Constructor Details
This class inherits a constructor from BPMN::Activity
Instance Method Details
#execute(execution) ⇒ Object
14
15
16
|
# File 'lib/bpmn/task.rb', line 14
def execute(execution)
execution.wait
end
|
#is_automated? ⇒ Boolean
6
7
8
|
# File 'lib/bpmn/task.rb', line 6
def is_automated?
false
end
|
#is_manual? ⇒ Boolean
10
11
12
|
# File 'lib/bpmn/task.rb', line 10
def is_manual?
true
end
|
#result_to_variables(result) ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/bpmn/task.rb', line 22
def result_to_variables(result)
if result_variable
return { "#{result_variable}": result }
else
if result.is_a? Hash
result
else
{}.tap { |h| h[id.underscore] = result }
end
end
end
|
#signal(execution) ⇒ Object
18
19
20
|
# File 'lib/bpmn/task.rb', line 18
def signal(execution)
leave(execution)
end
|