bpm_manager 0.10.5 → 0.10.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87e82d51f506b4d0866e448fba8f2980b56dc913
4
- data.tar.gz: 6ce8e6fa35800680c173354f226cfb4eb1d0d50f
3
+ metadata.gz: c8b648175bc820d719c154609c84c3bd8964cb35
4
+ data.tar.gz: c474b7b7f3153ebf904f2f8d7e02d90cbd01034a
5
5
  SHA512:
6
- metadata.gz: 80d005da0c2dba893da8310ca0db5ce01b51ba3cd8a2359ed9fd318b65ca68e5824d471746daf52245dce8a3dc5abd95fadbf348ed572b24e9ecc5c8f5d6a1eb
7
- data.tar.gz: ef375ca2094816a6f7a9da56345c0cffb8d4ea484cd54d8382ab350efad82276d2f6e9e0758aef35f6f009a933c930b0c0ddb38d05400872791ccf646db88168
6
+ metadata.gz: 90f0a7344a79cbed61c76d02c4fca001c9f26b78edbcc09b25aa3f11f37b4217de6c76b1020a337cf7093077ec52bf074d46ce7a4c58d28574c804d5a21a5d06
7
+ data.tar.gz: 9bdbbf395d060aada92f9b307b133f91864e0623d4c312598a5f0aec9fbc6002fe453fe748ab618af9fc37bb2e771ce6926b2f6ebb1a2b5db771947c8f35adad
@@ -11,7 +11,9 @@ module BpmManager
11
11
 
12
12
  # Creates a new Process
13
13
  def self.create_process(deployment_id, process_definition_id, opts = {})
14
- RestClient.post(URI.encode(BpmManager.uri('/runtime/' + deployment_id.to_s + '/process/' + process_definition_id.to_s + '/start' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&')))), :headers => {:content_type => :json, :accept => :json})
14
+ url = URI.encode(BpmManager.uri('/runtime/' + deployment_id.to_s + '/process/' + process_definition_id.to_s + '/start' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&'))))
15
+ puts '---->' + url.inspect
16
+ RestClient.post(url, :headers => {:content_type => :json, :accept => :json})
15
17
  end
16
18
 
17
19
  # Gets all Process Instances
@@ -191,30 +193,35 @@ module BpmManager
191
193
  private
192
194
  def self.structure_task_data(input)
193
195
  tasks = []
194
- puts '---> Enter input: ' + input.inspect
195
196
 
196
197
  unless input['taskSummaryList'].nil? || input['taskSummaryList'].empty?
197
198
  input['taskSummaryList'].each do |task|
198
199
  my_task = OpenStruct.new
199
- my_task.id = task['task-summary']['id']
200
- my_task.process_instance_id = task['task-summary']['process-instance-id']
201
- my_task.parent_id = task['task-summary']['parent_id']
202
- my_task.created_on = Time.at(task['task-summary']['created-on']/1000)
203
- my_task.active_on = Time.at(task['task-summary']['activation-time']/1000)
204
- my_task.name = task['task-summary']['name']
205
- my_task.form_name = self.task_query(task['task-summary']['id'])['form-name']
206
- my_task.creator = self.task_query(task['task-summary']['id'])['taskData']['created-by']
207
- my_task.owner = task['task-summary']['actual-owner']
208
- my_task.status = task['task-summary']['status']
209
- my_task.subject = task['task-summary']['subject']
210
- my_task.description = task['task-summary']['description']
211
- my_task.data = task['task-summary']
200
+ my_task.id = task['id']
201
+ my_task.name = task['name']
202
+ my_task.subject = task['subject']
203
+ my_task.description = task['description']
204
+ my_task.status = task['status']
205
+ my_task.priority = task['priority']
206
+ my_task.skippable = task['skippable']
207
+ my_task.created_on = Time.at(task['created-on']/1000)
208
+ my_task.active_on = Time.at(task['activation-time']/1000)
209
+ my_task.process_instance_id = task['process-instance-id']
210
+ my_task.process_id = task['process-id']
211
+ my_task.process_session_id = task['process-session-id']
212
+ my_task.deployment_id = task['deployment-id']
213
+ my_task.quick_task_summary = task['quick-task-summary']
214
+ my_task.parent_id = task['parent_id']
215
+ my_task.form_name = self.task_query(task['id'])['form-name']
216
+ my_task.creator = self.task_query(task['id'])['taskData']['created-by']
217
+ my_task.owner = task['actual-owner']
218
+ my_task.data = task
212
219
 
213
220
  puts '---> Task data: ' + my_task.inspect
214
221
 
215
222
  my_task.process = OpenStruct.new
216
- my_task.process.data = self.process_instance(task['task-summary']['process-instance-id'])
217
- my_task.process.deployment_id = task['task-summary']['deployment-id']
223
+ my_task.process.data = self.process_instance(task['process-instance-id'])
224
+ my_task.process.deployment_id = task['deployment-id']
218
225
  my_task.process.id = my_task.process.data['process-id']
219
226
  my_task.process.instance_id = my_task.process.data['process-instance-id']
220
227
  my_task.process.start_on = Time.at(my_task.process.data['start']/1000)
@@ -1,3 +1,3 @@
1
1
  module BpmManager
2
- VERSION = "0.10.5"
2
+ VERSION = "0.10.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bpm_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Presa