Module: Temporal::Activity::WorkflowConvenienceMethods
- Included in:
- Temporal::Activity
- Defined in:
- lib/temporal/activity/workflow_convenience_methods.rb
Instance Method Summary collapse
- #execute(*input, **args) ⇒ Object
- #execute!(*input, **args) ⇒ Object
- #execute_locally(*input, **args) ⇒ Object
Instance Method Details
#execute(*input, **args) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/temporal/activity/workflow_convenience_methods.rb', line 19 def execute(*input, **args) context = Temporal::ThreadLocalContext.get raise 'Called Activity#execute outside of a Workflow context' unless context context.execute_activity(self, *input, **args) end |
#execute!(*input, **args) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/temporal/activity/workflow_convenience_methods.rb', line 26 def execute!(*input, **args) context = Temporal::ThreadLocalContext.get raise 'Called Activity#execute! outside of a Workflow context' unless context context.execute_activity!(self, *input, **args) end |
#execute_locally(*input, **args) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/temporal/activity/workflow_convenience_methods.rb', line 33 def execute_locally(*input, **args) context = Temporal::ThreadLocalContext.get raise 'Called Activity#execute_locally outside of a Workflow context' unless context context.execute_local_activity(self, *input, **args) end |