class AWS::SimpleWorkflow::WorkflowExecution


and ‘:open_activity_tasks`.
`:open_timers`, `:open_child_workflow_executions`, `:open_decision_tasks`,
@attr_reader [Hash] open_counts Returns a hash of counts, including:
closing a decision task.
can provide an execution context, which is a free form string, when
context provided by the decider for this workflow execution. A decider
@attr_reader [String,nil] latest_execution_context The latest execution
require a corrective action.
made progress for an unusually long period of time and might
You can use this information to determine if the workflow has not
when the last activity task was scheduled for this workflow execution.
@attr_reader [Time,nil] latest_activity_task_scheduled_at The time
@attr_reader [Time] started_at The time when the execution was started.
was closed. Returns nil if this execution is not closed.
@attr_reader [Time,nil] closed_at The time when the workflow execution
’PnYnMnDTnHnMnS’).
The return value will be formatted as an ISO 8601 duration (e.g.
allowed for decision tasks for this workflow execution.
@attr_reader [String] task_start_to_close_timeout The maximum duration
tasks generated for this workflow execution.
@attr_reader [String] task_list The task list used for the decision
’PnYnMnDTnHnMnS’).
The return value will be formatted as an ISO 8601 duration (e.g.
duration for this workflow execution.
@attr_reader [String] start_to_close_timeout The total allowed
continue to run.
* ‘:abandon` - no action will be taken. The child executions will
actions when it receives an execution history with this event.
event in its history. It is up to the decider to take appropriate
child execution by recording a WorkflowExecutionCancelRequested
* `:request_cancel` - a request to cancel will be attempted for each
* `:terminate` - the child executions will be terminated.
The return value will be one of the following values:
workflow executions if this workflow execution is terminated.
@attr_reader [Symbol] child_policy The policy to use for the child

def cancel_requested?

Returns:
  • (Boolean) - Returns true if a request was made to cancel
def cancel_requested?
  cancel_requested
end

def closed?

Returns:
  • (Boolean) - Returns true if the workflow execution is closed.
def closed?
  !open?
end

def count_executions options = {}

Returns:
  • (Integer) - Returns the count of executions that share

Options Hash: (**options)
  • :closed_between (Array) -- A start and end time
  • :started_between (Array) -- A start and end time
  • :status (Symbol) -- Specifies that

Parameters:
  • options (Hash) --

Other tags:
    Note: - This operation is eventually consistent. The results are best
    Note: - See {WorkflowExecutionCollection#count} for a broader count.
def count_executions options = {}
  options[:workflow_id] = workflow_id
  domain.workflow_executions.count(options)
end

def history_events

Returns:
  • (HistoryEventCollection) - Returns a collection that enumerates
def history_events
  HistoryEventCollection.new(self)
end

def initialize domain, workflow_id, run_id, options = {}

def initialize domain, workflow_id, run_id, options = {}
  @domain = domain
  @workflow_id = workflow_id
  @run_id = run_id
  super
end

def open?

Returns:
  • (Boolean) - Returns true if the workflow execution is still open.
def open?
  status == :open
end

def open_activity_task_count

Returns:
  • (Integer) - Returns the number of open activity tasks.
def open_activity_task_count
  open_counts[:open_activity_tasks]
end

def open_child_workflow_execution_count

Returns:
  • (Boolean) - Returns true if this workflow execution has an
def open_child_workflow_execution_count
  open_counts[:open_child_workflow_executions]
end

def open_decision_task_count

Returns:
  • (Integer) - Returns the number of closed activity tasks.
def open_decision_task_count
  open_counts[:open_decision_tasks]
end

def open_timer_count

Returns:
  • (Integer) - Returns the number of open timers.
def open_timer_count
  open_counts[:open_timers]
end

def parent

Returns:
  • (WorkflowExecution, nil) - Returns the parent workflow execution
def parent
  if parent = self.parent_details
    domain.workflow_executions[parent['workflowId'],parent['runId']]
  else
    nil
  end
end

def request_cancel

Returns:
  • (nil) -

Other tags:
    Note: - Because this action allows the workflow to properly clean up
def request_cancel
  options = { :run_id => run_id }
  domain.workflow_executions.request_cancel(workflow_id, options)
end

def resource_identifiers

def resource_identifiers
  [[:domain,domain.name], [:workflow_id,workflow_id], [:run_id,run_id]]
end

def resource_options

def resource_options
  {
    :domain => domain.name,
    :execution => { :workflow_id => workflow_id, :run_id => run_id },
  }
end

def signal signal_name, options = {}

Returns:
  • (nil) -

Options Hash: (**options)
  • :input (String) -- Data to attach to the

Parameters:
  • options (Hash) --
  • signal_name (String) -- The name of the signal. This name must be
def signal signal_name, options = {}
  options[:run_id] = run_id
  domain.workflow_executions.signal(workflow_id, signal_name, options)
end

def status

Returns:
  • (Symbol) - Returns the status of this execution. Possible
def status
  AWS.memoize do
    execution_status == :open ? :open : (close_status || :closed)
  end
end

def tags

Returns:
  • (Array) - Returns an array of tags assigned to this
def tags
  tag_list || []
end

def terminate options = {}

Returns:
  • (nil) -

Options Hash: (**options)
  • :reason (String) -- An optional descriptive
  • :details (String) -- Optional details for
  • :child_policy (Symbol) --

Parameters:
  • options (Hash) --

Other tags:
    Note: - You should consider canceling the workflow execution
    Note: - If the workflow execution was in progress, it is terminated
def terminate options = {}
  options[:run_id] = run_id
  domain.workflow_executions.terminate(workflow_id, options)
end

def workflow_type

Returns:
  • (WorkflowType) - Returns the type of this workflow execution.
def workflow_type
  type = self.type_details
  WorkflowType.new(domain, type['name'], type['version'])
end