dor-services-client 15.15.2 → 15.16.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client/workflows.rb +13 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab50c5a851df383096d632a859cbac9a0afcdbbb54f95910ab31a266b044e6f4
|
4
|
+
data.tar.gz: 233523b1995ef21dadb3aba64708bc1b8512650c18b33a1500602340a73a0638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ebf90e472f4a6548df3a8282a9a95de3c4177508cab234b31cbf8c66eed9c9af9d2ccc889e6e12a743f8bb92a14d3f4ddf68d43cee24645b65e08fb46b7494
|
7
|
+
data.tar.gz: e5e4a931b65ecd85a4421f9df55b96a2511ba620088642462c455dcae872d9ba427d4e03f9016ad10d52936aad1efce7c32ac73187b4ed8594c02c0d064bb079
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -178,6 +178,8 @@ Dor::Services::Client.administrative_tags.search(q: 'Project')
|
|
178
178
|
|
179
179
|
# Get a list of workflow templates
|
180
180
|
Dor::Services::Client.workflows.templates
|
181
|
+
# Show a workflow template (e.g., to view its list of steps)
|
182
|
+
Dor::Services::Client.workflows.template('accessionWF')
|
181
183
|
```
|
182
184
|
|
183
185
|
## Asynchronous results
|
@@ -8,9 +8,20 @@ module Dor
|
|
8
8
|
# Retrieves a list of workflow template name
|
9
9
|
# @return [Array<String>] the list of templates
|
10
10
|
def templates
|
11
|
-
resp = connection.
|
11
|
+
resp = connection.get do |req|
|
12
12
|
req.url "#{api_version}/workflow_templates"
|
13
|
-
req.headers['
|
13
|
+
req.headers['Accept'] = 'application/json'
|
14
|
+
end
|
15
|
+
raise_exception_based_on_response!(resp) unless resp.success?
|
16
|
+
|
17
|
+
JSON.parse(resp.body)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Retrieves a workflow template given a workflow name
|
21
|
+
# @return [Hash] the set of processes within a template
|
22
|
+
def template(workflow_name)
|
23
|
+
resp = connection.get do |req|
|
24
|
+
req.url "#{api_version}/workflow_templates/#{workflow_name}"
|
14
25
|
req.headers['Accept'] = 'application/json'
|
15
26
|
end
|
16
27
|
raise_exception_based_on_response!(resp) unless resp.success?
|