generated from intersystems-community/iris-interoperability-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance SetValueAt method for JSON manipulation; add error handling a…
…nd support for insert, remove, and append actions. Introduce unit tests for ComplexTransform.
- Loading branch information
1 parent
a0a93d1
commit 80d8764
Showing
2 changed files
with
87 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Class UnitTest.ComplexTransform Extends Ens.DataTransformDTL [ DependsOn = IOP.Message ] | ||
{ | ||
|
||
Parameter IGNOREMISSINGSOURCE = 1; | ||
|
||
Parameter REPORTERRORS = 1; | ||
|
||
Parameter TREATEMPTYREPEATINGFIELDASNULL = 0; | ||
|
||
XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] | ||
{ | ||
<transform sourceClass='IOP.Message' targetClass='IOP.Message' sourceDocType='registerFilesIop.message.ComplexMessage' targetDocType='registerFilesIop.message.ComplexMessage' create='new' language='objectscript' > | ||
<assign value='source.{post}' property='target.{post}' action='set' /> | ||
<foreach property='source.{list_str()}' key='k1' > | ||
<assign value='source.{list_str(k1)}_"foo"' property='target.{list_str()}' action='append' /> | ||
</foreach> | ||
<foreach property='source.{list_post()}' key='k2' > | ||
<assign value='source.{list_post().Title}' property='target.{list_post(k2).Title}' action='append' /> | ||
</foreach> | ||
</transform> | ||
} | ||
|
||
} |