bpm_manager 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bpm_manager/red_hat.rb +5 -5
- 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: 96799d8871d846b9ea01b32e0aba3f672b8f44e3
|
4
|
+
data.tar.gz: 3435d5d53cc227dcb2c6e4c18aad543f059c5a6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb652a2e8b5e296f5dddf6f909162378084e8151edfb45f2ea0e6a61585b7900a726f561add9fa6e8611326b96df512145431ae986b529d5cafd3738a2a84d5b
|
7
|
+
data.tar.gz: f2044662fcc92f4683aca25d802a7836af7492750891c4e9c018d37ae087f2ecf1add6a8dcd468686e8af7f4b94d160ae6505fe664880dd9dcfbc18700d0512c
|
data/lib/bpm_manager/red_hat.rb
CHANGED
@@ -124,13 +124,11 @@ module BpmManager
|
|
124
124
|
|
125
125
|
# Gets the SLA for a Process Instance
|
126
126
|
def self.get_task_sla(task_instance_id, process_sla_hours = 0, task_sla_hours = 0, warning_offset_percent = 20)
|
127
|
-
|
128
|
-
sla.task = OpenStruct.new
|
129
|
-
sla.process = OpenStruct.new
|
130
|
-
my_task = self.tasks_with_opts(:taskId => task_instance_id).first
|
127
|
+
my_task = self.tasks_with_opts('taskId' => task_instance_id).first
|
131
128
|
|
132
129
|
unless my_task.nil?
|
133
|
-
|
130
|
+
sla = OpenStruct.new(:task => OpenStruct.new, :process => OpenStruct.new)
|
131
|
+
|
134
132
|
# Calculates the process sla
|
135
133
|
sla.process.status = calculate_sla(my_task.process.start_on, process_sla_hours, warning_offset_percent)
|
136
134
|
sla.process.status_name = (calculate_sla(my_task.process.start_on, process_sla_hours, warning_offset_percent) == 0) ? 'ok' : (calculate_sla(my_task.process.start_on, process_sla_hours, warning_offset_percent) == 1 ? 'warning' : 'due')
|
@@ -140,6 +138,8 @@ module BpmManager
|
|
140
138
|
sla.task.status = calculate_sla(my_task.task.created_on, task_sla_hours, warning_offset_percent)
|
141
139
|
sla.task.status_name = (calculate_sla(my_task.created_on, task_sla_hours, warning_offset_percent) == 0) ? 'ok' : (calculate_sla(my_task.created_on, task_sla_hours, warning_offset_percent) == 1 ? 'warning' : 'due')
|
142
140
|
sla.task.percent = calculate_sla_percent(my_task.created_on, task_sla_hours, warning_offset_percent)
|
141
|
+
else
|
142
|
+
sla = nil
|
143
143
|
end
|
144
144
|
|
145
145
|
return sla
|
data/lib/bpm_manager/version.rb
CHANGED