lib/cpee/instantiation.rb in cpee-1.4.25 vs lib/cpee/instantiation.rb in cpee-1.4.26
- old
+ new
@@ -135,11 +135,11 @@
class InstantiateUrl < Riddl::Implementation #{{{
include Helpers
def response
- cpee = @a[0]
+ cpee = @h['X_CPEE'] || @a[0]
selfurl = @a[1]
cblist = @a[2]
status, res = Riddl::Client.new(@p[2].value).get
tdoc = if status >= 200 && status < 300
res[0].value.read
@@ -168,11 +168,11 @@
class InstantiateXML < Riddl::Implementation #{{{
include Helpers
def response
- cpee = @a[0]
+ cpee = @h['X_CPEE'] || @a[0]
behavior = @a[1] ? 'fork_ready' : @p[0].value
data = @a[1] ? 0 : 1
selfurl = @a[2]
cblist = @a[3]
tdoc = if @p[data].additional =~ /base64/
@@ -201,11 +201,11 @@
class HandleInstance < Riddl::Implementation #{{{
include Helpers
def response
- cpee = @a[0]
+ cpee = @h['X_CPEE'] || @a[0]
selfurl = @a[1]
cblist = @a[2]
instance = @p[1].value
srv = Riddl::Client.new(cpee, cpee + "?riddl-description")
@@ -222,10 +222,10 @@
end
end #}}}
class ContinueTask < Riddl::Implementation #{{{
def response
- cpee = @a[0]
+ cpee = @h['X_CPEE'] || @a[0]
cblist = @a[1]
topic = @p[1].value
event_name = @p[2].value
notification = JSON.parse(@p[3].value)