bumbleworks 0.0.62 → 0.0.63
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bumbleworks/process.rb +6 -0
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/lib/bumbleworks/process_spec.rb +18 -0
- metadata +3 -3
data/lib/bumbleworks/process.rb
CHANGED
@@ -65,6 +65,12 @@ module Bumbleworks
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def errors
|
69
|
+
@errors ||= Bumbleworks.dashboard.context.storage.get_many('errors', [wfid]).map { |err|
|
70
|
+
::Ruote::ProcessError.new(err)
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
68
74
|
def leaves
|
69
75
|
@leaves ||= expressions.inject([]) { |a, exp|
|
70
76
|
a.select { |e| ! exp.ancestor?(e.fei) } + [ exp ]
|
data/lib/bumbleworks/version.rb
CHANGED
@@ -66,6 +66,24 @@ describe Bumbleworks::Process do
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
describe '#errors' do
|
70
|
+
it 'returns all process errors' do
|
71
|
+
Bumbleworks.define_process 'error_process' do
|
72
|
+
concurrence do
|
73
|
+
error 'first error'
|
74
|
+
error 'second error'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
bp = Bumbleworks.launch!('error_process')
|
78
|
+
Bumbleworks.dashboard.wait_for('error_intercepted')
|
79
|
+
errors = bp.errors
|
80
|
+
errors.map(&:message).should =~ [
|
81
|
+
'#<Ruote::ForcedError: first error>',
|
82
|
+
'#<Ruote::ForcedError: second error>'
|
83
|
+
]
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
69
87
|
describe '#workitems' do
|
70
88
|
it 'returns array of applied workitems from each leaf' do
|
71
89
|
bp = described_class.new('chumpy')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumbleworks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.63
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -263,7 +263,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
263
263
|
version: '0'
|
264
264
|
segments:
|
265
265
|
- 0
|
266
|
-
hash:
|
266
|
+
hash: 4057710288026265450
|
267
267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
268
|
none: false
|
269
269
|
requirements:
|
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
272
|
version: '0'
|
273
273
|
segments:
|
274
274
|
- 0
|
275
|
-
hash:
|
275
|
+
hash: 4057710288026265450
|
276
276
|
requirements: []
|
277
277
|
rubyforge_project:
|
278
278
|
rubygems_version: 1.8.23
|