Module: BpmManager::Oracle
- Defined in:
- lib/bpm_manager/oracle.rb
Class Method Summary collapse
-
.process_instance(process_instance_id) ⇒ Object
Gets a Process Instance.
-
.process_instances ⇒ Object
Gets all Process Instances.
-
.tasks(user_id = "") ⇒ Object
Gets all tasks, optionally you could specify an user id.
-
.tasks_with_opts(opts = {}) ⇒ Object
Gets all tasks with options.
Class Method Details
.process_instance(process_instance_id) ⇒ Object
Gets a Process Instance
28 29 30 |
# File 'lib/bpm_manager/oracle.rb', line 28 def self.process_instance(process_instance_id) JSON.parse(RestClient.get(BpmManager.uri('/process/' + process_instance_id.to_s), :accept => :json)) end |
.process_instances ⇒ Object
Gets all Process Instances
23 24 25 |
# File 'lib/bpm_manager/oracle.rb', line 23 def self.process_instances JSON.parse(RestClient.get(BpmManager.uri('/processes'), :accept => :json)) end |
.tasks(user_id = "") ⇒ Object
Gets all tasks, optionally you could specify an user id
13 14 15 |
# File 'lib/bpm_manager/oracle.rb', line 13 def self.tasks(user_id = "") self.structure_task_data(JSON.parse(RestClient.get(BpmManager.uri('/tasks' + (user_id.empty? ? '' : '/' + user_id)), :accept => :json))) end |
.tasks_with_opts(opts = {}) ⇒ Object
Gets all tasks with options
18 19 20 |
# File 'lib/bpm_manager/oracle.rb', line 18 def self.tasks_with_opts(opts = {}) self.structure_task_data(JSON.parse(RestClient.get(BpmManager.uri('/tasks' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&'))), :accept => :json))) end |