bpm_manager 0.6.23 → 0.7.0
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 +21 -9
- data/lib/bpm_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 190ad4dda987cf37039386593d1d6b842a5e525f
|
4
|
+
data.tar.gz: aae78fb85b839344b095071ed6df0ae76e35e5aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 330c360022504a9415184a61acd10f854d3baac20f96650a00f7516d11599ce77290d0d4be5576d93576c7698e1bcc28f2b02a559bbeb338652d425e17de65f4
|
7
|
+
data.tar.gz: 6b55ccd22bf13c275e7a7d64b35a29a0564949fd50b3bf66ab119073feba86956280e356d0dc9999774fa1809a02846a10898160b318f6023ce1d5c670227437
|
data/lib/bpm_manager/red_hat.rb
CHANGED
@@ -9,14 +9,9 @@ module BpmManager
|
|
9
9
|
return JSON.parse(RestClient.get(BpmManager.uri('/deployment'), :accept => :json))
|
10
10
|
end
|
11
11
|
|
12
|
-
#
|
13
|
-
def self.
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
# Gets all tasks with options
|
18
|
-
def self.tasks_with_opts(opts = {})
|
19
|
-
self.structure_task_data(JSON.parse(RestClient.get(BpmManager.uri('/task/query' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&'))), :accept => :json)))
|
12
|
+
# Creates a new Process
|
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})
|
20
15
|
end
|
21
16
|
|
22
17
|
# Gets all Process Instances
|
@@ -38,6 +33,16 @@ module BpmManager
|
|
38
33
|
end
|
39
34
|
end
|
40
35
|
|
36
|
+
# Gets all tasks, optionally you could specify an user id
|
37
|
+
def self.tasks(user_id = "")
|
38
|
+
self.structure_task_data(JSON.parse(RestClient.get(BpmManager.uri('/task/query' + (user_id.empty? ? '' : '?taskOwner=' + user_id)), :accept => :json)))
|
39
|
+
end
|
40
|
+
|
41
|
+
# Gets all tasks with options
|
42
|
+
def self.tasks_with_opts(opts = {})
|
43
|
+
self.structure_task_data(JSON.parse(RestClient.get(BpmManager.uri('/task/query' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&'))), :accept => :json)))
|
44
|
+
end
|
45
|
+
|
41
46
|
# Assigns a Task for an User
|
42
47
|
def self.assign_task(task_id, user_id)
|
43
48
|
RestClient.post(URI.encode(BpmManager.uri('/task/' + task_id.to_s + '/delegate?targetEntityId=' + user_id.to_s)), :headers => {:content_type => :json, :accept => :json})
|
@@ -75,7 +80,14 @@ module BpmManager
|
|
75
80
|
|
76
81
|
# Completes a Task
|
77
82
|
def self.complete_task(task_id, opts = {})
|
78
|
-
RestClient.post(URI.encode(BpmManager.uri('/task/' + task_id.to_s + '/complete')), :headers => {:content_type => :json, :accept => :json})
|
83
|
+
RestClient.post(URI.encode(BpmManager.uri('/task/' + task_id.to_s + '/complete' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&')))), :headers => {:content_type => :json, :accept => :json})
|
84
|
+
end
|
85
|
+
|
86
|
+
# Completes a Task as Administrator
|
87
|
+
def self.complete_task_as_admin(task_id, opts = {})
|
88
|
+
self.assign_task(task_id, 'Administrator')
|
89
|
+
self.start_task(task_id)
|
90
|
+
RestClient.post(URI.encode(BpmManager.uri('/task/' + task_id.to_s + '/complete' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&')))), :headers => {:content_type => :json, :accept => :json})
|
79
91
|
end
|
80
92
|
|
81
93
|
# Fails a Task
|
data/lib/bpm_manager/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bpm_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ariel Presa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|