Class | AWS::SimpleWorkflow::WorkflowExecution |
In: |
lib/aws/simple_workflow/workflow_execution.rb
|
Parent: | Resource |
@attr_reader [Symbol] child_policy The policy to use for the child
workflow executions if this workflow execution is terminated. The return value will be one of the following values: * `:terminate` - the child executions will be terminated. * `:request_cancel` - a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event. * `:abandon` - no action will be taken. The child executions will continue to run.
@attr_reader [String] start_to_close_timeout The total allowed
duration for this workflow execution. The return value will be formatted as an ISO 8601 duration (e.g. 'PnYnMnDTnHnMnS').
@attr_reader [String] task_list The task list used for the decision
tasks generated for this workflow execution.
@attr_reader [String] task_start_to_close_timeout The maximum duration
allowed for decision tasks for this workflow execution. The return value will be formatted as an ISO 8601 duration (e.g. 'PnYnMnDTnHnMnS').
@attr_reader [Time,nil] closed_at The time when the workflow execution
was closed. Returns nil if this execution is not closed.
@attr_reader [Time] started_at The time when the execution was started.
@attr_reader [Time,nil] latest_activity_task_scheduled_at The time
when the last activity task was scheduled for this workflow execution. You can use this information to determine if the workflow has not made progress for an unusually long period of time and might require a corrective action.
@attr_reader [String,nil] latest_execution_context The latest execution
context provided by the decider for this workflow execution. A decider can provide an execution context, which is a free form string, when closing a decision task.
@attr_reader [Hash] open_counts Returns a hash of counts, including:
`:open_timers`, `:open_child_workflow_executions`, `:open_decision_tasks`, and `:open_activity_tasks`.
domain | [R] | @return [Domain] The domain this workflow execution was started in. |
run_id | [R] | @return [String] The run id of this execution. |
workflow_id | [R] | @return [String] The workflow id of this execution. |
Counts the number of executions that share the same workflow id.
@note See {WorkflowExecutionCollection#count} for a broader count.
@note This operation is eventually consistent. The results are best
effort and may not exactly reflect recent updates and changes.
@param [Hash] options
@option options [Symbol] :status (:open) Specifies that
status of the workflow executions to count. Defaults to open workflows. * `:open` * `:closed`
@option options [Array<Time>] :started_between A start and end time
to filter workflow execution start times by. You may pass an array with two time values or a range. Times should be timestamps (integers), Time, Date, DateTime or parseable time strings. You may not pass both `:started_between` and `:closed_between`.
@option options [Array<Time>] :closed_between A start and end time
to filter workflow execution closed times by. You may pass an array with two time values or a range. Times should be timestamps (integers), Time, Date, DateTime or parseable time strings. You may not pass both `:started_between` and `:closed_between`. You may also not pass `:closed_between` if the `:status` is `:open`.
@return [Integer] Returns the count of executions that share
workflow id with the current execution.
@return [HistoryEventCollection] Returns a collection that enumerates
history events for this workflow execution.
Records a WorkflowExecutionCancelRequested event in the currently running workflow execution. This logically requests the cancellation of the workflow execution as a whole. It is up to the decider to take appropriate actions when it receives an execution history with this event.
@note Because this action allows the workflow to properly clean up
and gracefully close, it should be used instead of {#terminate} when possible.
@return [nil]
Records a WorkflowExecutionSignaled event in the workflow execution history and creates a decision task for the workflow execution.
workflow_execution.signal('signal_name', :input => '...')
@param [String] signal_name The name of the signal. This name must be
meaningful to the target workflow.
@param [Hash] options
@option options [String] :input (nil) Data to attach to the
WorkflowExecutionSignaled event in the target workflow execution's history.
@return [nil]
@return [Symbol] Returns the status of this execution. Possible
return values are: * `:open` - The execution is still running. * `:completed` - The execution was successfully completed. * `:canceled` - The execution was canceled, cancellation allows the implementation to gracefully clean up before the execution is closed. * `:failed` - The execution failed to complete. and was automatically timed out. * `:continued_as_new` - The execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow. * `:terminated` - The execution was force terminated. * `:timed_out` - The execution did not complete in the allotted time and was automatically timed out.
Records a WorkflowExecutionTerminated event and forces closure of the workflow execution. The child policy, registered with the workflow type or specified when starting this execution, is applied to any open child workflow executions of this workflow execution.
@note If the workflow execution was in progress, it is terminated
immediately.
@note You should consider canceling the workflow execution
instead because it allows the workflow to gracefully close while terminate does not.
@param [Hash] options
@option options [Symbol] :child_policy (nil)
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the default child policy. Valid policies include: * `:terminate` - the child executions will be terminated. * `:request_cancel` - a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event. * `:abandon` - no action will be taken. The child executions will continue to run.
@option options [String] :details (nil) Optional details for
terminating the workflow execution.
@option options [String] :reason (nil) An optional descriptive
reason for terminating the workflow execution.
@return [nil]