lib/cpee/processtransformation/cpee.rb in cpee-1.3.196 vs lib/cpee/processtransformation/cpee.rb in cpee-1.3.197
- old
+ new
@@ -22,11 +22,11 @@
module CPEE
module ProcessTransformation
- module Target
+ module Target
class CPEE < Default
def generate
res = XML::Smart.string("<description xmlns='http://cpee.org/ns/description/1.0'/>")
res.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
@@ -37,18 +37,18 @@
res.add('escape')
end
def print_Loop(node,res)
if node.sub.length == 2 && node.sub[1].condition.empty? && ((node.sub[1].length == 1 && node.sub[1][0].class.name.gsub(/\w+:+/,'') == 'Break') || node.sub[1].length == 0)
- s1 = res.add('loop', 'pre_test' => node.sub[0].condition.empty? ? 'true' : node.sub[0].condition.join(' && '))
+ s1 = res.add('loop', 'mode' => 'pre_test', 'condition' => node.sub[0].condition.empty? ? 'true' : node.sub[0].condition.join(' && '))
s1.attributes['language'] = node.sub[0].condition_type unless node.sub[0].condition_type.nil?
node.sub[0].attributes.each do |k,v|
s1.attributes[k] = v
end
generate_for_list(node.sub[0],s1)
- else
- s1 = res.add('loop', 'pre_test' => 'true')
+ else
+ s1 = res.add('loop', 'mode' => 'pre_test', 'condition' => 'true')
print_Conditional(node,s1)
end
s1
end
@@ -62,10 +62,10 @@
p = n.add('d:parameters')
p.add('d:label',"\"#{node.label.gsub(/"/,"\\\"")}\"")
p.add('d:method',node.methods.join(',') || 'post')
p.add('d:type',":#{node.type}")
p.add('d:mid',"'#{node.id}'")
- par = p.add('d:parameters')
+ par = p.add('d:arguments')
node.parameters.each do |k,v|
par.add(k,v)
end
if !node.script.nil? && node.script.strip != ''
x = n.add('d:finalize',node.script)