bpmn 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bpmn/definitions.rb +12 -3
- data/lib/bpmn/element.rb +9 -0
- data/lib/bpmn/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a046c1218ce9c15616093bc03bbfe92265bb2085ff5de5b6f0d31679cc88699e
|
|
4
|
+
data.tar.gz: 0ad7f6264f13449e0b8719e1dcdeb412d3c5469203a2bf2983726732b31e4de9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e77550c719292dc06ce05aa43c7d6ba369fc4e791bbbf7f7bcf92aed03e3ae611167ef84f78167e83d6c8674c172fbb13433d58d621fc56c7e6e650481e98ceb
|
|
7
|
+
data.tar.gz: 85d1079720076816e8b158d807dd7b4e4f5c84de1e92199e61ebfb9598c8cd4630496a84c48095b5a8192bbc92d9495f84a3447a71a74779ee09127b4d72a287
|
data/lib/bpmn/definitions.rb
CHANGED
|
@@ -4,8 +4,12 @@ module BPMN
|
|
|
4
4
|
class Definitions
|
|
5
5
|
include ActiveModel::Model
|
|
6
6
|
|
|
7
|
+
MODEL_ATTRIBUTES = %i[
|
|
8
|
+
id name target_namespace exporter exporter_version execution_platform execution_platform_version
|
|
9
|
+
].freeze
|
|
10
|
+
|
|
7
11
|
attr_accessor :id, :name, :target_namespace, :exporter, :exporter_version, :execution_platform, :execution_platform_version
|
|
8
|
-
attr_reader :messages, :signals, :errors, :escalations, :processes
|
|
12
|
+
attr_reader :messages, :signals, :errors, :escalations, :item_definitions, :processes
|
|
9
13
|
|
|
10
14
|
def self.from_xml(xml)
|
|
11
15
|
XmlHasher.configure do |config|
|
|
@@ -22,12 +26,13 @@ module BPMN
|
|
|
22
26
|
end
|
|
23
27
|
|
|
24
28
|
def initialize(attributes={})
|
|
25
|
-
super(attributes.
|
|
29
|
+
super(attributes.slice(*MODEL_ATTRIBUTES))
|
|
26
30
|
|
|
27
31
|
@messages = Array.wrap(attributes[:message]).map { |atts| Message.new(atts) }
|
|
28
32
|
@signals = Array.wrap(attributes[:signal]).map { |atts| Signal.new(atts) }
|
|
29
33
|
@errors = Array.wrap(attributes[:error]).map { |atts| Error.new(atts) }
|
|
30
34
|
@escalations = Array.wrap(attributes[:escalation]).map { |atts| Escalation.new(atts) }
|
|
35
|
+
@item_definitions = Array.wrap(attributes[:item_definition]).map { |atts| ItemDefinition.new(atts) }
|
|
31
36
|
@processes = Array.wrap(attributes[:process]).map { |atts| Process.new(atts) }
|
|
32
37
|
end
|
|
33
38
|
|
|
@@ -51,8 +56,12 @@ module BPMN
|
|
|
51
56
|
processes.find { |process| process.id == id }
|
|
52
57
|
end
|
|
53
58
|
|
|
59
|
+
def item_definition_by_id(id)
|
|
60
|
+
item_definitions.find { |item| item.id == id }
|
|
61
|
+
end
|
|
62
|
+
|
|
54
63
|
def inspect
|
|
55
|
-
"#<BPMN::Definitions @id=#{id.inspect} @name=#{name.inspect} @messages=#{messages.inspect} @signals=#{signals.inspect} @errors=#{errors.inspect} @escalations=#{escalations.inspect} @processes=#{processes.inspect}>"
|
|
64
|
+
"#<BPMN::Definitions @id=#{id.inspect} @name=#{name.inspect} @messages=#{messages.inspect} @signals=#{signals.inspect} @errors=#{errors.inspect} @escalations=#{escalations.inspect} @item_definitions=#{item_definitions.inspect} @processes=#{processes.inspect}>"
|
|
56
65
|
end
|
|
57
66
|
end
|
|
58
67
|
end
|
data/lib/bpmn/element.rb
CHANGED
|
@@ -29,6 +29,15 @@ module BPMN
|
|
|
29
29
|
class Escalation < Element
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
class ItemDefinition < Element
|
|
33
|
+
attr_accessor :structure_ref
|
|
34
|
+
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
super(attributes)
|
|
37
|
+
@structure_ref = attributes[:structure_ref]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
32
41
|
class Collaboration < Element
|
|
33
42
|
end
|
|
34
43
|
|
data/lib/bpmn/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bpmn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Connected Bits
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: dmn
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.5.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.5.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: activemodel
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
238
238
|
- !ruby/object:Gem::Version
|
|
239
239
|
version: '0'
|
|
240
240
|
requirements: []
|
|
241
|
-
rubygems_version: 3.6.
|
|
241
|
+
rubygems_version: 3.6.9
|
|
242
242
|
specification_version: 4
|
|
243
243
|
summary: A BPMN workflow engine in Ruby
|
|
244
244
|
test_files: []
|