server/instances/2/properties.xml in cpee-1.3.105 vs server/instances/2/properties.xml in cpee-1.3.106
- old
+ new
@@ -1,199 +1,483 @@
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
- <name>Enter name here</name>
- <state>finished</state>
+ <name>asdd</name>
+ <state>stopped</state>
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
- <positions/>
+ <positions>
+ <use_repo_cinemas__call_find__perform_search>after</use_repo_cinemas__call_find__perform_search>
+ </positions>
<dataelements>
- <test>success</test>
+ <title>"Hobbit"</title>
+ <date>"2013-01-15"</date>
+ <selected_title>""</selected_title>
+ <starting_time>""</starting_time>
+ <selected_cinema>null</selected_cinema>
+ <selected_date>null</selected_date>
+ <hall>null</hall>
+ <zip>1100</zip>
+ <city>"Vienna"</city>
+ <reservation_number>null</reservation_number>
+ <result_use_repo_cinemas>{"properties":{"call_find":{"perform_search":{}},"call_book":{}}}</result_use_repo_cinemas>
+ <use_repo_cinemas__show_id>""</use_repo_cinemas__show_id>
+ <use_repo_cinemas__list>""</use_repo_cinemas__list>
+ <use_repo_cinemas__res>""</use_repo_cinemas__res>
+ <use_repo_cinemas__list_merge>""</use_repo_cinemas__list_merge>
+ <use_repo_cinemas__number_of_shows>""</use_repo_cinemas__number_of_shows>
+ <use_repo_cinemas__endpoint>""</use_repo_cinemas__endpoint>
+ <result_use_repo_cinemas__call_find>{}</result_use_repo_cinemas__call_find>
</dataelements>
<endpoints>
- <gateway>http://localhost/gateways/timeout.php</gateway>
+ <services>http://localhost:9290/groups/Cinemas/</services>
+ <injection_handler>http://localhost:9291/</injection_handler>
+ <select>http://localhost:9293/pgwl</select>
+ <use_repo_cinemas__selected_cinema/>
</endpoints>
- <dsl>parallel do
- parallel_branch do
- activity :a9, :call, :gateway, :label => "Produce Headcap Subsystem", :method => "post", :parameters => [ { :timeout => 4 } ]
- activity :a10, :call, :gateway, :label => "Delivery", :method => "post", :parameters => [ { :timeout => 4 } ]
+ <dsl>activity :collect_input, :call, :select, :method => "post", :info => "true", :templates => [ { :uri => 'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl' }, { :name => 'Cinemas-Input' }, { :lang => 'EN' } ] do |result|
+
+ data.title = result.data.value('title')
+ data.date = result.data.value('date')
+ data.city = result.data.value('city')
+
+end
+activity :use_repo_cinemas, :call, :services, :info => "true", :service => [ { :serviceoperation => "search_and_book" }, { :injection_handler => endpoints.injection_handler } ], :additional_endpoints => [ { :selector_service => "select" } ], :parameters => [ { :title => data.title }, { :date => data.date } ]
+ activity :create_objects_for_use_repo_cinemas, :manipulate do
+ data.result_use_repo_cinemas = RescueHash.new
+ data.result_use_repo_cinemas['properties'] = RescueHash.new
+ data.result_use_repo_cinemas['properties']["call_find"] = RescueHash.new
+ data.result_use_repo_cinemas['properties']["call_book"] = RescueHash.new
+ endpoints.use_repo_cinemas__selected_cinema = ""
+ data.use_repo_cinemas__show_id = ''
+ data.use_repo_cinemas__list = ''
+ data.use_repo_cinemas__res = ''
+ data.use_repo_cinemas__list_merge = ''
+ data.use_repo_cinemas__number_of_shows = ''
+ data.use_repo_cinemas__endpoint = ''
+
end
- parallel_branch do
- activity :a5, :call, :gateway, :label => "Supply Mechanical Parts", :method => "post", :parameters => [ { :timeout => 4 } ]
- activity :a6, :call, :gateway, :label => "Produce Mechanical Parts (A-Z)", :method => "post", :parameters => [ { :timeout => 4 } ]
- activity :a7, :call, :gateway, :label => "Perform Surface Treatment", :method => "post", :parameters => [ { :timeout => 4 } ]
- activity :a8, :call, :gateway, :label => "Mechanical Parts Assembly", :method => "post", :parameters => [ { :timeout => 4 } ]
+ activity :use_repo_cinemas__call_find, :call, :services, :service => [ { :serviceoperation => "search" }, { :injection_handler => endpoints.injection_handler } ], :parameters => [ { :title => data.title }, { :date => data.date } ], :'call-oid' => 'call_find'
+ activity :create_objects_for_use_repo_cinemas__call_find, :manipulate do
+ data.result_use_repo_cinemas__call_find = RescueHash.new
+ data.result_use_repo_cinemas['properties']["call_find"]["perform_search"] = RescueHash.new
+
+ end
+ activity :use_repo_cinemas__call_find__perform_search, :call, :services, :service => [ { :serviceoperation => "search" }, { :injection_handler => endpoints.injection_handler } ], :parameters => [ { :title => data.title }, { :date => data.date } ], :'call-oid' => 'perform_search'
+ parallel do
+ end
+
+ activity :manipulate_from_use_repo_cinemas__call_find__perform_search, :manipulate, nil,data.result_use_repo_cinemas__call_find do |result|
+properties = data.result_use_repo_cinemas['properties']["call_find"]
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas__call_find['list_shows'] = result[0].value('list')
+
+ end
+
+ activity :manipulate_from_use_repo_cinemas__call_find, :manipulate, nil,data.result_use_repo_cinemas__call_find do |result|
+properties = data.result_use_repo_cinemas['properties']
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.use_repo_cinemas__list = result[0].value('list')
+
end
- parallel_branch do
- parallel do
- parallel_branch do
- activity :a2, :call, :gateway, :label => "Supply Electric Parts", :method => "post", :parameters => [ { :timeout => 4 } ]
- activity :a3, :call, :gateway, :label => "Delivery", :method => "post", :parameters => [ { :timeout => 4 } ]
+ activity :remove_objects_of_use_repo_cinemas__call_find, :manipulate do
+ data.delete(:"result_use_repo_cinemas__call_find")
+
+ end
+ activity :use_repo_cinemas__merge_result, :manipulate do
+list = data.use_repo_cinemas__list
+m_list = data.use_repo_cinemas__list_merge
+nos = data.use_repo_cinemas__number_of_shows
+
+title = data.title
+date = data.date
+ xml = XML::Smart.string("<list_of_shows/>")
+ if list.class == Array
+ list.each do |v|
+ l = XML::Smart.string(v)
+ xml.root.add(l.find("//show"))
+ end
+ elsif list.class == String
+ l = XML::Smart.string(list)
+ xml.root.add(l.find("//show"))
+ else
+ raise "Unexpected class of return-value - class: #{list.class}"
+ end
+ m_list = xml.root.dump
+ nos = xml.root.children.length
+data.use_repo_cinemas__list = list
+data.use_repo_cinemas__list_merge = m_list
+data.use_repo_cinemas__number_of_shows = nos
+
+ end
+ choose do
+ alternative (data.use_repo_cinemas__number_of_shows.>(0)) do
+ activity :use_repo_cinemas__perform_select, :call, :select, :templates => [ { :uri => 'http://localhost:9290/groups/Cinemas//operations/search_and_book/templates/perform_select' }, { :name => 'Select_Show' }, { :lang => 'EN' } ], :method => "post", :info => "true", :parameters => [ { :data => data.use_repo_cinemas__list_merge } ], :'call-oid' => 'perform_select' do |result|
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.use_repo_cinemas__show_id = result[0].value('show_id')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.use_repo_cinemas__endpoint = result[0].value('target')
+data.result_use_repo_cinemas['status'] = result[1]
+
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['movie_title'] = result[0].value('movie_title')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['selected_date'] = result[0].value('date')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['starting_time'] = result[0].value('starting_time')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['hall'] = result[0].value('hall')
+
end
- parallel_branch do
- activity :a1, :call, :gateway, :label => "Develop Control System", :method => "post", :parameters => [ { :timeout => 4 } ]
+ activity :use_repo_cinemas__set_selected_endpoint, :manipulate do
+ep = data.use_repo_cinemas__endpoint
+selected = endpoints.use_repo_cinemas__selected_cinema
+
+ selected = ep
+ data.use_repo_cinemas__endpoint = ep
+endpoints.use_repo_cinemas__selected_cinema = selected
+
end
+ activity :use_repo_cinemas__call_book, :call, :use_repo_cinemas__selected_cinema, :service => [ { :serviceoperation => "book" }, { :injection_handler => endpoints.injection_handler } ], :parameters => [ { :show_id => data.use_repo_cinemas__show_id } ], :'call-oid' => 'call_book' do |result|
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['reservation_id'] = result[0].value('reservation_number')
+
+ end
+ activity :use_repo_cinemas__set_status_success, :manipulate do
+
+ status = 200
+ data.result_use_repo_cinemas['status'] = status
+
+ end
end
- activity :a4, :call, :gateway, :label => "Electric Board Assembly", :method => "post", :parameters => [ { :timeout => 4 } ]
+ otherwise do
+ activity :use_repo_cinemas__set_status_failed, :manipulate do
+
+ status = 404
+ data.result_use_repo_cinemas['status'] = status
+
+ end
+ end
end
+
+activity :manipulate_from_use_repo_cinemas, :manipulate, nil,data.result_use_repo_cinemas do |result|
+properties = data.result_use_repo_cinemas['properties']
+
+ res = result[0]
+ if res['status'] == 200
+ # Computing service responses
+ data.reservation_number = res['reservation_id']
+ data.starting_time = res['starting_time']
+ data.selected_title = res['movie_title']
+ data.selected_date = res['selected_date']
+ data.hall = res['hall']
+ # Computing properties of executed services
+ perf_book = properties['call_book']['perform_book']
+ data.selected_cinema = " #{perf_book.values[0]['vendor']['name']}\n#{perf_book.values[0]['address']['street']}\n#{perf_book.values[0]['address']['zip']} #{perf_book.values[0]['address']['city']}"
+ end
+
end
-activity :a11, :call, :gateway, :label => "Systems Integration", :method => "post", :parameters => [ { :timeout => 4 } ]
-activity :a12, :call, :gateway, :label => "Test", :method => "post", :parameters => [ { :timeout => 4 } ] do |result|
- data.test = "success"
+activity :remove_objects_of_use_repo_cinemas, :manipulate do
+ data.delete(:"result_use_repo_cinemas")
+ data.delete(:"properties_use_repo_cinemas")
+ endpoints.delete(:"use_repo_cinemas__selected_cinema")
+ data.delete(:"use_repo_cinemas__show_id")
+ data.delete(:"use_repo_cinemas__list")
+ data.delete(:"use_repo_cinemas__res")
+ data.delete(:"use_repo_cinemas__list_merge")
+ data.delete(:"use_repo_cinemas__number_of_shows")
+ data.delete(:"use_repo_cinemas__endpoint")
+
end
+activity :confirm, :call, :select, :method => "post", :info => "true", :templates => [ { :uri => 'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl' }, { :name => 'Cinemas-Output' }, { :lang => 'EN' } ], :parameters => [ { :title => data.selected_title }, { :date => data.selected_date }, { :time => data.starting_time }, { :hall => data.hall }, { :res_nr => data.reservation_number }, { :cinema => data.selected_cinema } ]
</dsl>
<status>
<id>0</id>
<message>undefined</message>
</status>
<description>
<description xmlns="http://cpee.org/ns/description/1.0">
- <!--{{{-->
- <parallel>
- <parallel_branch>
- <call id="a9" endpoint="gateway">
+ <call id="collect_input" endpoint="select">
+ <parameters>
+ <method>post</method>
+ <info>true</info>
+ <templates>
+ <uri>'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl'</uri>
+ <name>'Cinemas-Input'</name>
+ <lang>'EN'</lang>
+ </templates>
+ </parameters>
+ <manipulate output="result">
+ data.title = result.data.value('title')
+ data.date = result.data.value('date')
+ data.city = result.data.value('city')
+ </manipulate>
+ </call>
+ <call id="use_repo_cinemas" endpoint="services">
+ <constraints>
+ <constraint xpath="address/city" comparator="==" variable="city"/>
+ </constraints>
+ <parameters>
+ <!--{{{-->
+ <info>true</info>
+ <service>
+ <serviceoperation>"search_and_book"</serviceoperation>
+ <injection_handler>endpoints.injection_handler</injection_handler>
+ </service>
+ <additional_endpoints>
+ <selector_service>"select"</selector_service>
+ </additional_endpoints>
+ <parameters>
+ <title>data.title</title>
+ <date>data.date</date>
+ </parameters>
+ </parameters>
+ <!--}}}-->
+ </call>
+ <group type="injection" source="use_repo_cinemas" serviceoperation=""search_and_book"" result="data.result_use_repo_cinemas" properties="data.result_use_repo_cinemas['properties']">
+ <manipulate id="create_objects_for_use_repo_cinemas" generated="true"> data.result_use_repo_cinemas = RescueHash.new
+ data.result_use_repo_cinemas['properties'] = RescueHash.new
+ data.result_use_repo_cinemas['properties']["call_find"] = RescueHash.new
+ data.result_use_repo_cinemas['properties']["call_book"] = RescueHash.new
+ endpoints.use_repo_cinemas__selected_cinema = ""
+ data.use_repo_cinemas__show_id = ''
+ data.use_repo_cinemas__list = ''
+ data.use_repo_cinemas__res = ''
+ data.use_repo_cinemas__list_merge = ''
+ data.use_repo_cinemas__number_of_shows = ''
+ data.use_repo_cinemas__endpoint = ''
+</manipulate>
+ <constraints>
+ <constraint xpath="address/city" comparator="==" variable="city"/>
+ </constraints>
+ <call id="use_repo_cinemas__call_find" endpoint="services" oid="call_find">
+ <parameters>
+ <service>
+ <serviceoperation>"search"</serviceoperation>
+ <injection_handler>endpoints.injection_handler</injection_handler>
+ </service>
<parameters>
- <!--{{{-->
- <label>Produce Headcap Subsystem</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
+ <title>data.title</title>
+ <date>data.date</date>
</parameters>
- <!--}}}-->
- </call>
- <call id="a10" endpoint="gateway">
+ </parameters>
+ </call>
+ <group type="injection" source="use_repo_cinemas__call_find" serviceoperation=""search"" result="data.result_use_repo_cinemas__call_find" properties="data.result_use_repo_cinemas['properties']["call_find"]">
+ <manipulate id="create_objects_for_use_repo_cinemas__call_find" generated="true"> data.result_use_repo_cinemas__call_find = RescueHash.new
+ data.result_use_repo_cinemas['properties']["call_find"]["perform_search"] = RescueHash.new
+</manipulate>
+ <call id="use_repo_cinemas__call_find__perform_search" endpoint="services" oid="perform_search">
<parameters>
- <!--{{{-->
- <label>Delivery</label>
- <method>post</method>
+ <service>
+ <serviceoperation>"search"</serviceoperation>
+ <injection_handler>endpoints.injection_handler</injection_handler>
+ </service>
<parameters>
- <timeout>4</timeout>
+ <title>data.title</title>
+ <date>data.date</date>
</parameters>
</parameters>
- <!--}}}-->
</call>
- </parallel_branch>
- <parallel_branch>
- <call id="a5" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Supply Mechanical Parts</label>
- <method>post</method>
+ <group type="injection" source="use_repo_cinemas__call_find__perform_search" serviceoperation=""search"" properties="data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]">
+ <parallel generated="true"/>
+ </group>
+ <manipulate output="result" id="manipulate_from_use_repo_cinemas__call_find__perform_search" data="data.result_use_repo_cinemas__call_find" properties="data.result_use_repo_cinemas['properties']["call_find"]">properties = data.result_use_repo_cinemas['properties']["call_find"]
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas__call_find['list_shows'] = result[0].value('list')
+</manipulate>
+ </group>
+ <manipulate output="result" id="manipulate_from_use_repo_cinemas__call_find" data="data.result_use_repo_cinemas__call_find" properties="data.result_use_repo_cinemas['properties']">properties = data.result_use_repo_cinemas['properties']
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.use_repo_cinemas__list = result[0].value('list')
+</manipulate>
+ <manipulate id="remove_objects_of_use_repo_cinemas__call_find" generated="true"> data.delete(:"result_use_repo_cinemas__call_find")
+</manipulate>
+ <manipulate id="use_repo_cinemas__merge_result" oid="merge_result">list = data.use_repo_cinemas__list
+m_list = data.use_repo_cinemas__list_merge
+nos = data.use_repo_cinemas__number_of_shows
+
+title = data.title
+date = data.date
+ xml = XML::Smart.string("<list_of_shows/>")
+ if list.class == Array
+ list.each do |v|
+ l = XML::Smart.string(v)
+ xml.root.add(l.find("//show"))
+ end
+ elsif list.class == String
+ l = XML::Smart.string(list)
+ xml.root.add(l.find("//show"))
+ else
+ raise "Unexpected class of return-value - class: #{list.class}"
+ end
+ m_list = xml.root.dump
+ nos = xml.root.children.length
+data.use_repo_cinemas__list = list
+data.use_repo_cinemas__list_merge = m_list
+data.use_repo_cinemas__number_of_shows = nos
+</manipulate>
+ <choose>
+ <alternative condition="(data.use_repo_cinemas__number_of_shows.>(0))">
+ <call id="use_repo_cinemas__perform_select" endpoint="select" oid="perform_select">
<parameters>
- <timeout>4</timeout>
+ <templates>
+ <uri>'http://localhost:9290/groups/Cinemas//operations/search_and_book/templates/perform_select'</uri>
+ <name>'Select_Show'</name>
+ <lang>'EN'</lang>
+ </templates>
+ <method>post</method>
+ <info>true</info>
+ <parameters>
+ <data>data.use_repo_cinemas__list_merge</data>
+ </parameters>
</parameters>
- </parameters>
- <!--}}}-->
- </call>
- <call id="a6" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Produce Mechanical Parts (A-Z)</label>
- <method>post</method>
+ <manipulate output="result"># Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.use_repo_cinemas__show_id = result[0].value('show_id')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.use_repo_cinemas__endpoint = result[0].value('target')
+data.result_use_repo_cinemas['status'] = result[1]
+
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['movie_title'] = result[0].value('movie_title')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['selected_date'] = result[0].value('date')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['starting_time'] = result[0].value('starting_time')
+# Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['hall'] = result[0].value('hall')
+</manipulate>
+ </call>
+ <manipulate id="use_repo_cinemas__set_selected_endpoint" oid="set_selected_endpoint">ep = data.use_repo_cinemas__endpoint
+selected = endpoints.use_repo_cinemas__selected_cinema
+
+ selected = ep
+ data.use_repo_cinemas__endpoint = ep
+endpoints.use_repo_cinemas__selected_cinema = selected
+</manipulate>
+ <call id="use_repo_cinemas__call_book" endpoint="use_repo_cinemas__selected_cinema" oid="call_book">
<parameters>
- <timeout>4</timeout>
- </parameters>
- </parameters>
- <!--}}}-->
- </call>
- <call id="a7" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Perform Surface Treatment</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
- </parameters>
- <!--}}}-->
- </call>
- <call id="a8" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Mechanical Parts Assembly</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
- </parameters>
- <!--}}}-->
- </call>
- </parallel_branch>
- <parallel_branch>
- <parallel>
- <parallel_branch>
- <call id="a2" endpoint="gateway">
+ <service>
+ <serviceoperation>"book"</serviceoperation>
+ <injection_handler>endpoints.injection_handler</injection_handler>
+ </service>
<parameters>
- <!--{{{-->
- <label>Supply Electric Parts</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
+ <show_id>data.use_repo_cinemas__show_id</show_id>
</parameters>
- <!--}}}-->
- </call>
- <call id="a3" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Delivery</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
- </parameters>
- <!--}}}-->
- </call>
- </parallel_branch>
- <parallel_branch>
- <call id="a1" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Develop Control System</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
- </parameters>
- <!--}}}-->
- </call>
- </parallel_branch>
- </parallel>
- <call id="a4" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Electric Board Assembly</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
</parameters>
- </parameters>
- <!--}}}-->
- </call>
- </parallel_branch>
- </parallel>
- <call id="a11" endpoint="gateway">
+ <manipulate output="result"># Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object
+if result[0].class.to_s == "Hash"
+ result[0] = RescueHash.new_from_obj(result[0])
+end
+data.result_use_repo_cinemas['reservation_id'] = result[0].value('reservation_number')
+</manipulate>
+ </call>
+ <manipulate id="use_repo_cinemas__set_status_success" oid="set_status_success">
+ status = 200
+ data.result_use_repo_cinemas['status'] = status
+</manipulate>
+ </alternative>
+ <otherwise>
+ <manipulate id="use_repo_cinemas__set_status_failed" oid="set_status_failed">
+ status = 404
+ data.result_use_repo_cinemas['status'] = status
+</manipulate>
+ </otherwise>
+ </choose>
+ </group>
+ <manipulate output="result" id="manipulate_from_use_repo_cinemas" data="data.result_use_repo_cinemas" properties="data.result_use_repo_cinemas['properties']">properties = data.result_use_repo_cinemas['properties']
+
+ res = result[0]
+ if res['status'] == 200
+ # Computing service responses
+ data.reservation_number = res['reservation_id']
+ data.starting_time = res['starting_time']
+ data.selected_title = res['movie_title']
+ data.selected_date = res['selected_date']
+ data.hall = res['hall']
+ # Computing properties of executed services
+ perf_book = properties['call_book']['perform_book']
+ data.selected_cinema = " #{perf_book.values[0]['vendor']['name']}\n#{perf_book.values[0]['address']['street']}\n#{perf_book.values[0]['address']['zip']} #{perf_book.values[0]['address']['city']}"
+ end
+ </manipulate>
+ <manipulate id="remove_objects_of_use_repo_cinemas" generated="true"> data.delete(:"result_use_repo_cinemas")
+ data.delete(:"properties_use_repo_cinemas")
+ endpoints.delete(:"use_repo_cinemas__selected_cinema")
+ data.delete(:"use_repo_cinemas__show_id")
+ data.delete(:"use_repo_cinemas__list")
+ data.delete(:"use_repo_cinemas__res")
+ data.delete(:"use_repo_cinemas__list_merge")
+ data.delete(:"use_repo_cinemas__number_of_shows")
+ data.delete(:"use_repo_cinemas__endpoint")
+</manipulate>
+ <call id="confirm" endpoint="select">
<parameters>
- <!--{{{-->
- <label>Systems Integration</label>
<method>post</method>
+ <info>true</info>
+ <templates>
+ <uri>'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl'</uri>
+ <!-- uri>'http://gus.lan/input-forms/cinemas.xsl'</uri -->
+ <name>'Cinemas-Output'</name>
+ <lang>'EN'</lang>
+ </templates>
<parameters>
- <timeout>4</timeout>
+ <title>data.selected_title</title>
+ <date>data.selected_date</date>
+ <time>data.starting_time</time>
+ <hall>data.hall</hall>
+ <res_nr>data.reservation_number</res_nr>
+ <cinema>data.selected_cinema</cinema>
</parameters>
</parameters>
- <!--}}}-->
</call>
- <call id="a12" endpoint="gateway">
- <parameters>
- <!--{{{-->
- <label>Test</label>
- <method>post</method>
- <parameters>
- <timeout>4</timeout>
- </parameters>
- </parameters>
- <!--}}}-->
- <manipulate output="result"> data.test = "success"</manipulate>
- </call>
</description>
</description>
<transformation>
<!--{{{-->
<!--}}}-->
@@ -225,18 +509,29 @@
</xsl:if>
<xsl:if test="name()='call'">
<xsl:text>, :call, :</xsl:text>
<xsl:value-of select="@endpoint"/>
<xsl:apply-templates select="d:parameters"/>
+ <xsl:if test="@oid">
+ <xsl:text>, :'call-oid' => '</xsl:text>
+ <xsl:value-of select="@oid"/>
+ <xsl:text>'</xsl:text>
+ </xsl:if>
<xsl:apply-templates select="d:manipulate" mode="part-of-call">
<xsl:with-param name="myspace">
<xsl:value-of select="$myspace"/>
</xsl:with-param>
</xsl:apply-templates>
<xsl:call-template name="print-newline"/>
</xsl:if>
<xsl:if test="name()='manipulate'">
<xsl:text>, :manipulate</xsl:text>
+ <!-- RESCUE: manipulate with dataelement as result object -->
+ <xsl:if test="@data">
+ <xsl:text>, nil,</xsl:text>
+ <xsl:value-of select="@data"/>
+ </xsl:if>
+ <!-- RESCUE -->
<xsl:call-template name="print-content">
<xsl:with-param name="myspace">
<xsl:value-of select="$myspace"/>
</xsl:with-param>
</xsl:call-template>
\ No newline at end of file