Class: Cadence::Workflow::Serializer::StartChildWorkflow

Inherits:
Base
  • Object
show all
Defined in:
lib/cadence/workflow/serializer/start_child_workflow.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Cadence::Workflow::Serializer::Base

Instance Method Details

#to_thriftObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/cadence/workflow/serializer/start_child_workflow.rb', line 8

def to_thrift
  CadenceThrift::Decision.new(
    decisionType: CadenceThrift::DecisionType::StartChildWorkflowExecution,
    startChildWorkflowExecutionDecisionAttributes:
      CadenceThrift::StartChildWorkflowExecutionDecisionAttributes.new(
        domain: object.domain,
        workflowId: object.workflow_id.to_s,
        workflowType: CadenceThrift::WorkflowType.new(name: object.workflow_type),
        taskList: CadenceThrift::TaskList.new(name: object.task_list),
        input: JSON.serialize(object.input),
        executionStartToCloseTimeoutSeconds: object.timeouts[:execution],
        taskStartToCloseTimeoutSeconds: object.timeouts[:task],
        retryPolicy: serialize_retry_policy(object.retry_policy),
        header: serialize_headers(object.headers)
      )
  )
end