go to post Thembelani Mlalazi · Oct 24, 2017 yes it possible within your rule select the rule's constraint where you reference the source where the message is coming from and then click rule and add when on the condition for when select document . which will allow you to use the record mapper property
go to post Thembelani Mlalazi · Oct 23, 2017 Here is some code that will process your string container into lines of records that you want but you might want to change a few things to get this working with your records after converting your string container to a simple csv file you can then map it to your record mapper and process it any how. Class TestEnvironment.Custom.GENERAL.ContainerString Extends (%Persistent, %Populate, %XML.Adaptor, %ZEN.DataModel.Adaptor) { Property Mystring As %String(MAXLEN = 32000, XMLPROJECTION = "CONTENT"); ClassMethod Import() { // Create an instance of %XML.Reader Set reader = ##class(%XML.Reader).%New() // Begin processing of the file Set status = reader.OpenFile("C:\TEST\test.xml") If $$$ISERR(status) {do $System.Status.DisplayError(status)} // Associate a class name with the XML element name Do reader.Correlate("StringValue","TestEnvironment.Custom.GENERAL.ContainerString") // Read objects from xml file While (reader.Next(.object,.status)) { Write object.Mystring,! //check the length of the string set lstr=$length(object.Mystring,",") write "The length of incoming string is : "_lstr if (lstr>28) { //divide by 28 for your processing set div=lstr/28 if (div=2) { //assign your strings to something and write to file to map your records set newstrObject=$piece(object.Mystring,",",1,28) set secNewStrOJect=$piece(object.Mystring,",",29,56) } elseif (div=3) { set newstrObject=$piece(object.Mystring,",",1,28) set secNewStrOJect=$piece(object.Mystring,",",29,56) set thirdNewStrOJect=$piece(object.Mystring,",",57,84) write "this is the string cut1 :"_newstrObject,! write "this is the string cut2 :"_secNewStrOJect,! write "this is the string cut3 :"_thirdNewStrOJect,! }} } // If error found during processing, show it If $$$ISERR(status) {do $System.Status.DisplayError(status)} } } hope this helps
go to post Thembelani Mlalazi · Oct 13, 2017 [@Sean Connelly] managed to do as per your suggestion but the problem persist. The messages are rooted to the process but are not going any further to the business operation .My business operation is using the EnsLib.EDI.XML.Operation.FileOperation is this the problem and if it is what's the right one to use