I created a service to route a xml document to TN using the service wm.tn.doc.xml:routeXml. After doing the routeXml file I also set an attribute filename (which can not be retrieved from the xml itself) with wm.tn.doc:setAttribute and wm.tn.doc:updateAttributes.
Everything is working fine when I look in TN I can see the xml document and also the attribute filename with the correct value.
But than TN processing rule executes a service which needs the filename (the attribute I added before) to do something. I have the BizDoc in the pipeline but the attribute filename has value 'null’. How is this possible? Do I have to do something else? I checked TN console and I can see the filename with the correct value…
To double-check I looked into the database tables (BizDocAttribute) and also in the tables I can see that the document is linked with attribute filename and filename has the correct value…
Every TN transaction will have a bizdoc id associated with it. For the transaction you refer, do you see the attribute value being displayed in db where as it is not in the IS flow service pipeline?
Yes I searched the database with the bizdoc id and I found the attribute (linked to that bizdoc id) as well in the database with the correct value. But it’s not in the bizdoc document in the pipeline of the service executed by the processing rule.
I agree with you that it souldn’t be the case.What I mean is that I would suspect that the attribute would be available in the pipeline because I can see it in MyWebMethods and in the database.
The service is not in restore mode, no restorePipeline or whatever.
Some extra info: if I change:
routeXml
setAttribute
updateAttributes
by:
setAttribute
updateAttributes
routeBizDoc
than the service executed by the processing rule shows the correct value in the pipeline for attribute filename. But I need to use routeXml because of large document handling (routeBizDoc gives errors with large files).
The issue I have is explained in the first thread.
If I use routeXml to route a XML to tn and after the routing add an attribute filename with setAttribute and updateAttributes, I can see the attribute in TN Console and also in the db.
But in the next step when the processing rule executes a service the attribute does not exist anymore in the bizdoc in the pipeline of the service.
It is because the service in the processing rule is executed before the call you made to routeXml returns to you–so the attribute is set after your service runs.
There are couple of options you can do, if you really must have the filename available in the processing service. One is to create the bizdoc first, set the attribute, then route (using appropriate TN services). Another is to create a new document type that adds in the filename as an element. Then extract using TN attribute extraction.
If it were me, I’d try to change things so that the filename wasn’t necessary.