i’m creating an XML Document Type in TN . Can I put a regular expression in “Value” while adding an identifying query. A tag named
BUIS_LEV comes in the XML. Its value can be any string , I want the XML document to be recognized if the string contains A25 anywhere in it . Can we put a reqular expression in “Value”.
for eg all the below values of BUIS_LEV should be considered valid and XML Document should be recognized by TN
AFAIK, you cannot use regular expressions with XQL which is the language used for identifying queries.Regular expressions can be only used with WQL.
I agree with ramesh,only u can use is specifiying XML node in the XQL format for Identifying query and it searches the node if exits in the XML and recognizes it.
Looks like it’s doable, but I’m too lazy to try it myself. Look in TN: Building Your Network doc. Specifically, XQL Reference section. I tried it in queryDocument, and that worked as advertised.
That being said, I find the idea of using RegEx to do identifying query quite hard to comprehend. Could be more trouble than it’s worth…
Actually, I think using a regular expression to identify a document using pattern matching makes lots of sense. You can use regular expressions inside XQL using the following syntax:
Matches the aspect names of all aspects whose pointcut/name elements contains a name elements that start with “mdc”.
You can also combine regex patterns for more complex queries:
The second query matches only the serviceNames where the adviceType is “before” and the pointcut/name elements contain the string “mdc.demo”.
I guess I should elaborate on what I mean by “troublesome”. I think it parallels the steps involved in finding out sender/receiver ID after identifying the TN DocType. That is, it rarely make sense to being able to extract sender/receiver ID before identifying the TN DocType. You wouldn’t know which partner is identified by “100300400” unless you know that it is a DUNS number, for example.
So in the same way, I don’t quite understand how one would want to do RegEx to identify a DocType. Since you’re doing RegEx, that means you’re not quite sure where a certain tag or value would show up in the document – and by extension, you’re not exactly sure how the document is structured. For B2B purposes (which TN is intended), not having a strictly defined DocType (by Schema or DTD) is asking for trouble. There would be so many BRANCHes in a mapping flow, for example, since you won’t be sure which of the multiple documents you’re actually processing.
In other words, I’m thinking of using RegEx in identifying query as a way of matching multiple document structures as the same DocType. Really don’t sound like a good idea. I think having RegEx in XQL makes a lot more sense when doing queryDocument. But, I’d love to hear about any kind of real usage for RegEx in Identifying Query…
I think the most natural fit for using regex in TN DocType identification is to further refine the DocType. For example, you might want to identify a HighPriorityCustomerOrder rather than just a CustomerOrder when the orderPriority is some value or if the end customer (not the partner) is some value. This only makes sense if you have some different processing rules that need to be applied for one over the other and you could argue that that sort of logic fits better in a process map or flow step.
My main point is that XQL supports regex, its easy to do and there are some valid reasons why you might want to do so. Use the right tool for the job, but always know what tools you have in the box.
Regex isn’t necessarily required there either unless you are looking within a specific field and parsing its value.
TN already provides element level differentiation for document identificiation.
Better than smart data is a smart structure.
I am sending the document(iDoc) from SAP to TN directly using wm.tn.receive service in routing rules.The problem is in identifing the document through document types , what I need to enter like root tag, ID and pipeline key-value pairs and what more I need to enter.
It is the Idoc in pipeline, so what I need to enter in Idenity tab.
Kindly, could you help me in creating document type in this scenario
I need help to sort out this identifying query in TN.
I’m working on wm6.5 version TN.
coming to me question, in webMethods Trading Networks Users Guide 65- page number 535, its mentioned for pattern search we can use like this
However i tried to test this senario by creating TN document type with sample xml data which is mentioned in same TN developer users guide. I selected last-name from the xml string and selected “Add an identifying query” then it is assigned like this as
Query = /bookstore/book/author/last-name and
i placed Value = /bookstore/book/author[lastname/regex(‘Bo.’)]
and tried all the posibilities which i can… but document not recognized.
Pls can any one help me whatz wrong in this process.
can any one give the solution on my question.
We are trying to use this condition in our project.
Pls help me.
Pls can anyone give me the solution for this post
Atlast i tried all the ways and got solution…
this is the query we need to assign :
Value is empty.
I’m trying to write a service which includes reading a xml file from a specified path and invoke bytestostring followed by xmlStringtoxmlnode and queryxmlnode services.
However, I’m encountering issues with queryxmlnode using both wql and xql queries.All I get is null when I try to extract the List from the below sample xml
XQL query used to pull the details of List - /List
WQL query used to pull the details of List - doc.List
I delacred List as output varibale under fields varibale of queryxmlnode as Record.
Designer version - 9.6.
Appreciate the quick help.