bpm_manager 1.0.9 → 1.0.10
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 +50 -4
- 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: 0c3093ffd4c9a482ab67fefb213f6888be530e91
|
4
|
+
data.tar.gz: 3e97aaf101a90bfa9eba9b5a8288cdc0a18f05ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e478ac8aafd73cc9653b44694b22aae5d343c2908679618241d0ef33d12cbf3d90ce9475a60256f259b946d71f1643901d429f816518994fde75ef24dd79f87
|
7
|
+
data.tar.gz: 67d95b7740fa9d3fafa23a31be5e7c7e2783e9c224903998bfc8e92eefe60e9744cc333ff9e0b98ffe2b4895ef7e1c95268da41a620b0466d818e9a89a7b430b
|
data/lib/bpm_manager/red_hat.rb
CHANGED
@@ -81,8 +81,8 @@ module BpmManager
|
|
81
81
|
end
|
82
82
|
|
83
83
|
# Gets all the runtime Tasks with query options
|
84
|
-
def self.
|
85
|
-
JSON.parse(BpmManager.server['/query/runtime/task/' + (opts.empty? ? '' : '?' + opts.map{|k,v| (v.class == Array) ? v.map{|e| k.to_s + '=' + e.to_s}.join('&') : k.to_s + '=' + v.to_s}.join('&'))].get)
|
84
|
+
def self.tasks_query_with_opts(opts = {})
|
85
|
+
structure_task_query_data(JSON.parse(BpmManager.server['/query/runtime/task/' + (opts.empty? ? '' : '?' + opts.map{|k,v| (v.class == Array) ? v.map{|e| k.to_s + '=' + e.to_s}.join('&') : k.to_s + '=' + v.to_s}.join('&'))].get))
|
86
86
|
end
|
87
87
|
|
88
88
|
# Starts a Task
|
@@ -223,6 +223,7 @@ module BpmManager
|
|
223
223
|
|
224
224
|
unless input['taskSummaryList'].nil? || input['taskSummaryList'].empty?
|
225
225
|
input['taskSummaryList'].each do |task|
|
226
|
+
task_query = self.task_query(task['id'])
|
226
227
|
my_task = OpenStruct.new
|
227
228
|
my_task.id = task['id']
|
228
229
|
my_task.name = task['name']
|
@@ -239,8 +240,53 @@ module BpmManager
|
|
239
240
|
my_task.deployment_id = task['deployment-id']
|
240
241
|
my_task.quick_task_summary = task['quick-task-summary']
|
241
242
|
my_task.parent_id = task['parent_id']
|
242
|
-
my_task.form_name =
|
243
|
-
my_task.creator =
|
243
|
+
my_task.form_name = task_query(task['id'])['form-name']
|
244
|
+
my_task.creator = task_query(task['id'])['taskData']['created-by']
|
245
|
+
my_task.owner = task['actual-owner']
|
246
|
+
my_task.data = task
|
247
|
+
|
248
|
+
my_task.process = OpenStruct.new
|
249
|
+
my_task.process.data = self.process_instance(task['process-instance-id'])
|
250
|
+
my_task.process.deployment_id = task['deployment-id']
|
251
|
+
my_task.process.id = my_task.process.data['process-id']
|
252
|
+
my_task.process.instance_id = my_task.process.data['process-instance-id']
|
253
|
+
my_task.process.start_on = Time.at(my_task.process.data['start']/1000)
|
254
|
+
my_task.process.name = my_task.process.data['process-name']
|
255
|
+
my_task.process.version = my_task.process.data['process-version']
|
256
|
+
my_task.process.creator = my_task.process.data['identity']
|
257
|
+
my_task.process.variables = self.process_instance_variables(my_task.process.instance_id)
|
258
|
+
tasks << my_task
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
return tasks
|
263
|
+
end
|
264
|
+
|
265
|
+
def self.structure_task_query_data(input)
|
266
|
+
tasks = []
|
267
|
+
|
268
|
+
unless input['taskInfoList'].nil? || input['taskInfoList'].empty?
|
269
|
+
input['taskInfoList'].each do |tasks_array|
|
270
|
+
task = tasks_array['taskSummaries'].map{|e| e['id']}.max # Selects only the last active task
|
271
|
+
task_query = self.task_query(task['id'])
|
272
|
+
my_task = OpenStruct.new
|
273
|
+
my_task.id = task['id']
|
274
|
+
my_task.name = task['name']
|
275
|
+
my_task.subject = task['subject']
|
276
|
+
my_task.description = task['description']
|
277
|
+
my_task.status = task['status']
|
278
|
+
my_task.priority = task['priority']
|
279
|
+
my_task.skippable = task['skippable']
|
280
|
+
my_task.created_on = Time.at(task['created-on']/1000)
|
281
|
+
my_task.active_on = Time.at(task['activation-time']/1000)
|
282
|
+
my_task.process_instance_id = task['process-instance-id']
|
283
|
+
my_task.process_id = task['process-id']
|
284
|
+
my_task.process_session_id = task['process-session-id']
|
285
|
+
my_task.deployment_id = task['deployment-id']
|
286
|
+
my_task.quick_task_summary = task['quick-task-summary']
|
287
|
+
my_task.parent_id = task['parent_id']
|
288
|
+
my_task.form_name = task_query['form-name']
|
289
|
+
my_task.creator = task_query['taskData']['created-by']
|
244
290
|
my_task.owner = task['actual-owner']
|
245
291
|
my_task.data = task
|
246
292
|
|
data/lib/bpm_manager/version.rb
CHANGED