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 +4 -4
- data/CHANGELOG.md +7 -2
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/lib/camunda/version.rb +1 -1
- data/lib/camunda/zeebe/process_instances.rb +15 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb175b8823fdf56ecd8ab3e1a2cb346aab61bf0919bd3eae25918ec08fd9b51e
|
4
|
+
data.tar.gz: 7a3ae8f23fb5381dda60e60266ef475766a5ecc1910c052536c5525fd69dd711
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
3
|
+
## [0.2.1] - 2022-08-30
|
4
4
|
|
5
|
-
-
|
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
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(
|
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
|
data/lib/camunda/version.rb
CHANGED
@@ -3,10 +3,24 @@
|
|
3
3
|
module Camunda
|
4
4
|
module Zeebe
|
5
5
|
class ProcessInstances < API
|
6
|
-
def self.create(
|
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
|
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-
|
11
|
+
date: 2022-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|