lib/openwfe/rest/controlclient.rb in openwferu-0.9.10.653 vs lib/openwfe/rest/controlclient.rb in openwferu-0.9.11
- old
+ new
@@ -49,15 +49,10 @@
# 'control methods' for monitoring process instances, freezing or
# cancelling them
#
class ControlClient < RestClient
- def initialize (server, port, username, password)
-
- super('http://'+server+':'+port.to_s(), username, password)
- end
-
def initialize (url, username, password)
super(url, username, password)
end
@@ -65,11 +60,11 @@
# Returns the list of controlable expressions
#
def list_expressions ()
r = self.get('listexpressions', nil, nil)
- return decode(r)
+ decode(r)
end
#
# Returns the list of expressions currently applied for a given
# workflow instance
@@ -78,11 +73,11 @@
params = {}
params['id'] = workflowInstanceId
r = self.get('getflowposition', nil, params)
- return decode(r)
+ decode(r)
end
#
# Cancels a given expression (and potentially its whole subtree)
#
@@ -90,11 +85,11 @@
fei = OpenWFE.encode(flowExpressionId)
params = {}
- return decode(self.post('cancelexpression', nil, params, fei))
+ decode(self.post('cancelexpression', nil, params, fei))
end
#
# Freezes an expression (and potentially its whole subtree)
#
@@ -102,11 +97,11 @@
fei = OpenWFE.encode(flowExpressionId)
params = {}
- return decode(self.post('freezeexpression', nil, params, fei))
+ decode(self.post('freezeexpression', nil, params, fei))
end
#
# Unfreezes an expression (and potentially its whole subtree)
#
@@ -114,19 +109,11 @@
fei = OpenWFE.encode(flowExpressionId)
params = {}
- return decode(self.post('unfreezeexpression', nil, params, fei))
+ decode(self.post('unfreezeexpression', nil, params, fei))
end
-
- protected
-
- def decode (reply)
-
- xml = REXML::Document.new(reply.body)
- return OpenWFE.xml_decode(xml.root)
- end
end
end