ntswf 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ntswf/client.rb +18 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e76f1bb295ab949307ec10635edd173860a203ce
|
4
|
+
data.tar.gz: 622559c42321d9b560df16f4739bbbabf4d600a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
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
|
-
|
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.
|
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-
|
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
|