lib/dor/services/client/workflow.rb in dor-services-client-1.10.0 vs lib/dor/services/client/workflow.rb in dor-services-client-1.11.0
- old
+ new
@@ -3,10 +3,13 @@
module Dor
module Services
class Client
# API calls that are about workflow
class Workflow < VersionedService
+ extend Deprecation
+ self.deprecation_horizon = 'dor-service-client version 2.0'
+
# @param object_identifier [String] the pid for the object
def initialize(connection:, version:, object_identifier:)
super(connection: connection, version: version)
@object_identifier = object_identifier
end
@@ -19,9 +22,10 @@
resp = connection.post do |req|
req.url "#{api_version}/objects/#{object_identifier}/apo_workflows/#{wf_name}"
end
raise UnexpectedResponse, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success?
end
+ deprecation_deprecate create: 'Create will be removed. Use dor-workflow-service instead'
private
attr_reader :object_identifier
end