camundapi 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb175b8823fdf56ecd8ab3e1a2cb346aab61bf0919bd3eae25918ec08fd9b51e
4
- data.tar.gz: 7a3ae8f23fb5381dda60e60266ef475766a5ecc1910c052536c5525fd69dd711
3
+ metadata.gz: ce0cf37d91eec603cb9216880295149771497066ac77871a734a59716546ee49
4
+ data.tar.gz: 022cb7c04439b91d2fcdf6ee35035ff97e855f08929582c0a9cac48ebc4ee223
5
5
  SHA512:
6
- metadata.gz: 19f28ee07a103a927412e35627b11efef8ec071f46a489c50aa2f9d9d9b1f7403559b500ebe228e196b9769f4c8b209ae3e74e60ecc7b4a0d7ff4167daaf7689
7
- data.tar.gz: dd9513abedde858f18b15048e6f3c01d143ad208de82861e35daff3f716b5ce9f678bfe659d12fefc53f428c92bf16cb570c6f91f499c5b71a7eec71aa39850d
6
+ metadata.gz: 679049daecee8de3048185a48e9740a038b42e0aab3f2e9b86648fd0b7c369bf88ba323ca20a42a75defbc26bde6e0fece53b1b281ec09ed83cf253042baea40
7
+ data.tar.gz: 1317daf88a5fe6718b3164f316bd5e6a850a119aadc922178547372c4844d6a5fa0a7394ea0cb10d9ae92c8ec2801a2f98bbd47626f916435cd5d7df561abe69
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.2] - 2022-09-12
4
+
5
+ - Add `Zeebe::Jobs.add_error` so an error can be added to a job.
6
+
3
7
  ## [0.2.1] - 2022-08-30
4
8
 
5
9
  - Breaking change in `Zeebe::ProcessInstances.create`. It now takes 3 (2 optional) arguments. Instead of one params variable
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- camundapi (0.2.1)
4
+ camundapi (0.2.2)
5
5
  json
6
6
  net-sftp
7
7
  rest-client (~> 2.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Camunda
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Camunda
4
+ module Zeebe
5
+ class Jobs < API
6
+ def self.add_error(job_id:, error_code:, error_message: nil)
7
+ params = {
8
+ jobKey: job_id,
9
+ errorCode: error_code
10
+ }
11
+ params[:errorMessage] = error_message if error_message.present?
12
+ run(:throw_error, ::Zeebe::Client::GatewayProtocol::ThrowErrorRequest.new(params))
13
+ end
14
+ end
15
+ end
16
+ end
@@ -9,8 +9,7 @@ module Camunda
9
9
  variables: variables.to_json,
10
10
  version: version
11
11
  }
12
- run(:create_process_instance,
13
- ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceRequest.new(params))
12
+ run(:create_process_instance, ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceRequest.new(params))
14
13
  end
15
14
 
16
15
  def self.update_variables(instance_id:, variables:)
@@ -18,8 +17,7 @@ module Camunda
18
17
  elementInstanceKey: instance_id,
19
18
  variables: variables.to_json
20
19
  }
21
- run(:set_variables,
22
- ::Zeebe::Client::GatewayProtocol::SetVariablesRequest.new(params))
20
+ run(:set_variables, ::Zeebe::Client::GatewayProtocol::SetVariablesRequest.new(params))
23
21
  end
24
22
  end
25
23
  end
data/lib/camunda/zeebe.rb CHANGED
@@ -3,3 +3,4 @@
3
3
  require_relative 'zeebe/o_auth_token'
4
4
  require_relative 'zeebe/api'
5
5
  require_relative 'zeebe/process_instances'
6
+ require_relative 'zeebe/jobs'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camundapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lien Van Den Steen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-30 00:00:00.000000000 Z
11
+ date: 2022-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -109,6 +109,7 @@ files:
109
109
  - lib/camunda/version.rb
110
110
  - lib/camunda/zeebe.rb
111
111
  - lib/camunda/zeebe/api.rb
112
+ - lib/camunda/zeebe/jobs.rb
112
113
  - lib/camunda/zeebe/o_auth_token.rb
113
114
  - lib/camunda/zeebe/process_instances.rb
114
115
  - lib/camundapi.rb