Class: Dor::Services::Client::Workflow
- Inherits:
-
VersionedService
- Object
- VersionedService
- Dor::Services::Client::Workflow
- Defined in:
- lib/dor/services/client/workflow.rb
Overview
API calls that are about workflow
Instance Method Summary collapse
-
#create(object:, wf_name:) ⇒ Object
Begin a new workflow.
Methods inherited from VersionedService
Constructor Details
This class inherits a constructor from Dor::Services::Client::VersionedService
Instance Method Details
#create(object:, wf_name:) ⇒ Object
Begin a new workflow
13 14 15 16 17 18 |
# File 'lib/dor/services/client/workflow.rb', line 13 def create(object:, wf_name:) resp = connection.post do |req| req.url "#{api_version}/objects/#{object}/apo_workflows/#{wf_name}" end raise UnexpectedResponse, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success? end |