ntswf 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ntswf/client.rb +18 -12
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b94dd85c91a78393e293fa176be9674980187b51
4
- data.tar.gz: 4f407882fd4ee6012387c2bf713c5d459d4a7297
3
+ metadata.gz: e76f1bb295ab949307ec10635edd173860a203ce
4
+ data.tar.gz: 622559c42321d9b560df16f4739bbbabf4d600a8
5
5
  SHA512:
6
- metadata.gz: 0446211447dcb9abedf39d2a6c735198dc42ac9ce725fd73a46fb8d42e457c8c1cb3776c0a9b70d11ac45d5313ec23390603f8a700c1cf7a5f1c7ceee379147c
7
- data.tar.gz: 20daeb27cd1e00e6afa5201e603650a193a8bd3dda39073005441601d7d0a1e22fcd0f5528589f1b6d507d49a2d74f654f00fd233331041ef984b83b6384fe4f
6
+ metadata.gz: 679c86ad4a385e8998d4e7cfb9977daf87d5e0d6bc2c49187f766c3a3755b3dddf834dcb2918b400362827d50d77926b65f6baaa4eebd8db58b344fb7937a962
7
+ data.tar.gz: 9a8dbf9d473f27a162a90d3f8930a6bd512609ce8cc8bb703951df1bec9796af4b9d35efcadae84d1bc0cf2f763099980af2467d1c3615aa948a2ffb13b1dae1
data/lib/ntswf/client.rb CHANGED
@@ -24,14 +24,23 @@ module Ntswf
24
24
  # The executing unit's key, a corresponding activity task list must be configured
25
25
  # @option options [Numeric] :version
26
26
  # Optional minimum version of the client. The task may be rescheduled by older clients.
27
- # @return (see #find)
27
+ # @return [Hash]
28
+ # Execution properties.
29
+ # :name:: Given task kind
30
+ # :params:: Custom params from JSON
31
+ # :run_id:: The workflow execution's run ID
32
+ # :status:: Always :open. The actual state can be fetched using #find
33
+ # :workflow_id:: The workflow execution's workflow ID
28
34
  # @raise [Errors::AlreadyStarted]
29
35
  def start_execution(options)
30
36
  workflow_execution = start_swf_workflow_execution(options)
31
- execution_details(workflow_execution).merge!(
37
+ {
32
38
  name: options[:name].to_s,
33
39
  params: options[:params],
34
- )
40
+ status: :open,
41
+ workflow_id: workflow_execution.workflow_id,
42
+ run_id: workflow_execution.run_id,
43
+ }
35
44
  end
36
45
 
37
46
  # Get status and details of a workflow execution.
@@ -73,18 +82,15 @@ module Ntswf
73
82
  [prefix, suffix].join(separator)
74
83
  end
75
84
 
76
- def execution_details(workflow_execution)
77
- {
85
+ def history_details(workflow_execution)
86
+ input = parse_input workflow_execution.history_events.first.attributes.input
87
+ result = {
88
+ status: workflow_execution.status,
78
89
  workflow_id: workflow_execution.workflow_id,
79
90
  run_id: workflow_execution.run_id,
80
- status: workflow_execution.status,
91
+ name: input["name"].to_s,
92
+ params: input["params"],
81
93
  }
82
- end
83
-
84
- def history_details(workflow_execution)
85
- result = execution_details(workflow_execution)
86
- input = parse_input workflow_execution.history_events.first.attributes.input
87
- result.merge!(name: input["name"].to_s, params: input["params"])
88
94
 
89
95
  case result[:status]
90
96
  when :open
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ntswf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infopark AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-26 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1