I'm shocked. How did you do this?
Reading a Message from queue is quite easy, but how you was able to convert the Message data to text??
I suppose that is rather not possible.
First, the Message data are placed in a field named "PayLoad" of type System.Object and variable of this type cannot be added to project and are not shown in any Desiner's variable editor I've ever used. Do you really have access to field PayLoad in the Message structure?
Second, the conversion to text is improper operation. The Message data should be deserialized - not converted. If you really get access to the PayLoad this field is automatically deserialized to object of proper data type - in this particular case to a TaskAssignmentStructure.
Third, the string replacement should be done field by field of the deserialized structure. Then corrected TaskAssignmentStructure can be stored as an object in queue again.
Excuse me, but I suspect that you converted to text the whole Message structure. Replacing strings in such converted structure doesn't guarantee that other non-string data (e.g. DateTime) won't be destroyed. I supposed you intended to convert this changed Message to byte array again and store it in queue.
Unfortunatelly, you won't we able to store correctly this structure in queue again using standard Put Message In Exchange component. The problem is that this component requires on input an object of specified data type, which will be put inside Message, like TaskAssignmentStructure. You can't pass to it a Message structure because the effect will be placing one Message inside another Message and workflow engine won't be able to read it back.
The next problem is that the TaskAssignmentStructure seems to be unaccessible to Designer's data type selector wizards. So it cannot be selected as input object for Put Message In Exchange component.
I think your idea to do conversion in that way seems to be too risky. It can be done easier and safier by C# program maybe no more then two dozen lines long.