Module: Ntswf::Client
- Includes:
- Base
- Defined in:
- lib/ntswf/client.rb
Overview
Interface for an application that wishes to start a task
Instance Method Summary collapse
-
#find(ids) ⇒ Hash
Get status and details of a workflow execution.
-
#start_execution(options) ⇒ Hash
Enqueue a new SWF task.
Methods included from Base
#activity_name, #activity_task_lists, #activity_type, #configure, #decision_task_list, #default_unit, #domain, #execution_id_prefix, #execution_version, #notify, #on_notify, #parse_input, #separator, #swf, #workflow_name, #workflow_version
Instance Method Details
#find(ids) ⇒ Hash
Get status and details of a workflow execution.
52 53 54 55 |
# File 'lib/ntswf/client.rb', line 52 def find(ids) workflow_execution = domain.workflow_executions.at(ids[:workflow_id], ids[:run_id]) history_details(workflow_execution) end |
#start_execution(options) ⇒ Hash
Enqueue a new SWF task.
The options configure the control flow of the task. Excluding :execution_id they will be stored in the input argument of the task as JSON.
29 30 31 32 33 34 35 |
# File 'lib/ntswf/client.rb', line 29 def start_execution() workflow_execution = start_swf_workflow_execution() execution_details(workflow_execution).merge!( name: [:name].to_s, params: [:params], ) end |