camundapi 0.1.5 → 0.2.1

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: d67be7eac7a340b836de1b18fc330cf5a3571cb5aea64cb4f3e8ba3debe4600d
4
- data.tar.gz: 5fc738ba1694020187ff91e141f617a9f6f8e66cd13053383ee3051330b56f4a
3
+ metadata.gz: fb175b8823fdf56ecd8ab3e1a2cb346aab61bf0919bd3eae25918ec08fd9b51e
4
+ data.tar.gz: 7a3ae8f23fb5381dda60e60266ef475766a5ecc1910c052536c5525fd69dd711
5
5
  SHA512:
6
- metadata.gz: d3958d4885586cb5f754abf866ac55ebed79a60381be158a122b4529fd18d2c28a3bca242f45cb1e447f65d7886401e17d7c6310fa9d1b3e05005397485c499c
7
- data.tar.gz: 6ed0efee18895f5be9c84290a059115572d9b35bf7d22f6a77881eca903659254cab6f7cdc47b9d1a275c6723aa9e69c1548090d04e1dfb44129753a9dbb42d1
6
+ metadata.gz: 19f28ee07a103a927412e35627b11efef8ec071f46a489c50aa2f9d9d9b1f7403559b500ebe228e196b9769f4c8b209ae3e74e60ecc7b4a0d7ff4167daaf7689
7
+ data.tar.gz: dd9513abedde858f18b15048e6f3c01d143ad208de82861e35daff3f716b5ce9f678bfe659d12fefc53f428c92bf16cb570c6f91f499c5b71a7eec71aa39850d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2022-08-25
3
+ ## [0.2.1] - 2022-08-30
4
4
 
5
- - Initial release
5
+ - Breaking change in `Zeebe::ProcessInstances.create`. It now takes 3 (2 optional) arguments. Instead of one params variable
6
+ - Add `Zeebe::ProcessInstances.update_variables`.
7
+
8
+ ## [0.1.4] - 2022-08-25
9
+
10
+ - Initial public release of the gem, with several endpoints for the different APIs added.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- camundapi (0.1.5)
4
+ camundapi (0.2.1)
5
5
  json
6
6
  net-sftp
7
7
  rest-client (~> 2.0)
data/README.md CHANGED
@@ -52,7 +52,9 @@ Implements the API endpoints you can find [here](https://docs.camunda.io/docs/ap
52
52
  This part is a work in progress but the foundations are here to add other classes/methods. It follows the same approach as how we've implemented the Operate API - that is that every entity gets its own class. Use as follows:
53
53
 
54
54
  ```ruby
55
- Camunda::Zeebe::ProcessInstances.create({bpmnProcessId: 'id-of-a-process', version: -1})
55
+ Camunda::Zeebe::ProcessInstances.create(process_id: 'id-of-a-process')
56
+ Camunda::Zeebe::ProcessInstances.create(process_id: 'id-of-a-process', variables: {'operational': true})
57
+ Camunda::Zeebe::ProcessInstances.create(process_id: 'id-of-a-process', variables: {'operational': true}, version: '5')
56
58
  ```
57
59
 
58
60
  ### Console API
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Camunda
4
- VERSION = '0.1.5'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -3,10 +3,24 @@
3
3
  module Camunda
4
4
  module Zeebe
5
5
  class ProcessInstances < API
6
- def self.create(params)
6
+ def self.create(process_id:, variables: {}, version: -1)
7
+ params = {
8
+ bpmnProcessId: process_id,
9
+ variables: variables.to_json,
10
+ version: version
11
+ }
7
12
  run(:create_process_instance,
8
13
  ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceRequest.new(params))
9
14
  end
15
+
16
+ def self.update_variables(instance_id:, variables:)
17
+ params = {
18
+ elementInstanceKey: instance_id,
19
+ variables: variables.to_json
20
+ }
21
+ run(:set_variables,
22
+ ::Zeebe::Client::GatewayProtocol::SetVariablesRequest.new(params))
23
+ end
10
24
  end
11
25
  end
12
26
  end
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.1.5
4
+ version: 0.2.1
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-26 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json