Class: SpotFlow::Bpmn::ServiceTask
- Inherits:
-
Task
show all
- Defined in:
- lib/spot_flow/bpmn/task.rb
Instance Attribute Summary collapse
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 Task
#result_to_variables, #signal
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
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
64
65
66
|
# File 'lib/spot_flow/bpmn/task.rb', line 64
def service
@service
end
|
Instance Method Details
#execute(execution) ⇒ Object
74
75
76
|
# File 'lib/spot_flow/bpmn/task.rb', line 74
def execute(execution)
execution.wait
end
|
86
87
88
|
# File 'lib/spot_flow/bpmn/task.rb', line 86
def
extension_elements&.&.
end
|
#is_automated? ⇒ Boolean
66
67
68
|
# File 'lib/spot_flow/bpmn/task.rb', line 66
def is_automated?
true
end
|
#is_manual? ⇒ Boolean
70
71
72
|
# File 'lib/spot_flow/bpmn/task.rb', line 70
def is_manual?
false
end
|
#run(execution) ⇒ Object
90
91
92
93
94
95
|
# File 'lib/spot_flow/bpmn/task.rb', line 90
def run(execution)
if defined?(task_type)
klass = task_type.constantize
klass.new.call(execution.parent.variables, || {})
end
end
|
#task_retries ⇒ Object
82
83
84
|
# File 'lib/spot_flow/bpmn/task.rb', line 82
def task_retries
extension_elements&.task_definition&.retries
end
|
#task_type ⇒ Object
78
79
80
|
# File 'lib/spot_flow/bpmn/task.rb', line 78
def task_type
extension_elements&.task_definition&.type
end
|