Interesting behavior writing disassembler component
Have to write a disassembler component to wrap flat file disassembler to disassemble incoming SAP flat file then validate the disassembled XML upon BRE, if validated then promote some properties dynamically and pump individual validated messages to the output stream.
I followed the standard template, using a Queue instance to hold the output messages in the Disassemble() then dequeue it in the GetNext(). The disassemble works no problem, however, the message context seems to messed up. My debugger reading context property in GetNext is sometimes different than the original value set by Disassemble.
In the end, I declare another queue for the context property values, I then only queue up the message itself, promoting the context in the GetNext() rather in the Disassemble().