Class: BPMN::ServiceTask
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
Constructor Details
This class inherits a constructor from BPMN::Activity
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
63
64
65
|
# File 'lib/bpmn/task.rb', line 63
def service
@service
end
|
Instance Method Details
#execute(execution) ⇒ Object
73
74
75
|
# File 'lib/bpmn/task.rb', line 73
def execute(execution)
execution.wait
end
|
85
86
87
|
# File 'lib/bpmn/task.rb', line 85
def
extension_elements&.&.
end
|
#is_automated? ⇒ Boolean
65
66
67
|
# File 'lib/bpmn/task.rb', line 65
def is_automated?
true
end
|
#is_manual? ⇒ Boolean
69
70
71
|
# File 'lib/bpmn/task.rb', line 69
def is_manual?
false
end
|
#run(execution) ⇒ Object
89
90
91
92
93
94
|
# File 'lib/bpmn/task.rb', line 89
def run(execution)
if defined?(task_type)
klass = task_type.constantize
klass.new.call(execution.parent.variables, || {})
end
end
|
#task_retries ⇒ Object
81
82
83
|
# File 'lib/bpmn/task.rb', line 81
def task_retries
extension_elements&.task_definition&.retries
end
|
#task_type ⇒ Object
77
78
79
|
# File 'lib/bpmn/task.rb', line 77
def task_type
extension_elements&.task_definition&.type
end
|