Issue with the same name of Document ref in try and catch block

In my flow service, I have added one map step in the try block in which I have taken as a ref to some document and do the mappings and hard coding in that document. That same document has been also taken as a reference in the catch block. When I use the same name for that ref doc in the try block as present in the catch block, the mappings and hard coding of that ref doc in the catch block got invisible. I am unable to see the mappings but those are coming during run time.

Please help me out.

webMethods version we are using 6.5
Developer version: 6.5

drop the document in try block last step…

Thanks for your help…But I already have tried by dropping the documnet at the last step of try block. I doesn’t help.

Still I am unable to see the hardcodings and mappings of that same doc in the catch block but coming during run time.

Do u have any idea why it is happening…is there is any issue with the developer?
Is it safe to take this code on production?

Thanks again for your help.

Try initializing the Document ref before Main Block(Main->Try/Catch) so that it becomes globally available and not restricted within the scope of try block.

Changes to a doc in the try block are not available directly in the pipeline in the catch block. The pipeline is restored to the state it was before the try when it goes to the catch block (the effect is something akin to a stack being maintained).

To get the values of the doc as it existed in the try block when the error occurred, call getLastError (you probably already do). The output of that service includes a document named “pipeline.” You can retrieve the document of interest from there and it will contain the changes made in the try block.