bpm_manager 0.10.9 → 0.11.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/bpm_manager/red_hat.rb +20 -20
- data/lib/bpm_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfc7b76cfb8d6ee4c28fb91dd6b4b9e2b0d3a2df
|
4
|
+
data.tar.gz: 5ae2d40c2ba43d0c2f0676e9ebb93713eddbd4d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f56f5f58d4c6f650b631465d3e5875e14097a819a9ab7afba8ca9c2c702285067af036bc2980d7b003bc6a85061f5373cd182f0a46f9c9f396e4b236666e2ab4
|
7
|
+
data.tar.gz: fca596b7c2fba721a7ded2cb8e9c60b58f61cc4038cff3a227dfd97b00a55fdcc1475832d130740c7a2012aa3774781c6df2549f8d66cbf6b8b34785045cd79b
|
data/lib/bpm_manager/red_hat.rb
CHANGED
@@ -6,7 +6,7 @@ module BpmManager
|
|
6
6
|
module RedHat
|
7
7
|
# Gets all server deployments
|
8
8
|
def self.deployments()
|
9
|
-
return JSON.parse(
|
9
|
+
return JSON.parse(BpmManager.server['/deployment'].get)
|
10
10
|
end
|
11
11
|
|
12
12
|
# Creates a new Process
|
@@ -21,14 +21,14 @@ module BpmManager
|
|
21
21
|
|
22
22
|
# Gets a Process Instance
|
23
23
|
def self.process_instance(process_instance_id)
|
24
|
-
JSON.parse(
|
24
|
+
JSON.parse(BpmManager.server['/history/instance/' + process_instance_id.to_s].get)
|
25
25
|
end
|
26
26
|
|
27
27
|
# Gets a Process Instance Variables
|
28
28
|
def self.process_instance_variables(process_instance_id)
|
29
29
|
begin
|
30
30
|
result = Hash.new
|
31
|
-
JSON.parse(
|
31
|
+
JSON.parse(BpmManager.server['/history/instance/' + process_instance_id.to_s + '/variable'].get)['historyLogList'].each{|e| result[e['variable-instance-log']['variable-id']] = e['variable-instance-log']['value']}
|
32
32
|
|
33
33
|
return result
|
34
34
|
rescue
|
@@ -38,88 +38,88 @@ module BpmManager
|
|
38
38
|
|
39
39
|
# Gets all tasks, optionally you could specify an user id
|
40
40
|
def self.tasks(user_id = "")
|
41
|
-
self.structure_task_data(JSON.parse(
|
41
|
+
self.structure_task_data(JSON.parse(BpmManager.server['/task/query' + (user_id.empty? ? '' : '?taskOwner=' + user_id)].get))
|
42
42
|
end
|
43
43
|
|
44
44
|
# Gets all tasks with options
|
45
45
|
def self.tasks_with_opts(opts = {})
|
46
|
-
self.structure_task_data(JSON.parse(
|
46
|
+
self.structure_task_data(JSON.parse(BpmManager.server['/task/query'].get(opts)))
|
47
47
|
end
|
48
48
|
|
49
49
|
# Assigns a Task for an User
|
50
50
|
def self.assign_task(task_id, user_id)
|
51
|
-
|
51
|
+
BpmManager.server['/task/' + task_id.to_s + '/delegate'].post(:targetEntityId => user_id.to_s)
|
52
52
|
end
|
53
53
|
|
54
54
|
# Gets all the information for a Task ID
|
55
55
|
def self.task_query(task_id)
|
56
|
-
JSON.parse(
|
56
|
+
JSON.parse(BpmManager.server['/task/' + task_id.to_s].get)
|
57
57
|
end
|
58
58
|
|
59
59
|
# Starts a Task
|
60
60
|
def self.start_task(task_id)
|
61
|
-
|
61
|
+
BpmManager.server['/task/' + task_id.to_s + '/start'].post
|
62
62
|
end
|
63
63
|
|
64
64
|
# Releases a Task
|
65
65
|
def self.release_task(task_id)
|
66
|
-
|
66
|
+
BpmManager.server['/task/' + task_id.to_s + '/release'].post
|
67
67
|
end
|
68
68
|
|
69
69
|
# Stops a Task
|
70
70
|
def self.stop_task(task_id)
|
71
|
-
|
71
|
+
BpmManager.server['/task/' + task_id.to_s + '/stop'].post
|
72
72
|
end
|
73
73
|
|
74
74
|
# Suspends a Task
|
75
75
|
def self.suspend_task(task_id)
|
76
|
-
|
76
|
+
BpmManager.server['/task/' + task_id.to_s + '/suspend'].post
|
77
77
|
end
|
78
78
|
|
79
79
|
# Resumes a Task
|
80
80
|
def self.resume_task(task_id)
|
81
|
-
|
81
|
+
BpmManager.server['/task/' + task_id.to_s + '/resumes'].post
|
82
82
|
end
|
83
83
|
|
84
84
|
# Skips a Task
|
85
85
|
def self.skip_task(task_id)
|
86
|
-
|
86
|
+
BpmManager.server['/task/' + task_id.to_s + '/skip'].post
|
87
87
|
end
|
88
88
|
|
89
89
|
# Completes a Task
|
90
90
|
def self.complete_task(task_id, opts = {})
|
91
|
-
|
91
|
+
BpmManager.server['/task/' + task_id.to_s + '/complete'].post(opts)
|
92
92
|
end
|
93
93
|
|
94
94
|
# Completes a Task as Administrator
|
95
95
|
def self.complete_task_as_admin(task_id, opts = {})
|
96
96
|
self.release_task(task_id)
|
97
97
|
self.start_task(task_id)
|
98
|
-
|
98
|
+
BpmManager.server['/task/' + task_id.to_s + '/complete'].post(opts)
|
99
99
|
end
|
100
100
|
|
101
101
|
# Fails a Task
|
102
102
|
def self.fail_task(task_id)
|
103
|
-
|
103
|
+
BpmManager.server['/task/' + task_id.to_s + '/fail'].post
|
104
104
|
end
|
105
105
|
|
106
106
|
# Exits a Task
|
107
107
|
def self.exit_task(task_id)
|
108
|
-
|
108
|
+
BpmManager.server['/task/' + task_id.to_s + '/exit'].post
|
109
109
|
end
|
110
110
|
|
111
111
|
# Gets the Process History
|
112
112
|
def self.get_history(process_definition_id = "")
|
113
113
|
if process_definition_id.empty?
|
114
|
-
JSON.parse(
|
114
|
+
JSON.parse(BpmManager.server['/history/instances'].get)
|
115
115
|
else
|
116
|
-
JSON.parse(
|
116
|
+
JSON.parse(BpmManager.server['/history/process/' + process_definition_id.to_s].get)
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
120
|
# Clears all the History --WARNING: Destructive action!--
|
121
121
|
def self.clear_all_history()
|
122
|
-
|
122
|
+
BpmManager.server['/history/clear'].post
|
123
123
|
end
|
124
124
|
|
125
125
|
# Gets the SLA for a Process Instance
|
data/lib/bpm_manager/version.rb
CHANGED