zeebe_bpmn_rspec 0.4.0 → 0.4.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 +5 -0
- data/lib/zeebe_bpmn_rspec/activated_job.rb +5 -1
- data/lib/zeebe_bpmn_rspec/helpers.rb +3 -3
- data/lib/zeebe_bpmn_rspec/version.rb +1 -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: a8ab5c676ef52ca21100add177726c7443298348603c89e8a53e1692b2876e21
|
4
|
+
data.tar.gz: a9a7acca330b1377991b524cb9e31d91ccd7599ef0391ca58aef6700dc7da168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aae2aa7d081b9dd5cc342f955f060b0a605f23c680b3a7b9368857fc08ada31a58fb047cdd41e419d8394127786b29b76486c8feb0ce5aef1925e9ee3f88237d
|
7
|
+
data.tar.gz: 5639b3ee712ea0af3b961e3402d5c606d3b26f55279785d844909030557fa8054c2ab344c62d10afcf020408055c58491eba9dcfc288eef673d37fd5d3eca799
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# zeebe_bpmn_rspec
|
2
2
|
|
3
|
+
## v0.4.1
|
4
|
+
- Allow `with_workflow_instance` to be called without a block.
|
5
|
+
- Allow `worker` to be specified when activating a job.
|
6
|
+
- Expose `workflow_instance_key` for activated jobs.
|
7
|
+
|
3
8
|
## v0.4.0
|
4
9
|
- Add `ttl_ms` option for `publish_message`.
|
5
10
|
- Add `update_retries` method to `ActivatedJob` class.
|
@@ -8,7 +8,7 @@ module ZeebeBpmnRspec
|
|
8
8
|
class ActivatedJob
|
9
9
|
include ::Zeebe::Client::GatewayProtocol # for direct reference of request classes
|
10
10
|
|
11
|
-
attr_reader :job, :type
|
11
|
+
attr_reader :job, :type
|
12
12
|
|
13
13
|
def initialize(job, type:, workflow_instance_key:, client:, context:, validate:) # rubocop:disable Metrics/ParameterLists
|
14
14
|
@job = job
|
@@ -36,6 +36,10 @@ module ZeebeBpmnRspec
|
|
36
36
|
job.key
|
37
37
|
end
|
38
38
|
|
39
|
+
def workflow_instance_key
|
40
|
+
job.workflowInstanceKey
|
41
|
+
end
|
42
|
+
|
39
43
|
def retries
|
40
44
|
job.retries
|
41
45
|
end
|
@@ -26,7 +26,7 @@ module ZeebeBpmnRspec
|
|
26
26
|
variables: variables.to_json
|
27
27
|
))
|
28
28
|
@__workflow_instance_key = workflow.workflowInstanceKey
|
29
|
-
yield(workflow.workflowInstanceKey)
|
29
|
+
yield(workflow.workflowInstanceKey) if block_given?
|
30
30
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
31
31
|
# exceptions are rescued to ensure that instances are cancelled
|
32
32
|
# any error is re-raised below
|
@@ -64,10 +64,10 @@ module ZeebeBpmnRspec
|
|
64
64
|
@__workflow_instance_key
|
65
65
|
end
|
66
66
|
|
67
|
-
def activate_job(type, fetch_variables: nil, validate: true)
|
67
|
+
def activate_job(type, fetch_variables: nil, validate: true, worker: "#{type}-#{SecureRandom.hex}")
|
68
68
|
stream = _zeebe_client.activate_jobs(ActivateJobsRequest.new({
|
69
69
|
type: type,
|
70
|
-
worker:
|
70
|
+
worker: worker,
|
71
71
|
maxJobsToActivate: 1,
|
72
72
|
timeout: 1000,
|
73
73
|
fetchVariable: fetch_variables&.then { |v| Array(v) },
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeebe_bpmn_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ezCater, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|