Class: Temporalio::Workflow::Definition::Info
- Inherits:
-
Object
- Object
- Temporalio::Workflow::Definition::Info
- Defined in:
- lib/temporalio/workflow/definition.rb
Overview
Information about the workflow definition. This is usually not used directly.
Instance Attribute Summary collapse
-
#arg_hints ⇒ Object
readonly
Returns the value of attribute arg_hints.
-
#dynamic ⇒ Object
readonly
Returns the value of attribute dynamic.
-
#dynamic_options_method ⇒ Object
readonly
Returns the value of attribute dynamic_options_method.
-
#failure_exception_types ⇒ Object
readonly
Returns the value of attribute failure_exception_types.
-
#init ⇒ Object
readonly
Returns the value of attribute init.
-
#override_name ⇒ Object
readonly
Returns the value of attribute override_name.
-
#queries ⇒ Object
readonly
Returns the value of attribute queries.
-
#raw_args ⇒ Object
readonly
Returns the value of attribute raw_args.
-
#result_hint ⇒ Object
readonly
Returns the value of attribute result_hint.
-
#signals ⇒ Object
readonly
Returns the value of attribute signals.
-
#updates ⇒ Object
readonly
Returns the value of attribute updates.
-
#versioning_behavior ⇒ Object
readonly
Returns the value of attribute versioning_behavior.
-
#workflow_class ⇒ Object
readonly
Returns the value of attribute workflow_class.
Class Method Summary collapse
-
.from_class(workflow_class) ⇒ Info
Derive the workflow definition info from the class.
Instance Method Summary collapse
-
#initialize(workflow_class:, override_name: nil, dynamic: false, init: false, raw_args: false, failure_exception_types: [], signals: {}, queries: {}, updates: {}, versioning_behavior: VersioningBehavior::UNSPECIFIED, dynamic_options_method: nil, arg_hints: nil, result_hint: nil) ⇒ Info
constructor
Create a definition info.
-
#name ⇒ String
Workflow name.
Constructor Details
#initialize(workflow_class:, override_name: nil, dynamic: false, init: false, raw_args: false, failure_exception_types: [], signals: {}, queries: {}, updates: {}, versioning_behavior: VersioningBehavior::UNSPECIFIED, dynamic_options_method: nil, arg_hints: nil, result_hint: nil) ⇒ Info
Create a definition info. This should usually not be used directly, but instead a class that extends Temporalio::Workflow::Definition should be used.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/temporalio/workflow/definition.rb', line 521 def initialize( workflow_class:, override_name: nil, dynamic: false, init: false, raw_args: false, failure_exception_types: [], signals: {}, queries: {}, updates: {}, versioning_behavior: VersioningBehavior::UNSPECIFIED, dynamic_options_method: nil, arg_hints: nil, result_hint: nil ) @workflow_class = workflow_class @override_name = override_name @dynamic = dynamic @init = init @raw_args = raw_args @failure_exception_types = failure_exception_types.dup.freeze @signals = signals.dup.freeze @queries = queries.dup.freeze @updates = updates.dup.freeze @versioning_behavior = versioning_behavior @dynamic_options_method = @arg_hints = arg_hints @result_hint = result_hint Internal::ProtoUtils.assert_non_reserved_name(name) end |
Instance Attribute Details
#arg_hints ⇒ Object (readonly)
Returns the value of attribute arg_hints.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def arg_hints @arg_hints end |
#dynamic ⇒ Object (readonly)
Returns the value of attribute dynamic.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def dynamic @dynamic end |
#dynamic_options_method ⇒ Object (readonly)
Returns the value of attribute dynamic_options_method.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def @dynamic_options_method end |
#failure_exception_types ⇒ Object (readonly)
Returns the value of attribute failure_exception_types.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def failure_exception_types @failure_exception_types end |
#init ⇒ Object (readonly)
Returns the value of attribute init.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def init @init end |
#override_name ⇒ Object (readonly)
Returns the value of attribute override_name.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def override_name @override_name end |
#queries ⇒ Object (readonly)
Returns the value of attribute queries.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def queries @queries end |
#raw_args ⇒ Object (readonly)
Returns the value of attribute raw_args.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def raw_args @raw_args end |
#result_hint ⇒ Object (readonly)
Returns the value of attribute result_hint.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def result_hint @result_hint end |
#signals ⇒ Object (readonly)
Returns the value of attribute signals.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def signals @signals end |
#updates ⇒ Object (readonly)
Returns the value of attribute updates.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def updates @updates end |
#versioning_behavior ⇒ Object (readonly)
Returns the value of attribute versioning_behavior.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def versioning_behavior @versioning_behavior end |
#workflow_class ⇒ Object (readonly)
Returns the value of attribute workflow_class.
503 504 505 |
# File 'lib/temporalio/workflow/definition.rb', line 503 def workflow_class @workflow_class end |
Class Method Details
.from_class(workflow_class) ⇒ Info
Derive the workflow definition info from the class.
511 512 513 514 515 516 517 |
# File 'lib/temporalio/workflow/definition.rb', line 511 def self.from_class(workflow_class) unless workflow_class.is_a?(Class) && workflow_class < Definition raise "Workflow '#{workflow_class}' must be a class and must extend Temporalio::Workflow::Definition" end workflow_class._workflow_definition end |
Instance Method Details
#name ⇒ String
Returns Workflow name.
553 554 555 |
# File 'lib/temporalio/workflow/definition.rb', line 553 def name dynamic ? nil : (override_name || workflow_class.name.to_s.split('::').last) end |