go to post Clayton Lewis · May 1, 2018 Okay, thanks for updating. That error didn't seem to make sense based on what you showed before.This very simple BPL might help you see how to declare and use a List:<process language='objectscript' request='Ens.Request' response='Ens.Response' height='2000' width='2000' ><context> <property name='MyList' type='%Integer' collection='list' instantiate='0' /></context><sequence xend='227' yend='451' > <assign name="Append 1" property="context.MyList" value="1" action="append" xpos='278' ypos='291' /></sequence></process>Note that I don't need to initialize my list property. That will happen automatically.Also note that I'm using action='append'. That will insert the new value to the end of the list. It corresponds to this in COS:do context.MyList.Insert(1)BPL also has action='insert', but that inserts into a specific location. It's equivalent to InsertAt for lists, or SetAt for arrays.
go to post Clayton Lewis · May 1, 2018 Probably unrelated, but you most likely do want MSI.IN835.EOBList to have storage.The reason is that if your BPL suspends for any reason (such as a Call) between the time you set and use that data, you'll lose whatever values you were trying to save. That's because the job that's executing your BPL will %Save the Context object and go work on another task while it's waiting. When the Call returns it will reload the Context object and resume work. If you extend %RegisteredObject your context property won't survive the save/reload.It might be tempting to ignore that if you're not currently doing any intervening Calls, but things tend to change over time, so doing it now could prevent a hard-to-find bug later.%SerialObject is probably better that %Persistent for this because that way you won't have to implement your own purge of old objects.Or, if you only need to store a list of integers, you could just declare your context property as that and skip the custom wrapper class.
go to post Clayton Lewis · Dec 1, 2017 How about an XML Stylesheet?https://stackoverflow.com/questions/24122921/xsl-to-convert-xml-to-jsonhttps://stackoverflow.com/questions/43355563/convert-xml-to-json-using-xslt
go to post Clayton Lewis · Jan 30, 2017 You need to provide subscript values for the three loops.This will give you the 1st member of each collection:source.{loop2000A(1).loop2000B(1).loop2300(1).CLM:ClaimSubmittersIdentifier}It's likely that in a real DTL you'll want to loop over each collection, because there will probably be multiple claims in the message. Use ForEach to do that:<foreach property='source.{loop2000A()}' key='k2000A' > <foreach property='source.{loop2000A(k2000A).loop2000B()}' key='k2000B' > <foreach property='source.{loop2000A(k2000A).loop2000B(k2000B).loop2300()}' key='k2300' > <assign value='source.{loop2000A(k2000A).loop2000B(k2000B).loop2300(k2300).CLM:ClaimSubmittersIdentifier}' property='target.ClaimInvoiceNo' action='set' /> </foreach> </foreach></foreach>Note that the way I have that now you'll end up with the last ClaimInvoiceNo in your target. You'll need to adjust to make sure you process each of them.