Add new transformed record to the end of the file [message #1726365] |
Fri, 11 March 2016 20:11 |
Yi Zhu Messages: 9 Registered: March 2016 Location: Boston |
Junior Member |
|
|
Dear All,
I use qurery to create a new file function.dats, because the inputmodel includes 8 records, so the query execute 8 times according to the input model, but what I get in the new file is the last record . How can I get all records in the new file? in other words, How can I add new transformed record to the end of the file? Please help me. Thanks in advanced. The rule is showed below.
query XMI2ATS = Functions!Clause.allInstances()->select(e | e.oclIsTypeOf(Functions!Clause))->flatten()->forAll(x | x.toString2().writeTo('./runtime-workbench-workspace/XMI2ATS/function.dats'));
helper context Functions!Clause def: toString2() : String =
'| ' + self.clause + ' ' + self.pattern + ' ' + '=>' + self.expression + '\n' ;
YI ZHU
[Updated on: Fri, 11 March 2016 20:53] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02741 seconds