Sha256: 919bad12cd335c0661fff61b6194703eda767d808248e49ae47377249b8e7dc6
Contents?: true
Size: 694 Bytes
Versions: 1
Compression:
Stored size: 694 Bytes
Contents
# frozen_string_literal: true module Dor module Services class Client # API calls that are about workflow class Workflow < VersionedService # Begin a new workflow # @param object [String] the pid for the object # @param wf_name [String] the name of the workflow # @raises [Error] if the request is unsuccessful. # @return nil def create(object:, wf_name:) resp = connection.post do |req| req.url "#{version}/objects/#{object}/apo_workflows/#{wf_name}" end raise Error, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success? end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dor-services-client-0.4.0 | lib/dor/services/client/workflow.rb |