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_list, #activity_task_lists, #activity_type, #configure, #decision_task_list, #decision_task_lists, #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.
65 66 67 68 |
# File 'lib/ntswf/client.rb', line 65 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.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ntswf/client.rb', line 39 def start_execution() workflow_execution = start_swf_workflow_execution() { name: [:name].to_s, params: [:params], status: :open, workflow_id: workflow_execution.workflow_id, run_id: workflow_execution.run_id, } end |